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

Unified Diff: sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart

Issue 17759007: First pass at asynchronous input loading in dart2js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments Created 7 years, 3 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/dart_backend/backend.dart
diff --git a/sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart b/sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart
index aaab842dba57ac41dab2c878bf8fcf9d479a9e5a..13a215950f4be00ea14a6282a75b3c471b759e6a 100644
--- a/sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart
@@ -505,15 +505,19 @@ class DartBackend extends Backend {
log(String message) => compiler.log('[DartBackend] $message');
- void onLibraryLoaded(LibraryElement library, Uri uri) {
+ Future onLibraryLoaded(LibraryElement library, Uri uri) {
if (useMirrorHelperLibrary && library == compiler.mirrorsLibrary) {
- mirrorHelperLibrary = compiler.scanBuiltinLibrary(
- MirrorRenamer.MIRROR_HELPER_LIBRARY_NAME);
- mirrorHelperGetNameFunction = mirrorHelperLibrary.find(
- const SourceString(MirrorRenamer.MIRROR_HELPER_GET_NAME_FUNCTION));
- mirrorHelperSymbolsMap = mirrorHelperLibrary.find(
- const SourceString(MirrorRenamer.MIRROR_HELPER_SYMBOLS_MAP_NAME));
+ return compiler.scanBuiltinLibrary(
+ MirrorRenamer.MIRROR_HELPER_LIBRARY_NAME).
+ then((LibraryElement element) {
+ mirrorHelperLibrary = element;
+ mirrorHelperGetNameFunction = mirrorHelperLibrary.find(
+ const SourceString(MirrorRenamer.MIRROR_HELPER_GET_NAME_FUNCTION));
+ mirrorHelperSymbolsMap = mirrorHelperLibrary.find(
+ const SourceString(MirrorRenamer.MIRROR_HELPER_SYMBOLS_MAP_NAME));
+ });
}
+ return new Future.value();
}
void registerStaticSend(Element element, Node node) {

Powered by Google App Engine
This is Rietveld 408576698