| Index: runtime/lib/mirrors_patch.dart
|
| diff --git a/runtime/lib/mirrors_patch.dart b/runtime/lib/mirrors_patch.dart
|
| index 25c9232f718e934ea879b1c7b4ef8062f60106bd..c168026810456469b4375502ed9f222898b6f9e7 100644
|
| --- a/runtime/lib/mirrors_patch.dart
|
| +++ b/runtime/lib/mirrors_patch.dart
|
| @@ -9,8 +9,7 @@ import "dart:_internal" as internal;
|
| /**
|
| * Returns a [MirrorSystem] for the current isolate.
|
| */
|
| -@patch
|
| -MirrorSystem currentMirrorSystem() {
|
| +@patch MirrorSystem currentMirrorSystem() {
|
| return _Mirrors.currentMirrorSystem();
|
| }
|
|
|
| @@ -20,8 +19,7 @@ MirrorSystem currentMirrorSystem() {
|
| * This only works if this mirror system is associated with the
|
| * current running isolate.
|
| */
|
| -@patch
|
| -InstanceMirror reflect(Object reflectee) {
|
| +@patch InstanceMirror reflect(Object reflectee) {
|
| return _Mirrors.reflect(reflectee);
|
| }
|
|
|
| @@ -31,20 +29,16 @@ InstanceMirror reflect(Object reflectee) {
|
| *
|
| * This only works with objects local to the current isolate.
|
| */
|
| -@patch
|
| -ClassMirror reflectClass(Type key) {
|
| +@patch ClassMirror reflectClass(Type key) {
|
| return _Mirrors.reflectClass(key);
|
| }
|
|
|
| -@patch
|
| -TypeMirror reflectType(Type key, [List<Type> typeArguments]) {
|
| +@patch TypeMirror reflectType(Type key, [List<Type> typeArguments]) {
|
| return _Mirrors.reflectType(key, typeArguments);
|
| }
|
|
|
| -@patch
|
| -class MirrorSystem {
|
| - @patch
|
| - LibraryMirror findLibrary(Symbol libraryName) {
|
| +@patch class MirrorSystem {
|
| + @patch LibraryMirror findLibrary(Symbol libraryName) {
|
| var candidates =
|
| libraries.values.where((lib) => lib.simpleName == libraryName);
|
| if (candidates.length == 1) {
|
| @@ -53,18 +47,16 @@ class MirrorSystem {
|
| if (candidates.length > 1) {
|
| var uris = candidates.map((lib) => lib.uri.toString()).toList();
|
| throw new Exception("There are multiple libraries named "
|
| - "'${getName(libraryName)}': $uris");
|
| + "'${getName(libraryName)}': $uris");
|
| }
|
| throw new Exception("There is no library named '${getName(libraryName)}'");
|
| }
|
|
|
| - @patch
|
| - static String getName(Symbol symbol) {
|
| + @patch static String getName(Symbol symbol) {
|
| return internal.Symbol.getUnmangledName(symbol);
|
| }
|
|
|
| - @patch
|
| - static Symbol getSymbol(String name, [LibraryMirror library]) {
|
| + @patch static Symbol getSymbol(String name, [LibraryMirror library]) {
|
| if ((library != null && library is! _LocalLibraryMirror) ||
|
| ((name.length > 0) && (name[0] == '_') && (library == null))) {
|
| throw new ArgumentError(library);
|
|
|