| Index: pkg/compiler/lib/src/library_loader.dart
|
| diff --git a/pkg/compiler/lib/src/library_loader.dart b/pkg/compiler/lib/src/library_loader.dart
|
| index 64879395edf2db6c9dc902e980f3a1833bde2282..12b91c4dc872c390c8bb57e9ab4672d2cc8088c1 100644
|
| --- a/pkg/compiler/lib/src/library_loader.dart
|
| +++ b/pkg/compiler/lib/src/library_loader.dart
|
| @@ -846,20 +846,24 @@ class DillLibraryLoaderTask extends CompilerTask implements LibraryLoaderTask {
|
| bytes.removeLast();
|
| new BinaryBuilder(bytes).readProgram(program);
|
| return measure(() {
|
| - _elementMap.addProgram(program);
|
| - program.libraries.forEach((ir.Library library) => _allLoadedLibraries
|
| - .add(_elementMap.lookupLibrary(library.importUri)));
|
| - LibraryEntity rootLibrary = null;
|
| - if (program.mainMethod != null) {
|
| - rootLibrary = _elementMap
|
| - .lookupLibrary(program.mainMethod.enclosingLibrary.importUri);
|
| - }
|
| - return new _LoadedLibrariesAdapter(
|
| - rootLibrary, _allLoadedLibraries, _elementMap);
|
| + return createLoadedLibraries(program);
|
| });
|
| });
|
| }
|
|
|
| + LoadedLibraries createLoadedLibraries(ir.Program program) {
|
| + _elementMap.addProgram(program);
|
| + program.libraries.forEach((ir.Library library) =>
|
| + _allLoadedLibraries.add(_elementMap.lookupLibrary(library.importUri)));
|
| + LibraryEntity rootLibrary = null;
|
| + if (program.mainMethod != null) {
|
| + rootLibrary = _elementMap
|
| + .lookupLibrary(program.mainMethod.enclosingLibrary.importUri);
|
| + }
|
| + return new _LoadedLibrariesAdapter(
|
| + rootLibrary, _allLoadedLibraries, _elementMap);
|
| + }
|
| +
|
| KernelToElementMap get elementMap => _elementMap;
|
|
|
| void reset({bool reuseLibrary(LibraryElement library)}) {
|
| @@ -885,9 +889,7 @@ class DillLibraryLoaderTask extends CompilerTask implements LibraryLoaderTask {
|
| 'DillLibraryLoaderTask.registerDeferredAction');
|
| }
|
|
|
| - Iterable<DeferredAction> pullDeferredActions() {
|
| - throw new UnimplementedError('DillLibraryLoaderTask.pullDeferredActions');
|
| - }
|
| + Iterable<DeferredAction> pullDeferredActions() => const <DeferredAction>[];
|
| }
|
|
|
| /// A state machine for checking script tags come in the correct order.
|
|
|