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

Unified Diff: runtime/vm/parser.cc

Issue 1930553002: Revert "Don’t cache constants in initializer expressions" (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index 80c6021f622e178a22ea9446e9fca67e761272ab..6404df4bee3b3fa0947912b8d93a6fe28930b167 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -12012,11 +12012,6 @@ 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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698