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

Unified Diff: pkg/compiler/lib/src/js_emitter/code_emitter_task.dart

Issue 1225293002: dart2js: add skeleton of startup-emitter. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Reupload Created 5 years, 5 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/js_emitter.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/js_emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698