Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(700)

Unified Diff: runtime/lib/mirrors_impl.dart

Issue 24005002: Make TypedefMirror a direct descendant of TypeMirror. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/lib/mirrors.cc ('k') | runtime/lib/mirrors_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/mirrors_impl.dart
diff --git a/runtime/lib/mirrors_impl.dart b/runtime/lib/mirrors_impl.dart
index 844b6a82d93b40f465ce0aafba07ac675772326b..abbf95c223093a37cbd0357c0f70616a29fefddc 100644
--- a/runtime/lib/mirrors_impl.dart
+++ b/runtime/lib/mirrors_impl.dart
@@ -285,7 +285,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;
}
@@ -516,7 +516,7 @@ class _LocalClassMirrorImpl extends _LocalObjectMirrorImpl
// Object has no superclass.
return null;
}
- _trueSuperclassField = _Mirrors._reflectType(supertype);
+ _trueSuperclassField = reflectType(supertype);
}
return _trueSuperclassField;
}
@@ -528,7 +528,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;
}
@@ -557,7 +557,7 @@ class _LocalClassMirrorImpl extends _LocalObjectMirrorImpl
// The reflectee is not a mixin application.
_mixin = this;
} else {
- _mixin = _Mirrors._reflectType(mixinType);
+ _mixin = reflectType(mixinType);
}
}
}
@@ -789,7 +789,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;
}
@@ -877,7 +877,7 @@ class _LocalTypeVariableMirrorImpl extends _LocalDeclarationMirrorImpl
TypeMirror get upperBound {
if (_upperBound == null) {
_upperBound =
- _Mirrors._reflectType(_TypeVariableMirror_upper_bound(_reflectee));
+ reflectType(_TypeVariableMirror_upper_bound(_reflectee));
}
return _upperBound;
}
@@ -982,12 +982,21 @@ class _LocalLibraryMirrorImpl extends _LocalObjectMirrorImpl
return _members;
}
+ Map<Symbol, ClassMirror> _types = null;
Map<Symbol, ClassMirror> _classes = null;
Map<Symbol, MethodMirror> _functions = null;
Map<Symbol, MethodMirror> _getters = null;
Map<Symbol, MethodMirror> _setters = null;
Map<Symbol, VariableMirror> _variables = null;
+ Map<Symbol, TypeMirror> get types {
+ if (_types == null) {
+ _types = _filterMap(members,
Michael Lippautz (Google) 2013/09/06 16:58:40 weird alignment
+ (key, value) => (value is TypeMirror));
+ }
+ return _types;
+ }
+
Map<Symbol, ClassMirror> get classes {
if (_classes == null) {
_classes = _filterMap(members,
@@ -1116,7 +1125,7 @@ class _LocalMethodMirrorImpl extends _LocalDeclarationMirrorImpl
_returnType = owner;
} else {
_returnType =
Michael Lippautz (Google) 2013/09/06 16:58:40 fits on prev line?
- _Mirrors._reflectType(_MethodMirror_return_type(_reflectee));
+ reflectType(_MethodMirror_return_type(_reflectee));
}
}
return _returnType;
@@ -1214,7 +1223,7 @@ class _LocalVariableMirrorImpl extends _LocalDeclarationMirrorImpl
TypeMirror _type;
TypeMirror get type {
if (_type == null) {
- _type = _Mirrors._reflectType(_VariableMirror_type(_reflectee));
+ _type = reflectType(_VariableMirror_type(_reflectee));
}
return _type;
}
@@ -1274,7 +1283,7 @@ class _LocalParameterMirrorImpl extends _LocalVariableMirrorImpl
TypeMirror get type {
if (_type == null) {
_type =
Michael Lippautz (Google) 2013/09/06 16:58:40 ditto
- _Mirrors._reflectType(_ParameterMirror_type(_reflectee, _position));
+ reflectType(_ParameterMirror_type(_reflectee, _position));
}
return _type;
}
@@ -1367,7 +1376,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];
@@ -1381,7 +1390,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);
« no previous file with comments | « runtime/lib/mirrors.cc ('k') | runtime/lib/mirrors_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698