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

Unified Diff: dart/sdk/lib/_internal/lib/js_mirrors.dart

Issue 23455028: Mirrors overhaul. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r29550. Created 7 years, 2 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: dart/sdk/lib/_internal/lib/js_mirrors.dart
diff --git a/dart/sdk/lib/_internal/lib/js_mirrors.dart b/dart/sdk/lib/_internal/lib/js_mirrors.dart
index ca1628ff113982a21a9851da928615718a35c0d0..f22a170a4d6483421f77c1ea579e9dcf6f65a771 100644
--- a/dart/sdk/lib/_internal/lib/js_mirrors.dart
+++ b/dart/sdk/lib/_internal/lib/js_mirrors.dart
@@ -76,9 +76,8 @@ class JsMirrorSystem implements MirrorSystem {
new UnmodifiableMapView<Uri, LibraryMirror>(result);
}
- Iterable<LibraryMirror> findLibrary(Symbol libraryName) {
- return new UnmodifiableListView<LibraryMirror>(
- librariesByName[n(libraryName)]);
+ LibraryMirror findLibrary(Symbol libraryName) {
+ return librariesByName[n(libraryName)].single;
}
static Map<String, List<LibraryMirror>> computeLibrariesByName() {
@@ -629,15 +628,20 @@ class JsMixinApplication extends JsTypeMirror with JsObjectMirror
Symbol get qualifiedName => simpleName;
- Map<Symbol, Mirror> get members => mixin.members;
+ // TODO(ahe): Remove this method, only here to silence warning.
+ get _mixin => mixin;
- Map<Symbol, MethodMirror> get methods => mixin.methods;
+ Map<Symbol, Mirror> get members => _mixin.members;
- Map<Symbol, MethodMirror> get getters => mixin.getters;
+ Map<Symbol, MethodMirror> get methods => _mixin.methods;
- Map<Symbol, MethodMirror> get setters => mixin.setters;
+ Map<Symbol, MethodMirror> get getters => _mixin.getters;
- Map<Symbol, VariableMirror> get variables => mixin.variables;
+ Map<Symbol, MethodMirror> get setters => _mixin.setters;
+
+ Map<Symbol, VariableMirror> get variables => _mixin.variables;
+
+ Map<Symbol, DeclarationMirror> get declarations => mixin.declarations;
InstanceMirror invoke(
Symbol memberName,
@@ -660,7 +664,7 @@ class JsMixinApplication extends JsTypeMirror with JsObjectMirror
List<ClassMirror> get superinterfaces => [mixin];
- Map<Symbol, MethodMirror> get constructors => mixin.constructors;
+ Map<Symbol, MethodMirror> get constructors => _mixin.constructors;
InstanceMirror newInstance(
Symbol constructorName,
« no previous file with comments | « dart/sdk/lib/_internal/dartdoc/lib/src/json_serializer.dart ('k') | dart/sdk/lib/_internal/pub/lib/src/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698