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

Unified Diff: runtime/lib/mirrors_impl.dart

Issue 154733003: Access to imports in the VM's runtime mirrors. Extend test coverage of the source mirrors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: sync Created 6 years, 10 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
« no previous file with comments | « runtime/lib/mirrors.cc ('k') | runtime/vm/bootstrap_natives.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/mirrors_impl.dart
diff --git a/runtime/lib/mirrors_impl.dart b/runtime/lib/mirrors_impl.dart
index f527df78f99fbf22317d7b165d9282c6bec723f3..f58113998955a9d4214fae9dc67b2becea968404 100644
--- a/runtime/lib/mirrors_impl.dart
+++ b/runtime/lib/mirrors_impl.dart
@@ -1297,6 +1297,17 @@ class _LocalLibraryMirror extends _LocalObjectMirror implements LibraryMirror {
return new _InvocationTrampoline(this, selector);
}
+ var _cachedLibraryDependencies;
+ get libraryDependencies {
+ if (_cachedLibraryDependencies == null) {
+ _cachedLibraryDependencies = _libraryDependencies(_reflectee);
+ }
+ return _cachedLibraryDependencies;
+ }
+
+ _libraryDependencies(reflectee)
+ native 'LibraryMirror_libraryDependencies';
+
_invoke(reflectee, memberName, arguments, argumentNames)
native 'LibraryMirror_invoke';
@@ -1310,6 +1321,37 @@ class _LocalLibraryMirror extends _LocalObjectMirror implements LibraryMirror {
native "LibraryMirror_members";
}
+class _LocalLibraryDependencyMirror
+ extends _LocalMirror implements LibraryDependencyMirror {
+ final LibraryMirror sourceLibrary;
+ final LibraryMirror targetLibrary;
+ final List<CombinatorMirror> combinators;
+ final Symbol prefix;
+ final bool isImport;
+ final List<InstanceMirror> metadata;
+
+ _LocalLibraryDependencyMirror(this.sourceLibrary,
+ this.targetLibrary,
+ this.combinators,
+ prefixString,
+ this.isImport,
+ unwrappedMetadata)
+ : prefix = _s(prefixString),
+ metadata = new UnmodifiableListView(unwrappedMetadata.map(reflect));
+
+ bool get isExport => !isImport;
+}
+
+class _LocalCombinatorMirror extends _LocalMirror implements CombinatorMirror {
+ final List<Symbol> identifiers;
+ final bool isShow;
+
+ _LocalCombinatorMirror(identifierString, this.isShow)
+ : this.identifiers = [_s(identifierString)];
+
+ bool get isHide => !isShow;
+}
+
class _LocalMethodMirror extends _LocalDeclarationMirror
implements MethodMirror {
final bool isStatic;
« no previous file with comments | « runtime/lib/mirrors.cc ('k') | runtime/vm/bootstrap_natives.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698