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

Unified Diff: runtime/vm/flow_graph_optimizer.cc

Issue 1368173002: Do not eagerly finalize when optimizing. Remove allocation of temporary strings in new space. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Improve comments Created 5 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/class_finalizer.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_optimizer.cc
diff --git a/runtime/vm/flow_graph_optimizer.cc b/runtime/vm/flow_graph_optimizer.cc
index 54a571a44ddc36a3c8e19ed516a0c0c262a3c1ce..d1ea43e54f8fdb4e61d29e08aaf3f64cfa6f7363 100644
--- a/runtime/vm/flow_graph_optimizer.cc
+++ b/runtime/vm/flow_graph_optimizer.cc
@@ -224,6 +224,12 @@ bool FlowGraphOptimizer::TryCreateICData(InstanceCallInstr* call) {
ArgumentsDescriptor args_desc(args_desc_array);
const Class& receiver_class = Class::Handle(Z,
isolate()->class_table()->At(class_ids[0]));
+ if (!receiver_class.is_finalized()) {
+ // Do not eagerly finalize classes. ResolveDynamicForReceiverClass can
+ // cause class finalization, since callee's receiver class may not be
+ // finalized yet.
+ return false;
+ }
const Function& function = Function::Handle(Z,
Resolver::ResolveDynamicForReceiverClass(
receiver_class,
« no previous file with comments | « runtime/vm/class_finalizer.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698