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:_internal" as _symbol_dev; | 5 import "dart:_internal" as _symbol_dev; |
6 | 6 |
7 /** | 7 /** |
8 * Returns a [MirrorSystem] for the current isolate. | 8 * Returns a [MirrorSystem] for the current isolate. |
9 */ | 9 */ |
10 patch MirrorSystem currentMirrorSystem() { | 10 patch MirrorSystem currentMirrorSystem() { |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 ((name.length > 0) && (name[0] == '_') && (library == null))) { | 94 ((name.length > 0) && (name[0] == '_') && (library == null))) { |
95 throw new ArgumentError(library); | 95 throw new ArgumentError(library); |
96 } | 96 } |
97 if (library != null) name = _mangleName(name, library._reflectee); | 97 if (library != null) name = _mangleName(name, library._reflectee); |
98 return new _symbol_dev.Symbol.unvalidated(name); | 98 return new _symbol_dev.Symbol.unvalidated(name); |
99 } | 99 } |
100 | 100 |
101 static _mangleName(String name, _MirrorReference lib) | 101 static _mangleName(String name, _MirrorReference lib) |
102 native "Mirrors_mangleName"; | 102 native "Mirrors_mangleName"; |
103 } | 103 } |
104 | |
105 // TODO(rmacnak): Eliminate this class. | |
106 class MirroredCompilationError { | |
107 final String message; | |
108 | |
109 MirroredCompilationError(this.message); | |
110 | |
111 String toString() { | |
112 return "Compile-time error during mirrored execution: <$message>"; | |
113 } | |
114 } | |
OLD | NEW |