Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1150)

Unified Diff: runtime/vm/flow_graph_builder.cc

Issue 10855019: Add a function's initial stack check to the IL instruction stream. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_builder.cc
diff --git a/runtime/vm/flow_graph_builder.cc b/runtime/vm/flow_graph_builder.cc
index 7aa14cd5c03c8ca549ddda76eefc3ef09f87d3fd..a668d64fece0d77e5f5072d2909389ca05143c31 100644
--- a/runtime/vm/flow_graph_builder.cc
+++ b/runtime/vm/flow_graph_builder.cc
@@ -2298,6 +2298,10 @@ void FlowGraphBuilder::BuildGraph(bool for_optimized, bool use_ssa) {
TargetEntryInstr* normal_entry = new TargetEntryInstr();
graph_entry_ = new GraphEntryInstr(normal_entry);
EffectGraphVisitor for_effect(this, 0);
+ // TODO(kmillikin): We can eliminate stack checks in some cases (e.g., the
+ // stack check on entry for leaf routines).
srdjan 2012/08/07 19:04:30 Yes. Why not skip it if IsLeaf()?
+ for_effect.Do(new CheckStackOverflowComp(function.token_pos(),
+ CatchClauseNode::kInvalidTryIndex));
parsed_function().node_sequence()->Visit(&for_effect);
AppendFragment(normal_entry, for_effect);
// Check that the graph is properly terminated.
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698