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

Unified Diff: runtime/vm/compiler.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 | « 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 27696)
+++ runtime/vm/compiler.cc (working copy)
@@ -270,9 +270,7 @@
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.
{
@@ -292,12 +290,11 @@
}
// Build the flow graph.
- builder = new FlowGraphBuilder(parsed_function,
- ic_data_array,
- NULL, // NULL = not inlining.
- &guarded_fields,
- osr_id);
- flow_graph = builder->BuildGraph();
+ FlowGraphBuilder builder(parsed_function,
+ ic_data_array,
+ NULL, // NULL = not inlining.
+ osr_id);
+ flow_graph = builder.BuildGraph();
}
if (FLAG_print_flow_graph ||
@@ -551,9 +548,11 @@
}
function.SetCode(code);
- for (intptr_t i = 0; i < guarded_fields.length(); i++) {
- const Field& field = *guarded_fields[i];
- field.RegisterDependentCode(code);
+ for (intptr_t i = 0;
+ i < flow_graph->guarded_fields()->length();
+ i++) {
+ const Field* field = (*flow_graph->guarded_fields())[i];
+ field->RegisterDependentCode(code);
}
} else {
function.set_unoptimized_code(code);
« 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