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

Unified Diff: pkg/compiler/lib/src/dump_info.dart

Issue 1226733010: dart2js: Remove oldEmitter field in emitter-task. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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/code_emitter_task.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/dump_info.dart
diff --git a/pkg/compiler/lib/src/dump_info.dart b/pkg/compiler/lib/src/dump_info.dart
index 3e4cda2c9d38e231d9438ef524cdabfcf521237f..5ec5998270cd59c0e3cb593fd0a7a470ceae4475 100644
--- a/pkg/compiler/lib/src/dump_info.dart
+++ b/pkg/compiler/lib/src/dump_info.dart
@@ -21,6 +21,7 @@ import 'dart2jslib.dart' show
import 'types/types.dart' show TypeMask;
import 'deferred_load.dart' show OutputUnit;
import 'js_backend/js_backend.dart' show JavaScriptBackend;
+import 'js_emitter/js_emitter.dart' show OldEmitter;
import 'js/js.dart' as jsAst;
import 'universe/universe.dart' show Selector, UniverseSelector;
import 'util/util.dart' show NO_LOCATION_SPANNABLE;
@@ -596,6 +597,9 @@ class DumpInfoTask extends CompilerTask {
new List<Map<String, dynamic>>();
JavaScriptBackend backend = compiler.backend;
+ // Dump-info currently only works with the full emitter. If another
+ // emitter is used it will fail here.
+ OldEmitter fullEmitter = backend.emitter.emitter;
for (OutputUnit outputUnit in
infoCollector.mapper._outputUnit._elementToId.keys) {
@@ -603,7 +607,7 @@ class DumpInfoTask extends CompilerTask {
outputUnits.add(<String, dynamic> {
'id': id,
'name': outputUnit.name,
- 'size': backend.emitter.oldEmitter.outputBuffers[outputUnit].length,
+ 'size': fullEmitter.outputBuffers[outputUnit].length,
});
}
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/code_emitter_task.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698