| Index: runtime/lib/mirrors_impl.dart
|
| diff --git a/runtime/lib/mirrors_impl.dart b/runtime/lib/mirrors_impl.dart
|
| index e6208a9e220f288f35565e47f84cabdd03f46c05..26688f0e79824be2f6ffa0c6881b64413e45086c 100644
|
| --- a/runtime/lib/mirrors_impl.dart
|
| +++ b/runtime/lib/mirrors_impl.dart
|
| @@ -269,7 +269,7 @@ class _LocalInstanceMirrorImpl extends _LocalObjectMirrorImpl
|
| if (_type == null) {
|
| // Note it not safe to use reflectee.runtimeType because runtimeType may
|
| // be overridden.
|
| - _type = _Mirrors._reflectType(_computeType(reflectee));
|
| + _type = reflectType(_computeType(reflectee));
|
| }
|
| return _type;
|
| }
|
| @@ -495,7 +495,7 @@ class _LocalClassMirrorImpl extends _LocalObjectMirrorImpl
|
| // Object has no superclass.
|
| return null;
|
| }
|
| - _trueSuperclassField = _Mirrors._reflectType(supertype);
|
| + _trueSuperclassField = reflectType(supertype);
|
| _trueSuperclassField._instantiator = _instantiator;
|
| }
|
| return _trueSuperclassField;
|
| @@ -511,7 +511,7 @@ class _LocalClassMirrorImpl extends _LocalObjectMirrorImpl
|
| ? _nativeInterfaces(_reflectedType)
|
| : _nativeInterfacesInstantiated(_reflectedType);
|
| _superinterfaces = _superinterfaces
|
| - .map((i) => _Mirrors._reflectType(i)).toList(growable:false);
|
| + .map((i) => reflectType(i)).toList(growable:false);
|
| }
|
| return _superinterfaces;
|
| }
|
| @@ -536,7 +536,7 @@ class _LocalClassMirrorImpl extends _LocalObjectMirrorImpl
|
| Type mixinType = isOriginalDeclaration
|
| ? _nativeMixin(_trueSuperclass._reflectedType)
|
| : _nativeMixinInstantiated(_trueSuperclass._reflectedType, _instantiator);
|
| - _mixin = _Mirrors._reflectType(mixinType);
|
| + _mixin = reflectType(mixinType);
|
| } else {
|
| Type mixinType = isOriginalDeclaration
|
| ? _nativeMixin(_reflectedType)
|
| @@ -545,7 +545,7 @@ class _LocalClassMirrorImpl extends _LocalObjectMirrorImpl
|
| // The reflectee is not a mixin application.
|
| _mixin = this;
|
| } else {
|
| - _mixin = _Mirrors._reflectType(mixinType);
|
| + _mixin = reflectType(mixinType);
|
| }
|
| }
|
| }
|
| @@ -786,7 +786,7 @@ class _LocalFunctionTypeMirrorImpl extends _LocalClassMirrorImpl
|
| TypeMirror get returnType {
|
| if (_returnType == null) {
|
| _returnType =
|
| - _Mirrors._reflectType(_FunctionTypeMirror_return_type(_reflectee));
|
| + reflectType(_FunctionTypeMirror_return_type(_reflectee));
|
| }
|
| return _returnType;
|
| }
|
| @@ -872,8 +872,7 @@ class _LocalTypeVariableMirrorImpl extends _LocalDeclarationMirrorImpl
|
| TypeMirror _upperBound = null;
|
| TypeMirror get upperBound {
|
| if (_upperBound == null) {
|
| - _upperBound =
|
| - _Mirrors._reflectType(_TypeVariableMirror_upper_bound(_reflectee));
|
| + _upperBound = reflectType(_TypeVariableMirror_upper_bound(_reflectee));
|
| }
|
| return _upperBound;
|
| }
|
| @@ -912,10 +911,9 @@ class _LocalTypeVariableMirrorImpl extends _LocalDeclarationMirrorImpl
|
| if (instantiator is! ClassMirror) throw "UNREACHABLE";
|
| if (instantiator.isOriginalDeclaration) return this;
|
|
|
| - return _Mirrors._reflectType(
|
| - _TypeVariableMirror_instantiate_from(
|
| - _reflectee,
|
| - instantiator._reflectedType));
|
| + return reflectType(
|
| + _TypeVariableMirror_instantiate_from(_reflectee,
|
| + instantiator._reflectedType));
|
| }
|
| }
|
|
|
| @@ -1002,6 +1000,14 @@ class _LocalLibraryMirrorImpl extends _LocalObjectMirrorImpl
|
| return _members;
|
| }
|
|
|
| + Map<Symbol, ClassMirror> _types;
|
| + Map<Symbol, TypeMirror> get types {
|
| + if (_types == null) {
|
| + _types = _filterMap(members, (key, value) => (value is TypeMirror));
|
| + }
|
| + return _types;
|
| + }
|
| +
|
| Map<Symbol, ClassMirror> _classes;
|
| Map<Symbol, ClassMirror> get classes {
|
| if (_classes == null) {
|
| @@ -1128,8 +1134,7 @@ class _LocalMethodMirrorImpl extends _LocalDeclarationMirrorImpl
|
| if (isConstructor) {
|
| _returnType = owner;
|
| } else {
|
| - _returnType =
|
| - _Mirrors._reflectType(_MethodMirror_return_type(_reflectee));
|
| + _returnType = reflectType(_MethodMirror_return_type(_reflectee));
|
| }
|
| _returnType = _returnType._instantiateInContextOf(owner);
|
| }
|
| @@ -1225,7 +1230,7 @@ class _LocalVariableMirrorImpl extends _LocalDeclarationMirrorImpl
|
| TypeMirror _type;
|
| TypeMirror get type {
|
| if (_type == null) {
|
| - _type = _Mirrors._reflectType(_VariableMirror_type(_reflectee));
|
| + _type = reflectType(_VariableMirror_type(_reflectee));
|
| _type = _type._instantiateInContextOf(owner);
|
| }
|
| return _type;
|
| @@ -1282,8 +1287,7 @@ class _LocalParameterMirrorImpl extends _LocalVariableMirrorImpl
|
| TypeMirror _type = null;
|
| TypeMirror get type {
|
| if (_type == null) {
|
| - _type =
|
| - _Mirrors._reflectType(_ParameterMirror_type(_reflectee, _position));
|
| + _type = reflectType(_ParameterMirror_type(_reflectee, _position));
|
| _type = _type._instantiateInContextOf(owner);
|
| }
|
| return _type;
|
| @@ -1374,7 +1378,7 @@ class _Mirrors {
|
| native "Mirrors_makeLocalTypeMirror";
|
|
|
| static Expando<ClassMirror> _declarationCache = new Expando("ClassMirror");
|
| - static Expando<ClassMirror> _instanitationCache = new Expando("TypeMirror");
|
| + static Expando<TypeMirror> _instanitationCache = new Expando("TypeMirror");
|
|
|
| static ClassMirror reflectClass(Type key) {
|
| var classMirror = _declarationCache[key];
|
| @@ -1388,7 +1392,7 @@ class _Mirrors {
|
| return classMirror;
|
| }
|
|
|
| - static TypeMirror _reflectType(Type key) {
|
| + static TypeMirror reflectType(Type key) {
|
| var typeMirror = _instanitationCache[key];
|
| if (typeMirror == null) {
|
| typeMirror = makeLocalTypeMirror(key);
|
|
|