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

Unified Diff: runtime/vm/flow_graph_type_propagator.cc

Issue 1497783002: Fix optimizations on static fields in precompiled code. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: addressed comment Created 5 years 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_optimizer.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_type_propagator.cc
diff --git a/runtime/vm/flow_graph_type_propagator.cc b/runtime/vm/flow_graph_type_propagator.cc
index 986615f1b669b0924a459b550a725f229b3ea327..f062fa2d84275ff2a57134b64f05711cdf76b8c3 100644
--- a/runtime/vm/flow_graph_type_propagator.cc
+++ b/runtime/vm/flow_graph_type_propagator.cc
@@ -17,6 +17,7 @@ DEFINE_FLAG(bool, trace_type_propagation, false,
DECLARE_FLAG(bool, propagate_types);
DECLARE_FLAG(bool, trace_cha);
DECLARE_FLAG(bool, use_cha_deopt);
+DECLARE_FLAG(bool, fields_may_be_reset);
void FlowGraphTypePropagator::Propagate(FlowGraph* flow_graph) {
@@ -1009,7 +1010,7 @@ CompileType LoadStaticFieldInstr::ComputeType() const {
abstract_type = &AbstractType::ZoneHandle(field.type());
}
ASSERT(field.is_static());
- if (field.is_final()) {
+ if (field.is_final() && !FLAG_fields_may_be_reset) {
const Instance& obj = Instance::Handle(field.StaticValue());
if ((obj.raw() != Object::sentinel().raw()) &&
(obj.raw() != Object::transition_sentinel().raw()) &&
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698