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

Unified Diff: pkg/compiler/lib/src/js_emitter/new_emitter/model_emitter.dart

Issue 1132363003: dart2js: keep track of non-final static fields. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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/new_emitter/model_emitter.dart
diff --git a/pkg/compiler/lib/src/js_emitter/new_emitter/model_emitter.dart b/pkg/compiler/lib/src/js_emitter/new_emitter/model_emitter.dart
index 7d4b2a5f2cd35c09472530a194466914243db05a..11737b52b82bfbda690a4f828ca01f47c31e65d2 100644
--- a/pkg/compiler/lib/src/js_emitter/new_emitter/model_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/new_emitter/model_emitter.dart
@@ -446,15 +446,16 @@ class ModelEmitter {
deferredCode.add(
emitLazilyInitializedStatics(fragment.staticLazilyInitializedFields));
-
deferredCode.add(emitConstants(fragment.constants));
js.ArrayInitializer deferredArray = new js.ArrayInitializer(deferredCode);
// This is the code that must be evaluated after all deferred classes have
// been setup.
- js.Statement immediateCode =
- emitEagerClassInitializations(fragment.libraries);
+ js.Statement immediateCode = new js.Block([
+ emitStaticNonFinalFields(fragment.staticNonFinalFields),
+ emitEagerClassInitializations(fragment.libraries)]);
+
sra1 2015/05/12 23:20:02 FYI you could interpolate this with js.statement(
floitsch 2015/05/12 23:34:11 Blocks are flattened by the JS pretty printer too.
js.LiteralString immediateString = unparse(compiler, immediateCode);
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/code_emitter_task.dart ('k') | pkg/compiler/lib/src/js_emitter/program_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698