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

Unified Diff: pkg/compiler/lib/src/js_backend/backend.dart

Issue 1919143002: Store constant variable initializers in elements. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. 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
Index: pkg/compiler/lib/src/js_backend/backend.dart
diff --git a/pkg/compiler/lib/src/js_backend/backend.dart b/pkg/compiler/lib/src/js_backend/backend.dart
index a7d67ddae81557e377bf87e4ff3c8068ed61cfeb..90cd7ce8b0d14e705b600f8ad31ff878dadba95f 100644
--- a/pkg/compiler/lib/src/js_backend/backend.dart
+++ b/pkg/compiler/lib/src/js_backend/backend.dart
@@ -1463,8 +1463,9 @@ class JavaScriptBackend extends Backend {
return const CodegenImpact();
}
if (kind.category == ElementCategory.VARIABLE) {
+ VariableElement variableElement = element;
ConstantValue initialValue =
- constants.getConstantValueForVariable(element);
+ constants.getConstantValue(variableElement.constant);
if (initialValue != null) {
registerCompileTimeConstant(initialValue, work.registry);
addCompileTimeConstantForEmission(initialValue);
« no previous file with comments | « pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart ('k') | pkg/compiler/lib/src/js_backend/codegen/glue.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698