| Index: lib/compiler/implementation/compiler.dart
|
| diff --git a/lib/compiler/implementation/compiler.dart b/lib/compiler/implementation/compiler.dart
|
| index c316b5c551d46de15b61ba2de4ac126b1ea1f123..5aa454b39a26cf8c807110c9b146a4ee535428b4 100644
|
| --- a/lib/compiler/implementation/compiler.dart
|
| +++ b/lib/compiler/implementation/compiler.dart
|
| @@ -383,22 +383,24 @@ class Compiler implements DiagnosticListener {
|
| initializeSpecialClasses();
|
| }
|
|
|
| - void importCoreLibrary(LibraryElement library) {
|
| + /**
|
| + * Lazily loads and returns the [LibraryElement] for the dart:core library.
|
| + */
|
| + LibraryElement importCoreLibrary(ImportExportHandler handler) {
|
| Uri coreUri = new Uri.fromComponents(scheme: 'dart', path: 'core');
|
| if (coreLibrary === null) {
|
| - coreLibrary = scanner.loadLibrary(coreUri, null, coreUri);
|
| + coreLibrary =
|
| + scanner.loadLibraryInternal(handler, coreUri, null, coreUri);
|
| }
|
| - scanner.importLibrary(library,
|
| - coreLibrary,
|
| - null,
|
| - library.entryCompilationUnit);
|
| + return coreLibrary;
|
| }
|
|
|
| - void patchDartLibrary(LibraryElement library, String dartLibraryPath) {
|
| + void patchDartLibrary(ImportExportHandler handler,
|
| + LibraryElement library, String dartLibraryPath) {
|
| if (library.isPatched) return;
|
| Uri patchUri = resolvePatchUri(dartLibraryPath);
|
| if (patchUri !== null) {
|
| - patchParser.patchLibrary(patchUri, library);
|
| + patchParser.patchLibrary(handler, patchUri, library);
|
| }
|
| }
|
|
|
|
|