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

Unified Diff: sdk/lib/mirrors/mirrors.dart

Issue 1095903002: Deal with deferred loading in the VM mirrors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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
Index: sdk/lib/mirrors/mirrors.dart
diff --git a/sdk/lib/mirrors/mirrors.dart b/sdk/lib/mirrors/mirrors.dart
index db7594d829ae1db9b396c5802470c22edd369251..e61638ae70b951baeddef6a67ef092d598366e29 100644
--- a/sdk/lib/mirrors/mirrors.dart
+++ b/sdk/lib/mirrors/mirrors.dart
@@ -55,6 +55,8 @@
*/
library dart.mirrors;
+import 'dart:async' show Future;
+
/**
* A [MirrorSystem] is the main interface used to reflect on a set of
* associated libraries.
@@ -612,7 +614,8 @@ abstract class LibraryDependencyMirror implements Mirror {
/// [targetLibrary].
LibraryMirror get sourceLibrary;
- /// Returns the library mirror of the library that is imported or exported.
+ /// Returns the library mirror of the library that is imported or exported,
+ /// or null if the library is not loaded.
LibraryMirror get targetLibrary;
/// Returns the prefix if this is a prefixed import and `null` otherwise.
@@ -626,6 +629,11 @@ abstract class LibraryDependencyMirror implements Mirror {
SourceLocation get location;
List<InstanceMirror> get metadata;
+
+ /// Returns a future that completes with a library mirror on the library being
+ /// imported or exported when it is loaded, and initiates a load of that
+ /// library if it is not loaded.
+ Future<LibraryMirror> loadLibrary();
}
/// A mirror on a show/hide combinator declared on a library dependency.

Powered by Google App Engine
This is Rietveld 408576698