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

Unified Diff: pkg/compiler/lib/src/js_emitter/new_emitter/model_emitter.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/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 70e6a95c97f148c9c829c674794f72ae26826bea..dbeaada7db647fbf44dfa47a6ce1f7de70bec6b7 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
@@ -38,7 +38,7 @@ class ModelEmitter {
constantEmitter =
new ConstantEmitter(compiler, namer, makeConstantListTemplate);
- void emitProgram(Program program) {
+ int emitProgram(Program program) {
List<Output> outputs = program.outputs;
MainOutput mainUnit = outputs.first;
js.Statement mainAst = emitMainUnit(program);
@@ -47,15 +47,17 @@ class ModelEmitter {
..add(buildGeneratedBy(compiler))
..add(mainCode)
..close();
- compiler.assembledCode = mainCode;
+ int totalSize = mainCode.length;
outputs.skip(1).forEach((DeferredOutput deferredUnit) {
js.Expression ast = emitDeferredUnit(deferredUnit, mainUnit.holders);
String code = js.prettyPrint(ast, compiler).getText();
+ totalSize += code.length;
compiler.outputProvider(deferredUnit.outputFileName, deferredExtension)
..add(code)
..close();
});
+ return totalSize;
}
js.LiteralString unparse(Compiler compiler, js.Expression value) {
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/new_emitter/emitter.dart ('k') | pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698