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

Unified Diff: sdk/lib/_internal/compiler/implementation/library_loader.dart

Issue 23258002: Load builtin helper libraries on demand. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments. Created 7 years, 4 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
Index: sdk/lib/_internal/compiler/implementation/library_loader.dart
diff --git a/sdk/lib/_internal/compiler/implementation/library_loader.dart b/sdk/lib/_internal/compiler/implementation/library_loader.dart
index 8f4f224a52dd305fdc4e27fcc83a5e3da7295ebb..a0401d090b036edc7c3693848166645c2e45ca60 100644
--- a/sdk/lib/_internal/compiler/implementation/library_loader.dart
+++ b/sdk/lib/_internal/compiler/implementation/library_loader.dart
@@ -220,6 +220,7 @@ class HideFilter extends CombinatorFilter {
class LibraryLoaderTask extends LibraryLoader {
LibraryLoaderTask(Compiler compiler) : super(compiler);
String get name => 'LibraryLoader';
+ List onLibraryLoadedCallbacks = [];
final Map<String, LibraryElement> libraryNames =
new LinkedHashMap<String, LibraryElement>();
@@ -234,6 +235,9 @@ class LibraryLoaderTask extends LibraryLoader {
createLibrary(currentHandler, null, resolvedUri, node, canonicalUri);
currentHandler.computeExports();
currentHandler = null;
+ var workList = onLibraryLoadedCallbacks;
+ onLibraryLoadedCallbacks = [];
+ workList.forEach((f) => f());
return library;
});
}
@@ -433,7 +437,8 @@ class LibraryLoaderTask extends LibraryLoader {
compiler.scanner.scanLibrary(library);
processLibraryTags(handler, library);
handler.registerLibraryExports(library);
- compiler.onLibraryScanned(library, resolvedUri);
+ onLibraryLoadedCallbacks.add(
+ () => compiler.onLibraryLoaded(library, resolvedUri));
});
}
return library;

Powered by Google App Engine
This is Rietveld 408576698