Index: dart/sdk/lib/_internal/compiler/implementation/compiler.dart |
diff --git a/dart/sdk/lib/_internal/compiler/implementation/compiler.dart b/dart/sdk/lib/_internal/compiler/implementation/compiler.dart |
index aebbee6df5ee8d25619dc2bbb4c17afd90cb1d99..422608791f753d745deb4fce2440c9439f57a3c6 100644 |
--- a/dart/sdk/lib/_internal/compiler/implementation/compiler.dart |
+++ b/dart/sdk/lib/_internal/compiler/implementation/compiler.dart |
@@ -234,6 +234,9 @@ abstract class Compiler implements DiagnosticListener { |
ClassElement listClass; |
ClassElement typeClass; |
ClassElement mapClass; |
+ ClassElement deferLoadClass; |
+ ClassElement onLibraryLoadedClass; |
+ |
ClassElement jsInvocationMirrorClass; |
/// Document class from dart:mirrors. |
ClassElement documentClass; |
@@ -291,6 +294,7 @@ abstract class Compiler implements DiagnosticListener { |
ConstantHandler metadataHandler; |
EnqueueTask enqueuer; |
CompilerTask fileReadingTask; |
+ DeferredLoadTask deferredLoadTask; |
static const SourceString MAIN = const SourceString('main'); |
static const SourceString CALL_OPERATOR_NAME = const SourceString('call'); |
@@ -369,6 +373,7 @@ abstract class Compiler implements DiagnosticListener { |
checker = new TypeCheckerTask(this), |
typesTask = new ti.TypesTask(this), |
constantHandler = new ConstantHandler(this, backend.constantSystem), |
+ deferredLoadTask = new DeferredLoadTask(this), |
enqueuer = new EnqueueTask(this)]; |
tasks.addAll(backend.tasks); |
@@ -521,6 +526,8 @@ abstract class Compiler implements DiagnosticListener { |
listClass = lookupCoreClass('List'); |
typeClass = lookupCoreClass('Type'); |
mapClass = lookupCoreClass('Map'); |
+ deferLoadClass = lookupCoreClass('DeferLoad'); |
+ onLibraryLoadedClass = lookupCoreClass('OnLibraryLoaded'); |
if (!missingCoreClasses.isEmpty) { |
internalErrorOnElement(coreLibrary, |
'dart:core library does not contain required classes: ' |
@@ -635,6 +642,8 @@ abstract class Compiler implements DiagnosticListener { |
} |
} |
+ deferredLoadTask.registerMainApp(mainApp); |
+ |
log('Resolving...'); |
phase = PHASE_RESOLVING; |
if (analyzeAll) { |