Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Unified Diff: pkg/compiler/lib/src/library_loader.dart

Issue 2846433003: Run closed_world2_test using the normal compiler pipeline. (Closed)
Patch Set: Updated cf. comments Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/kernel/native_basic_data.dart ('k') | pkg/compiler/lib/src/mirrors_used.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « pkg/compiler/lib/src/kernel/native_basic_data.dart ('k') | pkg/compiler/lib/src/mirrors_used.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698