Index: pkg/compiler/lib/src/js_emitter/code_emitter_task.dart |
diff --git a/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart b/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart |
index 0b9cdb2e3b5435c9fe1621785803466f36f6a2cc..d4530ad392d289b3c70a039a4416425046ec21f4 100644 |
--- a/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart |
+++ b/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart |
@@ -5,6 +5,8 @@ |
part of dart2js.js_emitter; |
const USE_LAZY_EMITTER = const bool.fromEnvironment("dart2js.use.lazy.emitter"); |
+const USE_STARTUP_EMITTER = |
+ const bool.fromEnvironment("dart2js.use.startup.emitter"); |
/** |
* Generates the code for all used classes in the program. Static fields (even |
@@ -38,9 +40,14 @@ class CodeEmitterTask extends CompilerTask { |
this.namer = namer, |
this.typeTestRegistry = new TypeTestRegistry(compiler) { |
nativeEmitter = new NativeEmitter(this); |
- emitter = USE_LAZY_EMITTER |
- ? new lazy_js_emitter.Emitter(compiler, namer, nativeEmitter) |
- : new full_js_emitter.Emitter(compiler, namer, generateSourceMap, this); |
+ if (USE_LAZY_EMITTER) { |
+ emitter = new lazy_js_emitter.Emitter(compiler, namer, nativeEmitter); |
+ } else if (USE_STARTUP_EMITTER) { |
+ emitter = new startup_js_emitter.Emitter(compiler, namer, nativeEmitter); |
+ } else { |
+ emitter = |
+ new full_js_emitter.Emitter(compiler, namer, generateSourceMap, this); |
+ } |
metadataCollector = new MetadataCollector(compiler, emitter); |
} |