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

Unified Diff: runtime/vm/flow_graph_builder.cc

Issue 14308009: Detect leaf optimized methods and skip stack check overflow test in those, unless it is in a loop (… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_builder.cc
===================================================================
--- runtime/vm/flow_graph_builder.cc (revision 21683)
+++ runtime/vm/flow_graph_builder.cc (working copy)
@@ -3383,9 +3383,9 @@
CatchClauseNode::kInvalidTryIndex);
graph_entry_ = new GraphEntryInstr(parsed_function(), 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).
- Instruction* check = new CheckStackOverflowInstr(function.token_pos());
+ // This check may be deleted if the generated code is leaf.
+ CheckStackOverflowInstr* check =
+ new CheckStackOverflowInstr(function.token_pos());
// If we are inlining don't actually attach the stack check. We must still
// create the stack check in order to allocate a deopt id.
if (!IsInlining()) for_effect.AddInstruction(check);
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698