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

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

Issue 832363002: Remove Compiler.assembledCode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix unittest 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
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 ad620a4e67a60b24ac9597166b599e6b9df3c8da..01c596381a30075f99227517986acd5a992b4ca4 100644
--- a/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart
+++ b/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart
@@ -390,8 +390,8 @@ class CodeEmitterTask extends CompilerTask {
computeNeededLibraries();
}
- void assembleProgram() {
- measure(() {
+ int assembleProgram() {
+ return measure(() {
emitter.invalidateCaches();
computeAllNeededEntities();
@@ -400,13 +400,14 @@ class CodeEmitterTask extends CompilerTask {
if (USE_NEW_EMITTER) {
program = new ProgramBuilder(compiler, namer, this).buildProgram();
}
- emitter.emitProgram(program);
+ return emitter.emitProgram(program);
});
}
}
abstract class Emitter {
- void emitProgram(Program program);
+ /// Emits [program] and returns the size of the generated output.
+ int emitProgram(Program program);
/// Returns the JS function that must be invoked to get the value of the
/// lazily initialized static.
@@ -442,7 +443,6 @@ abstract class Emitter {
/// Returns the JS expression representing the type [e].
jsAst.Expression typeAccess(Element e);
-
int compareConstants(ConstantValue a, ConstantValue b);
bool isConstantInlinedOrAlreadyEmitted(ConstantValue constant);
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | 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