| Index: pkg/compiler/lib/src/compiler.dart
|
| diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart
|
| index f6353790b591b93f3bebbb4a9327f03e6910937b..3594098f6d5574902b789e8cfd0180734c9c5771 100644
|
| --- a/pkg/compiler/lib/src/compiler.dart
|
| +++ b/pkg/compiler/lib/src/compiler.dart
|
| @@ -549,6 +549,8 @@ abstract class Backend {
|
| void registerAsyncMarker(FunctionElement element,
|
| Enqueuer enqueuer,
|
| Registry registry) {}
|
| +
|
| + EnqueueTask makeEnqueuer() => new EnqueueTask(compiler);
|
| }
|
|
|
| /// Backend callbacks function specific to the resolution phase.
|
| @@ -1066,7 +1068,8 @@ abstract class Compiler implements DiagnosticListener {
|
| this.generateCodeWithCompileTimeErrors: false,
|
| this.testMode: false,
|
| api.CompilerOutput outputProvider,
|
| - List<String> strips: const []})
|
| + List<String> strips: const [],
|
| + Backend makeBackend(Compiler compiler)})
|
| : this.disableTypeInferenceFlag =
|
| disableTypeInferenceFlag || !emitJavaScript,
|
| this.analyzeOnly =
|
| @@ -1098,7 +1101,9 @@ abstract class Compiler implements DiagnosticListener {
|
| globalDependencies =
|
| new CodegenRegistry(this, new TreeElementMapping(null));
|
|
|
| - if (emitJavaScript) {
|
| + if (makeBackend != null) {
|
| + backend = makeBackend(this);
|
| + } else if (emitJavaScript) {
|
| js_backend.JavaScriptBackend jsBackend =
|
| new js_backend.JavaScriptBackend(
|
| this, generateSourceMap: generateSourceMap,
|
| @@ -1127,7 +1132,7 @@ abstract class Compiler implements DiagnosticListener {
|
| constants = backend.constantCompilerTask,
|
| deferredLoadTask = new DeferredLoadTask(this),
|
| mirrorUsageAnalyzerTask = new MirrorUsageAnalyzerTask(this),
|
| - enqueuer = new EnqueueTask(this),
|
| + enqueuer = backend.makeEnqueuer(),
|
| dumpInfoTask = new DumpInfoTask(this),
|
| reuseLibraryTask = new GenericTask('Reuse library', this),
|
| ];
|
|
|