| Index: runtime/vm/parser.cc
|
| diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
|
| index 14446d997566b961a762f96e7cb7dd5bff590864..98254a75610be88827f2b31019f90c9bb249fce9 100644
|
| --- a/runtime/vm/parser.cc
|
| +++ b/runtime/vm/parser.cc
|
| @@ -12011,6 +12011,11 @@ typedef UnorderedHashMap<ConstMapKeyEqualsTraits> ConstantsMap;
|
|
|
| void Parser::CacheConstantValue(TokenPosition token_pos,
|
| const Instance& value) {
|
| + if (current_function().kind() == RawFunction::kImplicitStaticFinalGetter) {
|
| + // Don't cache constants in initializer expressions. They get
|
| + // evaluated only once.
|
| + return;
|
| + }
|
| ConstantPosKey key(String::Handle(Z, script_.url()), token_pos);
|
| if (isolate()->object_store()->compile_time_constants() == Array::null()) {
|
| const intptr_t kInitialConstMapSize = 16;
|
|
|