| 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 // These values are allowed to be passed directly over the wire. | 9 // These values are allowed to be passed directly over the wire. |
| 10 bool _isSimpleValue(var value) { | 10 bool _isSimpleValue(var value) { |
| (...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1000 } else if (parts.length == 2) { | 1000 } else if (parts.length == 2) { |
| 1001 _constructorName = _s(parts[1]); | 1001 _constructorName = _s(parts[1]); |
| 1002 } else { | 1002 } else { |
| 1003 _constructorName = _s(''); | 1003 _constructorName = _s(''); |
| 1004 } | 1004 } |
| 1005 } | 1005 } |
| 1006 } | 1006 } |
| 1007 return _constructorName; | 1007 return _constructorName; |
| 1008 } | 1008 } |
| 1009 | 1009 |
| 1010 String _source = null; |
| 1011 String get source { |
| 1012 if (_source == null) { |
| 1013 _source = _MethodMirror_source(_reflectee); |
| 1014 } |
| 1015 return _source; |
| 1016 } |
| 1017 |
| 1010 String toString() => "MethodMirror on '${_n(simpleName)}'"; | 1018 String toString() => "MethodMirror on '${_n(simpleName)}'"; |
| 1011 | 1019 |
| 1012 static dynamic _MethodMirror_owner(reflectee) | 1020 static dynamic _MethodMirror_owner(reflectee) |
| 1013 native "MethodMirror_owner"; | 1021 native "MethodMirror_owner"; |
| 1014 | 1022 |
| 1015 static dynamic _MethodMirror_return_type(reflectee) | 1023 static dynamic _MethodMirror_return_type(reflectee) |
| 1016 native "MethodMirror_return_type"; | 1024 native "MethodMirror_return_type"; |
| 1017 | 1025 |
| 1018 List<ParameterMirror> _MethodMirror_parameters(reflectee) | 1026 List<ParameterMirror> _MethodMirror_parameters(reflectee) |
| 1019 native "MethodMirror_parameters"; | 1027 native "MethodMirror_parameters"; |
| 1028 |
| 1029 static String _MethodMirror_source(reflectee) |
| 1030 native "MethodMirror_source"; |
| 1020 } | 1031 } |
| 1021 | 1032 |
| 1022 class _LocalVariableMirrorImpl extends _LocalDeclarationMirrorImpl | 1033 class _LocalVariableMirrorImpl extends _LocalDeclarationMirrorImpl |
| 1023 implements VariableMirror { | 1034 implements VariableMirror { |
| 1024 _LocalVariableMirrorImpl(reflectee, | 1035 _LocalVariableMirrorImpl(reflectee, |
| 1025 String simpleName, | 1036 String simpleName, |
| 1026 this.owner, | 1037 this.owner, |
| 1027 this._type, | 1038 this._type, |
| 1028 this.isStatic, | 1039 this.isStatic, |
| 1029 this.isFinal) | 1040 this.isFinal) |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1210 if (typeMirror == null) { | 1221 if (typeMirror == null) { |
| 1211 typeMirror = makeLocalTypeMirror(key); | 1222 typeMirror = makeLocalTypeMirror(key); |
| 1212 _instanitationCache[key] = typeMirror; | 1223 _instanitationCache[key] = typeMirror; |
| 1213 if (typeMirror is ClassMirror && !typeMirror._isGeneric) { | 1224 if (typeMirror is ClassMirror && !typeMirror._isGeneric) { |
| 1214 _declarationCache[key] = typeMirror; | 1225 _declarationCache[key] = typeMirror; |
| 1215 } | 1226 } |
| 1216 } | 1227 } |
| 1217 return typeMirror; | 1228 return typeMirror; |
| 1218 } | 1229 } |
| 1219 } | 1230 } |
| OLD | NEW |