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

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..5ae77f5a1b3be63d7bdf8ec0903ad24c25c7f834 100644
--- a/sdk/lib/_internal/compiler/implementation/library_loader.dart
+++ b/sdk/lib/_internal/compiler/implementation/library_loader.dart
@@ -556,6 +556,12 @@ class ImportLink {
if (combinatorFilter.exclude(element)) return;
prefixElement.addImport(element, import, compiler);
});
+ if (import.isDeferred) {
+ prefixElement.addImport(
+ new DeferredLoaderFunctionElementX(prefixElement),
+ import, compiler);
+ prefixElement.markAsDeferred(import);
Johnni Winther 2014/03/18 12:29:14 Add a TODO to make (a deferred) [import] an argume
sigurdm 2014/03/20 12:26:33 Done.
+ }
} else {
importedLibrary.forEachExport((Element element) {
compiler.withCurrentElement(importingLibrary, () {

Powered by Google App Engine
This is Rietveld 408576698