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

Unified Diff: pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart

Issue 2637383005: enable --dump-info with the --fast-startup emitter (Closed)
Patch Set: Created 3 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/startup_emitter/emitter.dart
diff --git a/pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart b/pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart
index 617fea3170e63a20f05fde19886b524ac7571f41..d71963f75fbaf97472c62e1e764de6b99520d220 100644
--- a/pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart
@@ -10,6 +10,7 @@ import 'package:js_runtime/shared/embedded_names.dart'
import '../../common.dart';
import '../../compiler.dart' show Compiler;
import '../../constants/values.dart' show ConstantValue;
+import '../../deferred_load.dart' show OutputUnit;
import '../../elements/elements.dart'
show ClassElement, Element, FieldElement, FunctionElement;
import '../../js/js.dart' as js;
@@ -195,5 +196,12 @@ class Emitter implements emitterTask.Emitter {
}
@override
+ int generatedSize(OutputUnit unit) {
+ Fragment key = _emitter.outputBuffers.keys
+ .firstWhere((Fragment fragment) => fragment.outputUnit == unit);
+ return _emitter.outputBuffers[key].length;
+ }
+
+ @override
void invalidateCaches() {}
}

Powered by Google App Engine
This is Rietveld 408576698