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

Unified Diff: runtime/lib/mirrors_impl.dart

Issue 13967003: EAKING CHANGE: Rename InstanceMIrror.invoke, .getField, .setField to invokeAsync, getFieldAsync, se… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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: runtime/lib/mirrors_impl.dart
===================================================================
--- runtime/lib/mirrors_impl.dart (revision 21161)
+++ runtime/lib/mirrors_impl.dart (working copy)
@@ -118,7 +118,7 @@
return _rootLibrary;
}
- String toString() => "IsolateMirror on '$debugName'";
+ String toString() => "IsolateMirror on '$debugName'";
Ivan Posva 2013/04/10 00:30:10 Line ends in white space.
}
// A VMReference is used to hold a reference to a VM-internal object,
@@ -140,13 +140,39 @@
implements ObjectMirror {
_LocalObjectMirrorImpl(ref) : super(ref) {}
- Future<InstanceMirror> invoke(String memberName,
+/* TODO: uncomment and correct
+InstanceMirror invoke(String memberName,
List positionalArguments,
[Map<String,dynamic> namedArguments]) {
if (namedArguments != null) {
throw new UnimplementedError(
'named argument support is not implemented');
}
+ return _invoke(this, memberName, positionalArguments)); // needs to be distinct for sync calls
+ }
+
+
+
+ InstanceMirror getField(String fieldName)
+ {
+ return _getField(this, fieldName); // needs to be distinct for sync calls
Ivan Posva 2013/04/10 00:30:10 Please replace tab with spaces eventually.
+ }
+
+ InstanceMirror setField(String fieldName, Object arg)
+ {
+ return (_setField(this, fieldName, arg); // needs to be distinct for sync calls
+ }
+
+
+*/
+
+Future<InstanceMirror> invokeAsync(String memberName,
+ List positionalArguments,
Ivan Posva 2013/04/10 00:30:10 Indentation.
+ [Map<String,dynamic> namedArguments]) {
+ if (namedArguments != null) {
+ throw new UnimplementedError(
+ 'named argument support is not implemented');
+ }
// Walk the arguments and make sure they are legal.
for (int i = 0; i < positionalArguments.length; i++) {
var arg = positionalArguments[i];
@@ -162,7 +188,7 @@
return completer.future;
}
- Future<InstanceMirror> getField(String fieldName)
+ Future<InstanceMirror> getFieldAsync(String fieldName)
{
Completer<InstanceMirror> completer = new Completer<InstanceMirror>();
try {
@@ -173,7 +199,7 @@
return completer.future;
}
- Future<InstanceMirror> setField(String fieldName, Object arg)
+ Future<InstanceMirror> setFieldAsync(String fieldName, Object arg)
{
_validateArgument(0, arg);
@@ -305,7 +331,7 @@
'ClosureMirror.source is not implemented');
}
- Future<InstanceMirror> apply(List<Object> positionalArguments,
+ Future<InstanceMirror> applyAsync(List<Object> positionalArguments,
[Map<String,Object> namedArguments]) {
Ivan Posva 2013/04/10 00:30:10 Indentation.
if (namedArguments != null) {
throw new UnimplementedError(
@@ -501,7 +527,7 @@
String toString() => "ClassMirror on '$simpleName'";
- Future<InstanceMirror> newInstance(String constructorName,
+ Future<InstanceMirror> newInstanceAsync(String constructorName,
List positionalArguments,
Ivan Posva 2013/04/10 00:30:10 Indentation.
[Map<String,dynamic> namedArguments]) {
if (namedArguments != null) {
@@ -970,4 +996,10 @@
static InstanceMirror reflect(Object reflectee) {
return makeLocalInstanceMirror(reflectee);
}
+
+ static ClassMirror reflectClass(Type reflectee) {
+ throw new UnimplementedError('reflectClass is not implemented');
+ }
+
+
}

Powered by Google App Engine
This is Rietveld 408576698