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 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 | 398 |
399 static _computeFindInContext(reflectee, name) | 399 static _computeFindInContext(reflectee, name) |
400 native 'ClosureMirror_find_in_context'; | 400 native 'ClosureMirror_find_in_context'; |
401 } | 401 } |
402 | 402 |
403 class _LocalClassMirrorImpl extends _LocalObjectMirrorImpl | 403 class _LocalClassMirrorImpl extends _LocalObjectMirrorImpl |
404 implements ClassMirror { | 404 implements ClassMirror { |
405 _LocalClassMirrorImpl(reflectee, | 405 _LocalClassMirrorImpl(reflectee, |
406 reflectedType, | 406 reflectedType, |
407 String simpleName, | 407 String simpleName, |
| 408 this._owner, |
408 this._isGeneric, | 409 this._isGeneric, |
409 this._isMixinTypedef, | 410 this._isMixinTypedef, |
410 this._isGenericDeclaration) | 411 this._isGenericDeclaration) |
411 : this._simpleName = _s(simpleName), | 412 : this._simpleName = _s(simpleName), |
412 this._reflectedType = reflectedType, | 413 this._reflectedType = reflectedType, |
413 this._instantiator = reflectedType, | 414 this._instantiator = reflectedType, |
414 super(reflectee); | 415 super(reflectee); |
415 | 416 |
416 final Type _reflectedType; | 417 final Type _reflectedType; |
417 final bool _isGeneric; | 418 final bool _isGeneric; |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
752 static _ClassMirror_type_variables(reflectee) | 753 static _ClassMirror_type_variables(reflectee) |
753 native "ClassMirror_type_variables"; | 754 native "ClassMirror_type_variables"; |
754 | 755 |
755 static _computeTypeArguments(reflectee) | 756 static _computeTypeArguments(reflectee) |
756 native "ClassMirror_type_arguments"; | 757 native "ClassMirror_type_arguments"; |
757 } | 758 } |
758 | 759 |
759 class _LocalFunctionTypeMirrorImpl extends _LocalClassMirrorImpl | 760 class _LocalFunctionTypeMirrorImpl extends _LocalClassMirrorImpl |
760 implements FunctionTypeMirror { | 761 implements FunctionTypeMirror { |
761 _LocalFunctionTypeMirrorImpl(reflectee, reflectedType) | 762 _LocalFunctionTypeMirrorImpl(reflectee, reflectedType) |
762 : super(reflectee, reflectedType, null, false, false, false); | 763 : super(reflectee, reflectedType, null, null, false, false, false); |
763 | 764 |
764 bool get _isAnonymousMixinApplication => false; | 765 bool get _isAnonymousMixinApplication => false; |
765 | 766 |
766 // FunctionTypeMirrors have a simpleName generated from their signature. | 767 // FunctionTypeMirrors have a simpleName generated from their signature. |
767 Symbol _simpleName = null; | 768 Symbol _simpleName = null; |
768 Symbol get simpleName { | 769 Symbol get simpleName { |
769 if (_simpleName == null) { | 770 if (_simpleName == null) { |
770 _simpleName = _s(_makeSignatureString(returnType, parameters)); | 771 _simpleName = _s(_makeSignatureString(returnType, parameters)); |
771 } | 772 } |
772 return _simpleName; | 773 return _simpleName; |
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1468 if (typeMirror == null) { | 1469 if (typeMirror == null) { |
1469 typeMirror = makeLocalTypeMirror(key); | 1470 typeMirror = makeLocalTypeMirror(key); |
1470 _instanitationCache[key] = typeMirror; | 1471 _instanitationCache[key] = typeMirror; |
1471 if (typeMirror is ClassMirror && !typeMirror._isGeneric) { | 1472 if (typeMirror is ClassMirror && !typeMirror._isGeneric) { |
1472 _declarationCache[key] = typeMirror; | 1473 _declarationCache[key] = typeMirror; |
1473 } | 1474 } |
1474 } | 1475 } |
1475 return typeMirror; | 1476 return typeMirror; |
1476 } | 1477 } |
1477 } | 1478 } |
OLD | NEW |