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

Unified Diff: runtime/vm/compiler.cc

Issue 24315002: Reland: Fix bug in field type tracking and polymorphic inlining. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/compiler.cc
===================================================================
--- runtime/vm/compiler.cc (revision 27690)
+++ runtime/vm/compiler.cc (working copy)
@@ -270,7 +270,9 @@
LongJump bailout_jump;
isolate->set_long_jump_base(&bailout_jump);
if (setjmp(*bailout_jump.Set()) == 0) {
+ FlowGraphBuilder* builder = NULL;
FlowGraph* flow_graph = NULL;
+ GrowableArray<const Field*> guarded_fields;
// TimerScope needs an isolate to be properly terminated in case of a
// LongJump.
{
@@ -290,11 +292,12 @@
}
// Build the flow graph.
- FlowGraphBuilder builder(parsed_function,
- ic_data_array,
- NULL, // NULL = not inlining.
- osr_id);
- flow_graph = builder.BuildGraph();
+ builder = new FlowGraphBuilder(parsed_function,
+ ic_data_array,
+ NULL, // NULL = not inlining.
+ &guarded_fields,
+ osr_id);
+ flow_graph = builder->BuildGraph();
}
if (FLAG_print_flow_graph ||
@@ -326,13 +329,12 @@
// Collect all instance fields that are loaded in the graph and
// have non-generic type feedback attached to them that can
// potentially affect optimizations.
- GrowableArray<const Field*> guarded_fields(10);
if (optimized) {
TimerScope timer(FLAG_compiler_stats,
&CompilerStats::graphoptimizer_timer,
isolate);
- FlowGraphOptimizer optimizer(flow_graph, &guarded_fields);
+ FlowGraphOptimizer optimizer(flow_graph);
optimizer.ApplyICData();
DEBUG_ASSERT(flow_graph->VerifyUseLists());
@@ -358,7 +360,7 @@
optimizer.ApplyClassIds();
DEBUG_ASSERT(flow_graph->VerifyUseLists());
- FlowGraphInliner inliner(flow_graph, &guarded_fields);
+ FlowGraphInliner inliner(flow_graph);
inliner.Inline();
// Use lists are maintained and validated by the inliner.
DEBUG_ASSERT(flow_graph->VerifyUseLists());
« no previous file with comments | « no previous file | runtime/vm/flow_graph.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698