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

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

Issue 1273983002: Hoist InstanceMirror.delegate to ObjectMirror. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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 d0f8379bd9537abdd6fba6492c71571712bd2ce5..3480cdeb608a5ed821ca5570feb275f4f3a42a25 100644
--- a/sdk/lib/mirrors/mirrors.dart
+++ b/sdk/lib/mirrors/mirrors.dart
@@ -446,6 +446,23 @@ abstract class ObjectMirror implements Mirror {
*/
/* TODO(turnidge): Handle ambiguous names.*/
InstanceMirror setField(Symbol fieldName, Object value);
+
+ /**
+ * Perform [invocation] on [reflectee].
+ * Equivalent to
+ *
+ * if (invocation.isGetter) {
+ * return this.getField(invocation.memberName).reflectee;
+ * } else if (invocation.isSetter) {
+ * return this.setField(invocation.memberName,
+ * invocation.positionArguments[0]).reflectee;
+ * } else {
+ * return this.invoke(invocation.memberName,
+ * invocation.positionalArguments,
+ * invocation.namedArguments).reflectee;
+ * }
+ */
+ delegate(Invocation invocation);
}
/**
@@ -499,23 +516,6 @@ abstract class InstanceMirror implements ObjectMirror {
* by [other] are identical.
*/
bool operator == (other);
-
- /**
- * Perform [invocation] on [reflectee].
- * Equivalent to
- *
- * if (invocation.isGetter) {
- * return this.getField(invocation.memberName).reflectee;
- * } else if (invocation.isSetter) {
- * return this.setField(invocation.memberName,
- * invocation.positionArguments[0]).reflectee;
- * } else {
- * return this.invoke(invocation.memberName,
- * invocation.positionalArguments,
- * invocation.namedArguments).reflectee;
- * }
- */
- delegate(Invocation invocation);
}
/**

Powered by Google App Engine
This is Rietveld 408576698