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

Unified Diff: runtime/vm/flow_graph_inliner.cc

Issue 23589008: Clean up handling of guarded fields in the flow graph builder. (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 | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/flow_graph_optimizer.cc » ('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 27696)
+++ runtime/vm/flow_graph_inliner.cc (working copy)
@@ -542,19 +542,17 @@
// Build the callee graph.
InlineExitCollector* exit_collector =
new InlineExitCollector(caller_graph_, call);
- GrowableArray<const Field*> inlined_guarded_fields;
- FlowGraphBuilder* builder = new FlowGraphBuilder(parsed_function,
- ic_data_array,
- exit_collector,
- &inlined_guarded_fields,
- Isolate::kNoDeoptId);
- builder->SetInitialBlockId(caller_graph_->max_block_id());
+ FlowGraphBuilder builder(parsed_function,
+ ic_data_array,
+ exit_collector,
+ Isolate::kNoDeoptId);
+ builder.SetInitialBlockId(caller_graph_->max_block_id());
FlowGraph* callee_graph;
{
TimerScope timer(FLAG_compiler_stats,
&CompilerStats::graphinliner_build_timer,
isolate);
- callee_graph = builder->BuildGraph();
+ callee_graph = builder.BuildGraph();
}
// The parameter stubs are a copy of the actual arguments providing
@@ -671,8 +669,9 @@
// When inlined, we add the guarded fields of the callee to the caller's
// list of guarded fields.
- for (intptr_t i = 0; i < inlined_guarded_fields.length(); ++i) {
- caller_graph_->builder().AddToGuardedFields(*inlined_guarded_fields[i]);
+ for (intptr_t i = 0; i < callee_graph->guarded_fields()->length(); ++i) {
+ FlowGraph::AddToGuardedFields(caller_graph_->guarded_fields(),
+ (*callee_graph->guarded_fields())[i]);
}
TRACE_INLINING(OS::Print(" Success\n"));
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698