| 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 // These values are allowed to be passed directly over the wire. | 7 // These values are allowed to be passed directly over the wire. |
| 8 bool _isSimpleValue(var value) { | 8 bool _isSimpleValue(var value) { |
| 9 return (value == null || value is num || value is String || value is bool); | 9 return (value == null || value is num || value is String || value is bool); |
| 10 } | 10 } |
| (...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 726 Symbol _qualifiedName = null; | 726 Symbol _qualifiedName = null; |
| 727 Symbol get qualifiedName { | 727 Symbol get qualifiedName { |
| 728 if (_qualifiedName == null) { | 728 if (_qualifiedName == null) { |
| 729 _qualifiedName = _computeQualifiedName(owner, simpleName); | 729 _qualifiedName = _computeQualifiedName(owner, simpleName); |
| 730 } | 730 } |
| 731 return _qualifiedName; | 731 return _qualifiedName; |
| 732 } | 732 } |
| 733 | 733 |
| 734 var _owner; | 734 var _owner; |
| 735 DeclarationMirror get owner { | 735 DeclarationMirror get owner { |
| 736 if (_owner == null) { |
| 737 _owner = _LocalClassMirrorImpl._library(_reflectee); |
| 738 } |
| 736 if (_owner is! Mirror) { | 739 if (_owner is! Mirror) { |
| 737 _owner = _owner.resolve(mirrors); | 740 _owner = _owner.resolve(mirrors); |
| 738 } | 741 } |
| 739 return _owner; | 742 return _owner; |
| 740 } | 743 } |
| 741 | 744 |
| 742 bool get isPrivate => false; | 745 bool get isPrivate => false; |
| 743 | 746 |
| 744 final bool isTopLevel = true; | 747 final bool isTopLevel = true; |
| 745 | 748 |
| (...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1138 static Expando<ClassMirror> _classMirrorCache = new Expando("ClassMirror"); | 1141 static Expando<ClassMirror> _classMirrorCache = new Expando("ClassMirror"); |
| 1139 static ClassMirror reflectClass(Type key) { | 1142 static ClassMirror reflectClass(Type key) { |
| 1140 var classMirror = _classMirrorCache[key]; | 1143 var classMirror = _classMirrorCache[key]; |
| 1141 if (classMirror == null) { | 1144 if (classMirror == null) { |
| 1142 classMirror = makeLocalClassMirror(key); | 1145 classMirror = makeLocalClassMirror(key); |
| 1143 _classMirrorCache[key] = classMirror; | 1146 _classMirrorCache[key] = classMirror; |
| 1144 } | 1147 } |
| 1145 return classMirror; | 1148 return classMirror; |
| 1146 } | 1149 } |
| 1147 } | 1150 } |
| OLD | NEW |