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

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

Issue 822593004: dart2js: Let the emitter generate the program. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: No need to pass the task to the new emitter. Created 5 years, 11 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/new_emitter/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 be50b5a2bbcb10938fa7f5f68fa06dd375db38be..2aa87485cf8ad377310f6639d51b37694c649371 100644
--- a/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart
+++ b/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart
@@ -415,16 +415,16 @@ class CodeEmitterTask extends CompilerTask {
computeAllNeededEntities();
- Program program =
- new ProgramBuilder(compiler, namer, this).buildProgram();
- return emitter.emitProgram(program);
+ ProgramBuilder programBuilder = new ProgramBuilder(compiler, namer, this);
+ return emitter.emitProgram(programBuilder);
});
}
}
abstract class Emitter {
- /// Emits [program] and returns the size of the generated output.
- int emitProgram(Program program);
+ /// Uses the [programBuilder] to generate a model of the program, emits
+ /// the program, and returns the size of the generated output.
+ int emitProgram(ProgramBuilder programBuilder);
/// Returns the JS function that must be invoked to get the value of the
/// lazily initialized static.
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/new_emitter/emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698