Index: runtime/lib/mirrors_impl.dart |
=================================================================== |
--- runtime/lib/mirrors_impl.dart (revision 29812) |
+++ runtime/lib/mirrors_impl.dart (working copy) |
@@ -49,9 +49,10 @@ |
void clear() => _throw(); |
} |
-// These values are allowed to be passed directly over the wire. |
-bool _isSimpleValue(var value) { |
- return (value == null || value is num || value is String || value is bool); |
+class _InternalMirrorError { |
+ const _InternalError(String this._msg); |
+ String toString() => _msg; |
+ final String _msg; |
} |
Map _filterMap(Map<Symbol, dynamic> old_map, bool filter(Symbol key, value)) { |
@@ -216,19 +217,6 @@ |
value); |
return reflect(value); |
} |
- |
- static _validateArgument(int i, Object arg) |
- { |
- if (arg is Mirror) { |
- if (arg is! InstanceMirror) { |
- throw new MirrorException( |
- 'positional argument $i ($arg) was not an InstanceMirror'); |
- } |
- } else if (!_isSimpleValue(arg)) { |
- throw new MirrorException( |
- 'positional argument $i ($arg) was not a simple value'); |
- } |
- } |
} |
class _LocalInstanceMirrorImpl extends _LocalObjectMirrorImpl |
@@ -1252,7 +1240,7 @@ |
} else { |
var parts = MirrorSystem.getName(simpleName).split('.'); |
if (parts.length > 2) { |
- throw new MirrorException( |
+ throw new _InternalMirrorError( |
'Internal error in MethodMirror.constructorName: ' |
'malformed name <$simpleName>'); |
} else if (parts.length == 2) { |