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

Unified Diff: pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart

Issue 2024873002: Compute non-final static fields without the constant compiler. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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_emitter/full_emitter/emitter.dart
diff --git a/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart b/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart
index 0e02c6c904915a30e06178c0b0c3064fd501b319..5bd1cb1d685faabde990fcdece9ab37e4ed9528a 100644
--- a/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart
@@ -614,9 +614,9 @@ class Emitter implements js_emitter.Emitter {
// If the outputUnit does not contain any static non-final fields, then
// [fields] is `null`.
if (fields != null) {
- for (Element element in fields) {
+ for (FieldElement element in fields) {
reporter.withCurrentElement(element, () {
- ConstantValue constant = handler.getInitialValueFor(element);
+ ConstantValue constant = handler.getConstantValue(element.constant);
parts.add(buildInitialization(element, constantReference(constant)));
});
}

Powered by Google App Engine
This is Rietveld 408576698