| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import "dart:nativewrappers"; | 5 import "dart:nativewrappers"; |
| 6 // TODO(ahe): Move _symbol_dev.Symbol to its own "private" library? | 6 // TODO(ahe): Move _symbol_dev.Symbol to its own "private" library? |
| 7 import "dart:_collection-dev" as _symbol_dev; | 7 import "dart:_collection-dev" as _symbol_dev; |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * Returns a [MirrorSystem] for the current isolate. | 10 * Returns a [MirrorSystem] for the current isolate. |
| 11 */ | 11 */ |
| 12 patch MirrorSystem currentMirrorSystem() { | 12 patch MirrorSystem currentMirrorSystem() { |
| 13 return _Mirrors.currentMirrorSystem(); | 13 return _Mirrors.currentMirrorSystem(); |
| 14 } | 14 } |
| 15 | 15 |
| 16 /** | 16 /** |
| 17 * Creates a [MirrorSystem] for the isolate which is listening on | |
| 18 * the [SendPort]. | |
| 19 */ | |
| 20 Future<MirrorSystem> mirrorSystemOf(SendPort port) { | |
| 21 return _Mirrors.mirrorSystemOf(port); | |
| 22 } | |
| 23 | |
| 24 /** | |
| 25 * Returns an [InstanceMirror] for some Dart language object. | 17 * Returns an [InstanceMirror] for some Dart language object. |
| 26 * | 18 * |
| 27 * This only works if this mirror system is associated with the | 19 * This only works if this mirror system is associated with the |
| 28 * current running isolate. | 20 * current running isolate. |
| 29 */ | 21 */ |
| 30 patch InstanceMirror reflect(Object reflectee) { | 22 patch InstanceMirror reflect(Object reflectee) { |
| 31 return _Mirrors.reflect(reflectee); | 23 return _Mirrors.reflect(reflectee); |
| 32 } | 24 } |
| 33 | 25 |
| 34 /** | 26 /** |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 // TODO(rmacnak): Eliminate this class. | 61 // TODO(rmacnak): Eliminate this class. |
| 70 class MirroredCompilationError { | 62 class MirroredCompilationError { |
| 71 final String message; | 63 final String message; |
| 72 | 64 |
| 73 MirroredCompilationError(this.message); | 65 MirroredCompilationError(this.message); |
| 74 | 66 |
| 75 String toString() { | 67 String toString() { |
| 76 return "Compile-time error during mirrored execution: <$message>"; | 68 return "Compile-time error during mirrored execution: <$message>"; |
| 77 } | 69 } |
| 78 } | 70 } |
| OLD | NEW |