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

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

Issue 23441073: Implement closurization of regular methods in ObjectMirror.getField in the VM. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address comments Created 7 years, 3 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/vm/resolver.cc ('k') | tests/lib/lib.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/mirrors/mirrors.dart
diff --git a/sdk/lib/mirrors/mirrors.dart b/sdk/lib/mirrors/mirrors.dart
index f6fc7faf243d2bf5e0aa720dc40889f92e78a1e5..3737d4a2b3ca345506bd96891cd50944059eb3c1 100644
--- a/sdk/lib/mirrors/mirrors.dart
+++ b/sdk/lib/mirrors/mirrors.dart
@@ -339,6 +339,19 @@ abstract class ObjectMirror implements Mirror {
* in a scope that has access to the private members
* of *o* (if *o* is a class or library) or the private members of the
* class of *o* (otherwise).
+ *
+ * If this mirror is an [InstanceMirror], and [fieldName] denotes an instance
+ * method on its reflectee, the result of the invocation is an instance
+ * mirror on a closure corresponding to that method.
+ *
+ * If this mirror is a [LibraryMirror], and [fieldName] denotes a top-level
+ * method in the corresponding library, the result of the invocation is an
+ * instance mirror on a closure corresponding to that method.
+ *
+ * If this mirror is a [ClassMirror], and [fieldName] denotes a static method
+ * in the corresponding class, the result of the invocation is an instance
+ * mirror on a closure corresponding to that method.
+ *
* If the invocation returns a result *r*, this method returns
* the result of calling [reflect](*r*).
* If the invocation causes a compilation error
@@ -421,6 +434,19 @@ abstract class ObjectMirror implements Mirror {
* in a scope that has access to the private members
* of *o* (if *o* is a class or library) or the private members of the
* class of *o*(otherwise).
+ *
+ * If this mirror is an [InstanceMirror], and [fieldName] denotes an instance
+ * method on its reflectee, the result of the invocation is an instance
+ * mirror on a closure corresponding to that method.
+ *
+ * If this mirror is a [LibraryMirror], and [fieldName] denotes a top-level
+ * method in the corresponding library, the result of the invocation is an
+ * instance mirror on a closure corresponding to that method.
+ *
+ * If this mirror is a [ClassMirror], and [fieldName] denotes a static method
+ * in the corresponding class, the result of the invocation is an instance
+ * mirror on a closure corresponding to that method.
+ *
* The method returns a future *k*.
* If the invocation returns a result *r*, *k* will be completed
* with the result of calling [reflect](*r*).
« no previous file with comments | « runtime/vm/resolver.cc ('k') | tests/lib/lib.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698