| Index: runtime/lib/mirrors_impl.dart
|
| diff --git a/runtime/lib/mirrors_impl.dart b/runtime/lib/mirrors_impl.dart
|
| index f0d5aa9158ae2a1df04f7478315a9f9bc2d063de..edd532ab2f7176e66041436578d1b572697ddeda 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;
|
| }
|
| @@ -492,7 +492,7 @@ class _LocalClassMirrorImpl extends _LocalObjectMirrorImpl
|
| // Object has no superclass.
|
| return null;
|
| }
|
| - _trueSuperclassField = _Mirrors._reflectType(supertype);
|
| + _trueSuperclassField = reflectType(supertype);
|
| }
|
| return _trueSuperclassField;
|
| }
|
| @@ -504,7 +504,7 @@ class _LocalClassMirrorImpl extends _LocalObjectMirrorImpl
|
| List<ClassMirror> get superinterfaces {
|
| if (_superinterfaces == null) {
|
| _superinterfaces = _interfaces(_reflectee)
|
| - .map((i) => _Mirrors._reflectType(i)).toList(growable:false);
|
| + .map((i) => reflectType(i)).toList(growable:false);
|
| }
|
| return _superinterfaces;
|
| }
|
| @@ -533,7 +533,7 @@ class _LocalClassMirrorImpl extends _LocalObjectMirrorImpl
|
| // The reflectee is not a mixin application.
|
| _mixin = this;
|
| } else {
|
| - _mixin = _Mirrors._reflectType(mixinType);
|
| + _mixin = reflectType(mixinType);
|
| }
|
| }
|
| }
|
| @@ -766,7 +766,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;
|
| }
|
| @@ -852,8 +852,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;
|
| }
|
| @@ -885,10 +884,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));
|
| }
|
| }
|
|
|
| @@ -975,6 +973,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) {
|
| @@ -1101,8 +1107,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);
|
| }
|
| @@ -1198,7 +1203,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;
|
| @@ -1255,8 +1260,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;
|
| @@ -1347,7 +1351,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];
|
| @@ -1361,7 +1365,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);
|
|
|