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 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1352 } | 1352 } |
1353 } | 1353 } |
1354 } | 1354 } |
1355 return _constructorName; | 1355 return _constructorName; |
1356 } | 1356 } |
1357 | 1357 |
1358 String _source = null; | 1358 String _source = null; |
1359 String get source { | 1359 String get source { |
1360 if (_source == null) { | 1360 if (_source == null) { |
1361 _source = _MethodMirror_source(_reflectee); | 1361 _source = _MethodMirror_source(_reflectee); |
1362 assert(_source != null); | |
1363 } | 1362 } |
1364 return _source; | 1363 return _source; |
1365 } | 1364 } |
1366 | 1365 |
1367 void _patchConstructorName(ownerName) { | 1366 void _patchConstructorName(ownerName) { |
1368 var cn = _n(constructorName); | 1367 var cn = _n(constructorName); |
1369 if(cn == ''){ | 1368 if(cn == ''){ |
1370 _simpleName = _s(ownerName); | 1369 _simpleName = _s(ownerName); |
1371 } else { | 1370 } else { |
1372 _simpleName = _s(ownerName + "." + cn); | 1371 _simpleName = _s(ownerName + "." + cn); |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1581 if (typeMirror == null) { | 1580 if (typeMirror == null) { |
1582 typeMirror = makeLocalTypeMirror(key); | 1581 typeMirror = makeLocalTypeMirror(key); |
1583 _instanitationCache[key] = typeMirror; | 1582 _instanitationCache[key] = typeMirror; |
1584 if (typeMirror is ClassMirror && !typeMirror._isGeneric) { | 1583 if (typeMirror is ClassMirror && !typeMirror._isGeneric) { |
1585 _declarationCache[key] = typeMirror; | 1584 _declarationCache[key] = typeMirror; |
1586 } | 1585 } |
1587 } | 1586 } |
1588 return typeMirror; | 1587 return typeMirror; |
1589 } | 1588 } |
1590 } | 1589 } |
OLD | NEW |