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

Unified Diff: pkg/compiler/lib/src/mirrors/dart2js_member_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_member_mirrors.dart
diff --git a/pkg/compiler/lib/src/mirrors/dart2js_member_mirrors.dart b/pkg/compiler/lib/src/mirrors/dart2js_member_mirrors.dart
index 88ffbf917a737d1d336e77e382f94de894bc7162..82785255d8fa3c8794de5a1e7777821b26d83a8d 100644
--- a/pkg/compiler/lib/src/mirrors/dart2js_member_mirrors.dart
+++ b/pkg/compiler/lib/src/mirrors/dart2js_member_mirrors.dart
@@ -190,8 +190,7 @@ class Dart2JsParameterMirror extends Dart2JsMemberMirror
// TODO(johnniwinther): Get the constant from the [TreeElements]
// associated with the enclosing method.
ParameterElement parameter = _element;
- ConstantExpression constant =
- mirrorSystem.compiler.constants.getConstantForVariable(parameter);
+ ConstantExpression constant = parameter.constant;
assert(invariant(parameter, constant != null,
message: "Missing constant for parameter "
"$parameter with default value."));

Powered by Google App Engine
This is Rietveld 408576698