| Index: sdk/lib/_internal/lib/js_mirrors.dart
|
| diff --git a/sdk/lib/_internal/lib/js_mirrors.dart b/sdk/lib/_internal/lib/js_mirrors.dart
|
| index d6bb7eef747e9b12a1fe958b5715685a8c8cbcb0..1b68a3a18b316a83a52ed100f29c7a32b8dba330 100644
|
| --- a/sdk/lib/_internal/lib/js_mirrors.dart
|
| +++ b/sdk/lib/_internal/lib/js_mirrors.dart
|
| @@ -27,8 +27,7 @@ import 'dart:_js_helper' show
|
| getMangledTypeName,
|
| throwInvalidReflectionError,
|
| hasReflectableProperty,
|
| - runtimeTypeToString,
|
| - TypeVariable;
|
| + runtimeTypeToString;
|
| import 'dart:_interceptors' show
|
| Interceptor,
|
| JSExtendableArray;
|
| @@ -182,13 +181,11 @@ abstract class JsDeclarationMirror extends JsMirror
|
| }
|
|
|
| class JsTypeVariableMirror extends JsTypeMirror implements TypeVariableMirror {
|
| + final TypeMirror upperBound;
|
| final DeclarationMirror owner;
|
| - final TypeVariable _typeVariable;
|
| - TypeMirror _cachedUpperBound;
|
|
|
| - JsTypeVariableMirror(TypeVariable typeVariable, this.owner)
|
| - : this._typeVariable = typeVariable,
|
| - super(s(typeVariable.name));
|
| + JsTypeVariableMirror(Symbol simpleName, this.upperBound, this.owner)
|
| + : super(simpleName);
|
|
|
| bool operator ==(other) {
|
| return (other is JsTypeVariableMirror &&
|
| @@ -204,12 +201,6 @@ class JsTypeVariableMirror extends JsTypeMirror implements TypeVariableMirror {
|
| }
|
|
|
| String get _prettyName => 'TypeVariableMirror';
|
| -
|
| - TypeMirror get upperBound {
|
| - if (_cachedUpperBound != null) return _cachedUpperBound;
|
| - return _cachedUpperBound = typeMirrorFromRuntimeTypeRepresentation(
|
| - JS('', 'init.metadata[#]', _typeVariable.bound));
|
| - }
|
| }
|
|
|
| class JsTypeMirror extends JsDeclarationMirror implements TypeMirror {
|
| @@ -836,7 +827,6 @@ class JsTypeBoundClassMirror implements ClassMirror {
|
| List<TypeMirror> get typeArguments {
|
| if (_typeArgs is! String) return _typeArgs;
|
| List result = new List();
|
| -
|
| if (_typeArgs.indexOf('<') == -1) {
|
| for (String s in _typeArgs.split(',')) {
|
| result.add(reflectClassByMangledName(s.trim()));
|
| @@ -1330,9 +1320,13 @@ class JsClassMirror extends JsTypeMirror with JsObjectMirror
|
| List typeVars =
|
| JS('JSExtendableArray|Null', '#.prototype["<>"]', _jsConstructor);
|
| if (typeVars == null) return result;
|
| - for (int i = 0; i < typeVars.length; i++) {
|
| - TypeVariable typeVariable = JS('', 'init.metadata[#]', typeVars[i]);
|
| - result.add(new JsTypeVariableMirror(typeVariable, this));
|
| + for (int i = 0; i < typeVars.length; i += 2) {
|
| + TypeMirror upperBound =
|
| + typeMirrorFromRuntimeTypeRepresentation(JS('', 'init.metadata[#]',
|
| + typeVars[i+1]));
|
| + var typeMirror =
|
| + new JsTypeVariableMirror(s(typeVars[i]), upperBound, this);
|
| + result.add(typeMirror);
|
| }
|
| return _cachedTypeVariables = new UnmodifiableListView(result);
|
| }
|
|
|