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

Unified Diff: runtime/vm/flow_graph_inliner.cc

Issue 659793003: Fix issue 21159: prevent endless inlining of field dispatchers. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 2 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 | tests/language/isssue_21159.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_inliner.cc
===================================================================
--- runtime/vm/flow_graph_inliner.cc (revision 41134)
+++ runtime/vm/flow_graph_inliner.cc (working copy)
@@ -764,11 +764,12 @@
&call_data->caller, &function, call_data->call);
return false;
}
-
- if (function.IsInvokeFieldDispatcher() ||
- function.IsNoSuchMethodDispatcher()) {
+ if ((GrowthFactor() < 10.0) &&
Florian Schneider 2014/10/16 10:34:33 We need to avoid infinite recursion, but not sure
+ (function.IsInvokeFieldDispatcher() ||
+ function.IsNoSuchMethodDispatcher())) {
// Append call sites to the currently processed list so that dispatcher
// methods get inlined regardless of the current depth.
+ // Use GrowthFactor to prevent endless recursive inlining.
inlining_call_sites_->FindCallSites(callee_graph,
0,
&inlined_info_);
« no previous file with comments | « no previous file | tests/language/isssue_21159.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698