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

Unified Diff: runtime/vm/compiler.cc

Issue 13739002: Revert r20998. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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 20999)
+++ runtime/vm/compiler.cc (working copy)
@@ -167,16 +167,14 @@
FlowGraphPrinter::PrintGraph("Before Optimizations", flow_graph);
}
- // 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<Field*> guarded_fields(10);
+ const ZoneGrowableArray<Field*>* guarded_fields = NULL;
+
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());
@@ -191,12 +189,14 @@
if (FLAG_use_inlining) {
TimerScope timer(FLAG_compiler_stats,
&CompilerStats::graphinliner_timer);
- 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());
}
+ guarded_fields = flow_graph->FieldDependencies();
+
// Propagate types and eliminate more type tests.
if (FLAG_propagate_types) {
FlowGraphTypePropagator propagator(flow_graph);
@@ -325,8 +325,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 {
« 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