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

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

Issue 16757007: Changes to mirrors in support of metadata access at runtime. Assumes VM changes in flight.… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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
« runtime/lib/mirrors_impl.dart ('K') | « runtime/lib/mirrors_impl.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/mirrors/mirrors.dart
===================================================================
--- sdk/lib/mirrors/mirrors.dart (revision 23823)
+++ sdk/lib/mirrors/mirrors.dart (working copy)
@@ -112,8 +112,7 @@
/**
* Returns an [InstanceMirror] for some Dart language object.
*
- * This only works if this mirror system is associated with the
- * current running isolate.
+ * This only works with objects local to the current isolate.
*/
external InstanceMirror reflect(Object reflectee);
@@ -225,6 +224,15 @@
/**
* A list of the metadata associated with this declaration.
+ *
+ * Let D be the declaration this mirror reflects.
+ * If D is decorated with annotations A1, ..., An
ahe 2013/06/11 08:48:10 Add * around the greek.
gbracha 2013/06/12 21:21:18 Done.
+ * where n > 0, then for each annotation Ai associated
+ * with D, 1 <= i <= n, let ci be the constant object
+ * specified by Ai. Then this method returns a list whose
+ * members are instance mirrors on c1, ..., cn.
+ * If no annotations are associated with D, then
+ * an empty list is returned.
*/
List<InstanceMirror> get metadata;
}
@@ -309,7 +317,7 @@
* the the result is a [MirrorError] wrapping *e*.
*/
/* TODO(turnidge): Handle ambiguous names.*/
- InstanceMirror setField(Symbol fieldName, Object arg);
+ InstanceMirror setField(Symbol fieldName, Object value);
/**
* Invokes the named function and returns a mirror on the result.
@@ -345,8 +353,8 @@
* TODO(turnidge): Handle optional & named arguments.
*/
Future<InstanceMirror> invokeAsync(Symbol memberName,
- List<Object> positionalArguments,
- [Map<Symbol, Object> namedArguments]);
+ List positionalArguments,
+ [Map<Symbol, dynamic> namedArguments]);
/**
* Invokes a getter and returns a mirror on the result. The getter
@@ -373,7 +381,7 @@
* Invokes a setter and returns a mirror on the result. The setter
* may be either the implicit setter for a non-final field or a
* user-defined setter method.
- * The argument must be an instance of [InstanceMirror], or of
+ * The second argument must be an instance of [InstanceMirror], or of
* a type that is serializable across isolates (currently [num],
* [String], or [bool]).
*
@@ -481,8 +489,8 @@
* If the invocation throws an exception *e* (that it does not catch)
* the the result is a [MirrorError] wrapping *e*.
*/
- InstanceMirror apply(List<Object> positionalArguments,
- [Map<Symbol,Object> namedArguments]);
+ InstanceMirror apply(List positionalArguments,
+ [Map<Symbol,dynamic> namedArguments]);
ahe 2013/06/11 08:48:10 Add space after comma.
gbracha 2013/06/12 21:21:18 Done.
/**
* Executes the closure and returns a mirror on the result.
@@ -511,8 +519,8 @@
* a type that is serializable across isolates (currently [num],
* [String], or [bool]).
*/
- Future<InstanceMirror> applyAsync(List<Object> positionalArguments,
- [Map<Symbol, Object> namedArguments]);
+ Future<InstanceMirror> applyAsync(List positionalArguments,
+ [Map<Symbol, dynamic> namedArguments]);
/**
* Looks up the value of a name in the scope of the closure. The
@@ -754,8 +762,8 @@
* then *k* is completed with a [MirrorError] wrapping *e*.
*/
Future<InstanceMirror> newInstanceAsync(Symbol constructorName,
- List<Object> positionalArguments,
- [Map<Symbol, Object> namedArguments]);
+ List positionalArguments,
+ [Map<Symbol, dynamic> namedArguments]);
/**
* Does this mirror represent a class?
« runtime/lib/mirrors_impl.dart ('K') | « runtime/lib/mirrors_impl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698