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

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

Issue 201613006: Introduces the new syntax for deferred loading (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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 7daad88fd66af583eaa230139b6ead656d084a66..0c1a8d2168e2f89a36c7f1abc2683cdf4e99d008 100644
--- a/sdk/lib/_internal/compiler/implementation/library_loader.dart
+++ b/sdk/lib/_internal/compiler/implementation/library_loader.dart
@@ -556,6 +556,15 @@ class ImportLink {
if (combinatorFilter.exclude(element)) return;
prefixElement.addImport(element, import, compiler);
});
+ if (import.isDeferred) {
+ prefixElement.addImport(
+ new DeferredLoaderGetterElementX(prefixElement),
+ import, compiler);
+ // TODO(sigurdm): When we remove support for the annotation based
+ // syntax the [PrefixElement] constructor should receive this
+ // information.
+ prefixElement.markAsDeferred(import);
+ }
} else {
importedLibrary.forEachExport((Element element) {
compiler.withCurrentElement(importingLibrary, () {

Powered by Google App Engine
This is Rietveld 408576698