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

Unified Diff: lib/runtime/dart/_js_mirrors.js

Issue 1489043002: More mirrors (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 5 years 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 | « no previous file | tool/input_sdk/private/js_mirrors.dart » ('j') | tool/input_sdk/private/js_mirrors.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/dart/_js_mirrors.js
diff --git a/lib/runtime/dart/_js_mirrors.js b/lib/runtime/dart/_js_mirrors.js
index 7488d5461cc5063c3732dd27f4fe923ad33fd2a3..9e2c5c7f4e75ff39369359f072b144e57dfd6af5 100644
--- a/lib/runtime/dart/_js_mirrors.js
+++ b/lib/runtime/dart/_js_mirrors.js
@@ -135,8 +135,9 @@ dart_library.library('dart/_js_mirrors', null, /* Imports */[
let interfaces = this[_cls][dart.implements];
if (interfaces == null) {
return dart.list([], mirrors.ClassMirror);
+ } else {
+ return dart.as(dart.dsend(dart.dcall(interfaces), 'map', dart.fn(t => new JsClassMirror._(dart.as(t, core.Type)), JsClassMirror, [dart.dynamic])), core.List$(mirrors.ClassMirror));
}
- dart.throw(new core.UnimplementedError("ClassMirror.superinterfaces unimplemented"));
}
getField(fieldName) {
return dart.throw(new core.UnimplementedError("ClassMirror.getField unimplemented"));
@@ -186,7 +187,7 @@ dart_library.library('dart/_js_mirrors', null, /* Imports */[
return dart.throw(new core.UnimplementedError("ClassMirror.mixin unimplemented"));
}
get originalDeclaration() {
- return dart.throw(new core.UnimplementedError("ClassMirror.originalDeclaration unimplemented"));
+ return this;
}
get owner() {
return dart.throw(new core.UnimplementedError("ClassMirror.owner unimplemented"));
@@ -195,13 +196,17 @@ dart_library.library('dart/_js_mirrors', null, /* Imports */[
return dart.throw(new core.UnimplementedError("ClassMirror.qualifiedName unimplemented"));
}
get reflectedType() {
- return dart.throw(new core.UnimplementedError("ClassMirror.reflectedType unimplemented"));
+ return this[_cls];
}
get staticMembers() {
return dart.throw(new core.UnimplementedError("ClassMirror.staticMembers unimplemented"));
}
get superclass() {
- return dart.throw(new core.UnimplementedError("ClassMirror.superclass unimplemented"));
+ if (dart.equals(this[_cls], core.Object)) {
+ return null;
+ } else {
+ return new JsClassMirror._(this[_cls].__proto__);
+ }
}
get typeArguments() {
return dart.throw(new core.UnimplementedError("ClassMirror.typeArguments unimplemented"));
@@ -414,7 +419,7 @@ dart_library.library('dart/_js_mirrors', null, /* Imports */[
return dart.throw(new core.UnimplementedError("MethodMirror.location unimplemented"));
}
get metadata() {
- return dart.throw(new core.UnimplementedError("MethodMirror.metadata unimplemented"));
+ return dart.list([], mirrors.InstanceMirror);
}
get owner() {
return dart.throw(new core.UnimplementedError("MethodMirror.owner unimplemented"));
« no previous file with comments | « no previous file | tool/input_sdk/private/js_mirrors.dart » ('j') | tool/input_sdk/private/js_mirrors.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698