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

Unified Diff: pkg/compiler/lib/src/mirrors/dart2js_mirrors.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/mirrors/dart2js_mirrors.dart
diff --git a/pkg/compiler/lib/src/mirrors/dart2js_mirrors.dart b/pkg/compiler/lib/src/mirrors/dart2js_mirrors.dart
index 9ca158b11645bb4282b7392af3111d153c6c37e9..406502a2746f4d6e38b9c847bb525420b41b23ca 100644
--- a/pkg/compiler/lib/src/mirrors/dart2js_mirrors.dart
+++ b/pkg/compiler/lib/src/mirrors/dart2js_mirrors.dart
@@ -463,7 +463,7 @@ class BackDoor {
static ConstantExpression initializerSyntaxOf(Dart2JsFieldMirror variable) {
Compiler compiler = variable.mirrorSystem.compiler;
- return compiler.constants.getConstantForVariable(variable._variable);
+ return variable._variable.constant;
}
static ConstantExpression defaultValueSyntaxOf(
@@ -471,7 +471,7 @@ class BackDoor {
if (!parameter.hasDefaultValue) return null;
ParameterElement parameterElement = parameter._element;
Compiler compiler = parameter.mirrorSystem.compiler;
- return compiler.constants.getConstantForVariable(parameterElement);
+ return parameterElement.constant;
}
static Mirror getMirrorFromElement(Dart2JsMirror mirror, Element element) {
« no previous file with comments | « pkg/compiler/lib/src/mirrors/dart2js_member_mirrors.dart ('k') | pkg/compiler/lib/src/resolution/resolution.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698