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); |