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" show UnmodifiableListView, UnmodifiableMapView; | 7 import "dart:collection" show UnmodifiableListView, UnmodifiableMapView; |
8 import "dart:async" show Future; | 8 import "dart:async" show Future; |
9 | 9 |
10 var dirty = false; | 10 var dirty = false; |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 class _SyntheticSetterParameter implements ParameterMirror { | 317 class _SyntheticSetterParameter implements ParameterMirror { |
318 final DeclarationMirror owner; | 318 final DeclarationMirror owner; |
319 final VariableMirror _target; | 319 final VariableMirror _target; |
320 | 320 |
321 _SyntheticSetterParameter(this.owner, this._target); | 321 _SyntheticSetterParameter(this.owner, this._target); |
322 | 322 |
323 Symbol get simpleName => _target.simpleName; | 323 Symbol get simpleName => _target.simpleName; |
324 Symbol get qualifiedName => _computeQualifiedName(owner, simpleName); | 324 Symbol get qualifiedName => _computeQualifiedName(owner, simpleName); |
325 TypeMirror get type => _target.type; | 325 TypeMirror get type => _target.type; |
326 | 326 |
| 327 bool get isInitializingFormal => false; |
327 bool get isOptional => false; | 328 bool get isOptional => false; |
328 bool get isNamed => false; | 329 bool get isNamed => false; |
329 bool get isStatic => false; | 330 bool get isStatic => false; |
330 bool get isTopLevel => false; | 331 bool get isTopLevel => false; |
331 bool get isConst => false; | 332 bool get isConst => false; |
332 bool get isFinal => true; | 333 bool get isFinal => true; |
333 bool get isPrivate => false; | 334 bool get isPrivate => false; |
334 bool get hasDefaultValue => false; | 335 bool get hasDefaultValue => false; |
335 InstanceMirror get defaultValue => null; | 336 InstanceMirror get defaultValue => null; |
336 SourceLocation get location => null; | 337 SourceLocation get location => null; |
(...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1507 | 1508 |
1508 String toString() => "VariableMirror on '${MirrorSystem.getName(simpleName)}'"
; | 1509 String toString() => "VariableMirror on '${MirrorSystem.getName(simpleName)}'"
; |
1509 | 1510 |
1510 static _VariableMirror_type(reflectee, instantiator) | 1511 static _VariableMirror_type(reflectee, instantiator) |
1511 native "VariableMirror_type"; | 1512 native "VariableMirror_type"; |
1512 } | 1513 } |
1513 | 1514 |
1514 class _LocalParameterMirror extends _LocalVariableMirror | 1515 class _LocalParameterMirror extends _LocalVariableMirror |
1515 implements ParameterMirror { | 1516 implements ParameterMirror { |
1516 final int _position; | 1517 final int _position; |
| 1518 final bool isInitializingFormal; |
1517 final bool isOptional; | 1519 final bool isOptional; |
1518 final bool isNamed; | 1520 final bool isNamed; |
1519 final List _unmirroredMetadata; | 1521 final List _unmirroredMetadata; |
1520 | 1522 |
1521 _LocalParameterMirror(reflectee, | 1523 _LocalParameterMirror(reflectee, |
1522 String simpleName, | 1524 String simpleName, |
1523 DeclarationMirror owner, | 1525 DeclarationMirror owner, |
1524 this._position, | 1526 this._position, |
1525 this.isOptional, | 1527 this.isOptional, |
1526 this.isNamed, | 1528 this.isNamed, |
1527 bool isFinal, | 1529 bool isFinal, |
1528 this._defaultValueReflectee, | 1530 this._defaultValueReflectee, |
1529 this._unmirroredMetadata) | 1531 this._unmirroredMetadata, |
| 1532 this.isInitializingFormal) |
1530 : super(reflectee, | 1533 : super(reflectee, |
1531 simpleName, | 1534 simpleName, |
1532 owner, | 1535 owner, |
1533 null, // We override the type. | 1536 null, // We override the type. |
1534 false, // isStatic does not apply. | 1537 false, // isStatic does not apply. |
1535 isFinal, | 1538 isFinal, |
1536 false // Not const. | 1539 false // Not const. |
1537 ); | 1540 ); |
1538 | 1541 |
1539 Object _defaultValueReflectee; | 1542 Object _defaultValueReflectee; |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1664 if (typeMirror == null) { | 1667 if (typeMirror == null) { |
1665 typeMirror = makeLocalTypeMirror(key); | 1668 typeMirror = makeLocalTypeMirror(key); |
1666 _instanitationCache[key] = typeMirror; | 1669 _instanitationCache[key] = typeMirror; |
1667 if (typeMirror is ClassMirror && !typeMirror._isGeneric) { | 1670 if (typeMirror is ClassMirror && !typeMirror._isGeneric) { |
1668 _declarationCache[key] = typeMirror; | 1671 _declarationCache[key] = typeMirror; |
1669 } | 1672 } |
1670 } | 1673 } |
1671 return typeMirror; | 1674 return typeMirror; |
1672 } | 1675 } |
1673 } | 1676 } |
OLD | NEW |