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

Unified Diff: runtime/vm/intermediate_language.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
Index: runtime/vm/intermediate_language.cc
diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
index 4b38ab367a5b8425dc23a994ef7c5fc2643aad81..52d5ce9dca8a6fe2dbc8f77216ca204cfdb9aec1 100644
--- a/runtime/vm/intermediate_language.cc
+++ b/runtime/vm/intermediate_language.cc
@@ -398,7 +398,8 @@ Instruction* InitStaticFieldInstr::Canonicalize(FlowGraph* flow_graph) {
EffectSet LoadStaticFieldInstr::Dependencies() const {
- return StaticField().is_final() ? EffectSet::None() : EffectSet::All();
+ return (StaticField().is_final() && !FLAG_fields_may_be_reset)
+ ? EffectSet::None() : EffectSet::All();
}
« no previous file with comments | « runtime/vm/flow_graph_type_propagator.cc ('k') | tests/language/vm/precompiled_static_initializer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698