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

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

Issue 1398393002: Decouple SSA builder from codegen-work-item (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 | « pkg/compiler/lib/src/common/codegen.dart ('k') | pkg/compiler/lib/src/enqueue.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 08a51d921a97d00f6d2752b8acaf07cb28c73dd4..5cba0f98159aad5b2a610f235e696be43dfaf38c 100644
--- a/pkg/compiler/lib/src/dump_info.dart
+++ b/pkg/compiler/lib/src/dump_info.dart
@@ -345,7 +345,17 @@ class Selection {
Selection(this.selectedElement, this.mask);
}
-class DumpInfoTask extends CompilerTask {
+/// Interface used to record information from different parts of the compiler so
+/// we can emit them in the dump-info task.
+// TODO(sigmund,het): move more features here. Ideallly the dump-info task
+// shouldn't reach into internals of other parts of the compiler. For example,
+// we currently reach into the full emitter and as a result we don't support
+// dump-info when using the startup-emitter (issue #24190).
+abstract class InfoReporter {
+ void reportInlined(Element element, Element inlinedFrom);
+}
+
+class DumpInfoTask extends CompilerTask implements InfoReporter {
DumpInfoTask(Compiler compiler) : super(compiler);
String get name => "Dump Info";
@@ -379,7 +389,7 @@ class DumpInfoTask extends CompilerTask {
_programSize = programSize;
}
- void registerInlined(Element element, Element inlinedFrom) {
+ void reportInlined(Element element, Element inlinedFrom) {
inlineCount.putIfAbsent(element, () => 0);
inlineCount[element] += 1;
inlineMap.putIfAbsent(inlinedFrom, () => new List<Element>());
« no previous file with comments | « pkg/compiler/lib/src/common/codegen.dart ('k') | pkg/compiler/lib/src/enqueue.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698