Chromium Code Reviews| 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 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 718 String simpleName, | 718 String simpleName, |
| 719 this._owner, | 719 this._owner, |
| 720 this._referent) | 720 this._referent) |
| 721 : this.simpleName = _s(simpleName), | 721 : this.simpleName = _s(simpleName), |
| 722 super(reflectee); | 722 super(reflectee); |
| 723 | 723 |
| 724 final Symbol simpleName; | 724 final Symbol simpleName; |
| 725 | 725 |
| 726 Symbol _qualifiedName = null; | 726 Symbol _qualifiedName = null; |
| 727 Symbol get qualifiedName { | 727 Symbol get qualifiedName { |
| 728 if (_owner == null) { | |
| 729 _owner = _LocalClassMirrorImpl._library(_reflectee); | |
| 730 } | |
|
siva
2013/07/19 21:06:07
Why not put this code in 'get owner' so that we ar
rmacnak
2013/07/19 21:11:39
Yikes, mistake in moving from one checkout to anot
| |
| 728 if (_qualifiedName == null) { | 731 if (_qualifiedName == null) { |
| 729 _qualifiedName = _computeQualifiedName(owner, simpleName); | 732 _qualifiedName = _computeQualifiedName(owner, simpleName); |
| 730 } | 733 } |
| 731 return _qualifiedName; | 734 return _qualifiedName; |
| 732 } | 735 } |
| 733 | 736 |
| 734 var _owner; | 737 var _owner; |
| 735 DeclarationMirror get owner { | 738 DeclarationMirror get owner { |
| 736 if (_owner is! Mirror) { | 739 if (_owner is! Mirror) { |
| 737 _owner = _owner.resolve(mirrors); | 740 _owner = _owner.resolve(mirrors); |
| (...skipping 400 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 |