Chromium Code Reviews| Index: runtime/vm/compiler.cc |
| =================================================================== |
| --- runtime/vm/compiler.cc (revision 20935) |
| +++ runtime/vm/compiler.cc (working copy) |
| @@ -167,14 +167,13 @@ |
| FlowGraphPrinter::PrintGraph("Before Optimizations", flow_graph); |
| } |
| - const ZoneGrowableArray<Field*>* guarded_fields = NULL; |
| - |
| + GrowableArray<Field*> guarded_fields(10); |
|
Vyacheslav Egorov (Google)
2013/04/05 19:35:00
Please move a comment that was on FieldDependencie
srdjan
2013/04/05 20:41:24
Done.
|
| if (optimized) { |
| TimerScope timer(FLAG_compiler_stats, |
| &CompilerStats::graphoptimizer_timer, |
| isolate); |
| - FlowGraphOptimizer optimizer(flow_graph); |
| + FlowGraphOptimizer optimizer(flow_graph, &guarded_fields); |
| optimizer.ApplyICData(); |
| DEBUG_ASSERT(flow_graph->VerifyUseLists()); |
| @@ -189,14 +188,12 @@ |
| if (FLAG_use_inlining) { |
| TimerScope timer(FLAG_compiler_stats, |
| &CompilerStats::graphinliner_timer); |
| - FlowGraphInliner inliner(flow_graph); |
| + FlowGraphInliner inliner(flow_graph, &guarded_fields); |
| inliner.Inline(); |
| // Use lists are maintained and validated by the inliner. |
| DEBUG_ASSERT(flow_graph->VerifyUseLists()); |
| } |
| - guarded_fields = flow_graph->FieldDependencies(); |
| - |
| // Propagate types and eliminate more type tests. |
| if (FLAG_propagate_types) { |
| FlowGraphTypePropagator propagator(flow_graph); |
| @@ -325,8 +322,8 @@ |
| Code::Handle(function.unoptimized_code()).EntryPoint()); |
| } |
| - for (intptr_t i = 0; i < guarded_fields->length(); i++) { |
| - const Field& field = *(*guarded_fields)[i]; |
| + for (intptr_t i = 0; i < guarded_fields.length(); i++) { |
| + const Field& field = *guarded_fields[i]; |
| field.RegisterDependentCode(code); |
| } |
| } else { |