Chromium Code Reviews| Index: runtime/vm/flow_graph_optimizer.cc |
| diff --git a/runtime/vm/flow_graph_optimizer.cc b/runtime/vm/flow_graph_optimizer.cc |
| index 22ba02f3634f57a2e3e94b7bd309edfa4f08b701..b698a6960a7a1258f1b00ee84321f48154a33791 100644 |
| --- a/runtime/vm/flow_graph_optimizer.cc |
| +++ b/runtime/vm/flow_graph_optimizer.cc |
| @@ -55,6 +55,7 @@ DECLARE_FLAG(bool, trace_cha); |
| DECLARE_FLAG(bool, trace_field_guards); |
| DECLARE_FLAG(bool, trace_type_check_elimination); |
| DECLARE_FLAG(bool, warn_on_javascript_compatibility); |
| +DECLARE_FLAG(bool, fields_may_be_reset); |
| // Quick access to the current isolate and zone. |
| #define I (isolate()) |
| @@ -5654,7 +5655,9 @@ class Place : public ValueObject { |
| } |
| bool IsFinalField() const { |
| - return (kind() == kField) && field().is_final(); |
| + return (kind() == kField) |
| + && field().is_final() |
| + && (!field().is_static() || !FLAG_fields_may_be_reset); |
|
srdjan
2015/12/03 16:57:56
IMO, the flag does not belong here, the test is fo
rmacnak
2015/12/03 21:09:11
Ditto.
Florian Schneider
2015/12/04 11:36:54
Done.
|
| } |
| intptr_t Hashcode() const { |