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

Unified Diff: pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart

Issue 1919143002: Store constant variable initializers in elements. (Closed) Base URL: https://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
Index: pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
diff --git a/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart b/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
index b148b11e8cff04ce64fd0459246c439f89cebb9c..d13b1241f712c8c9056576141c06ec8234573f03 100644
--- a/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
+++ b/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
@@ -1299,8 +1299,9 @@ class SimpleTypeInferrerVisitor<T>
element.isField &&
Elements.isStaticOrTopLevelField(element) &&
compiler.world.fieldNeverChanges(element)) {
+ FieldElement fieldElement = element;
ConstantValue value =
- compiler.backend.constants.getConstantValueForVariable(element);
+ compiler.backend.constants.getConstantValue(fieldElement.constant);
if (value != null && value.isInt) {
IntConstantValue intValue = value;
return intValue.primitiveValue;

Powered by Google App Engine
This is Rietveld 408576698