Index: sdk/lib/_internal/compiler/implementation/compiler.dart |
diff --git a/sdk/lib/_internal/compiler/implementation/compiler.dart b/sdk/lib/_internal/compiler/implementation/compiler.dart |
index 4270b83fd81f09f391d8b53eae757376e32d1f70..2f7fa15cfd890927c8f852c94ff30118abd6b629 100644 |
--- a/sdk/lib/_internal/compiler/implementation/compiler.dart |
+++ b/sdk/lib/_internal/compiler/implementation/compiler.dart |
@@ -85,6 +85,15 @@ class CodegenWorkItem extends WorkItem { |
} |
} |
+typedef void PostProcessAction(); |
+ |
+class PostProcessTask { |
+ final Element element; |
+ final PostProcessAction action; |
+ |
+ PostProcessTask(this.element, this.action); |
+} |
+ |
class ReadingFilesTask extends CompilerTask { |
ReadingFilesTask(Compiler compiler) : super(compiler); |
String get name => 'Reading input files'; |
@@ -835,6 +844,9 @@ abstract class Compiler implements DiagnosticListener { |
withCurrentElement(work.element, () => work.run(this, world)); |
}); |
world.queueIsClosed = true; |
+ world.forEachPostProcessTask((PostProcessTask work) { |
+ withCurrentElement(work.element, () => work.action()); |
+ }); |
if (compilationFailed) return; |
assert(world.checkNoEnqueuedInvokedInstanceMethods()); |
if (DUMP_INFERRED_TYPES && phase == PHASE_COMPILING) { |