Index: pkg/compiler/lib/src/compiler.dart |
diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart |
index 27bab26f7a08ee07145463f696c3e10bc36ae3e4..131462d4c35400214989ac881ad92e28f01a915c 100644 |
--- a/pkg/compiler/lib/src/compiler.dart |
+++ b/pkg/compiler/lib/src/compiler.dart |
@@ -613,10 +613,7 @@ abstract class Compiler { |
reporter.log('Compiling...'); |
phase = PHASE_COMPILING; |
- Enqueuer codegenEnqueuer = enqueuer.createCodegenEnqueuer(closedWorld); |
- _codegenWorldBuilder = codegenEnqueuer.worldBuilder; |
- codegenEnqueuer.applyImpact( |
- backend.onCodegenStart(closedWorld, _codegenWorldBuilder)); |
+ Enqueuer codegenEnqueuer = startCodegen(closedWorld); |
if (compileAll) { |
libraryLoader.libraries.forEach((LibraryEntity library) { |
codegenEnqueuer.applyImpact(computeImpactForLibrary(library)); |
@@ -639,6 +636,14 @@ abstract class Compiler { |
checkQueues(resolutionEnqueuer, codegenEnqueuer); |
}); |
+ Enqueuer startCodegen(ClosedWorld closedWorld) { |
+ Enqueuer codegenEnqueuer = enqueuer.createCodegenEnqueuer(closedWorld); |
+ _codegenWorldBuilder = codegenEnqueuer.worldBuilder; |
+ codegenEnqueuer |
+ .applyImpact(backend.onCodegenStart(closedWorld, _codegenWorldBuilder)); |
+ return codegenEnqueuer; |
+ } |
+ |
/// Perform the steps needed to fully end the resolution phase. |
ClosedWorldRefiner closeResolution(FunctionEntity mainFunction) { |
phase = PHASE_DONE_RESOLVING; |