| 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 // VM-specific implementation of the dart:mirrors library. | 5 // VM-specific implementation of the dart:mirrors library. |
| 6 | 6 |
| 7 import "dart:collection"; | 7 import "dart:collection"; |
| 8 | 8 |
| 9 final emptyList = new UnmodifiableListView([]); | 9 final emptyList = new UnmodifiableListView([]); |
| 10 final emptyMap = new _UnmodifiableMapView({}); | 10 final emptyMap = new _UnmodifiableMapView({}); |
| (...skipping 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1210 if (_constructorName == null) { | 1210 if (_constructorName == null) { |
| 1211 if (!isConstructor) { | 1211 if (!isConstructor) { |
| 1212 _constructorName = _s(''); | 1212 _constructorName = _s(''); |
| 1213 } else { | 1213 } else { |
| 1214 var parts = MirrorSystem.getName(simpleName).split('.'); | 1214 var parts = MirrorSystem.getName(simpleName).split('.'); |
| 1215 if (parts.length > 2) { | 1215 if (parts.length > 2) { |
| 1216 throw new _InternalMirrorError( | 1216 throw new _InternalMirrorError( |
| 1217 'Internal error in MethodMirror.constructorName: ' | 1217 'Internal error in MethodMirror.constructorName: ' |
| 1218 'malformed name <$simpleName>'); | 1218 'malformed name <$simpleName>'); |
| 1219 } else if (parts.length == 2) { | 1219 } else if (parts.length == 2) { |
| 1220 _constructorName = _s(parts[1]); | 1220 LibraryMirror definingLibrary = owner.owner; |
| 1221 _constructorName = MirrorSystem.getSymbol(parts[1], definingLibrary); |
| 1221 } else { | 1222 } else { |
| 1222 _constructorName = _s(''); | 1223 _constructorName = _s(''); |
| 1223 } | 1224 } |
| 1224 } | 1225 } |
| 1225 } | 1226 } |
| 1226 return _constructorName; | 1227 return _constructorName; |
| 1227 } | 1228 } |
| 1228 | 1229 |
| 1229 String _source = null; | 1230 String _source = null; |
| 1230 String get source { | 1231 String get source { |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1452 if (typeMirror == null) { | 1453 if (typeMirror == null) { |
| 1453 typeMirror = makeLocalTypeMirror(key); | 1454 typeMirror = makeLocalTypeMirror(key); |
| 1454 _instanitationCache[key] = typeMirror; | 1455 _instanitationCache[key] = typeMirror; |
| 1455 if (typeMirror is ClassMirror && !typeMirror._isGeneric) { | 1456 if (typeMirror is ClassMirror && !typeMirror._isGeneric) { |
| 1456 _declarationCache[key] = typeMirror; | 1457 _declarationCache[key] = typeMirror; |
| 1457 } | 1458 } |
| 1458 } | 1459 } |
| 1459 return typeMirror; | 1460 return typeMirror; |
| 1460 } | 1461 } |
| 1461 } | 1462 } |
| OLD | NEW |