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 library mirrors_dart2js; | 5 library mirrors_dart2js; |
6 | 6 |
7 import 'dart:io'; | 7 import 'dart:io'; |
8 import 'dart:uri'; | 8 import 'dart:uri'; |
9 | 9 |
10 import '../../compiler.dart' as diagnostics; | 10 import '../../compiler.dart' as diagnostics; |
(...skipping 1153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1164 | 1164 |
1165 bool get isAbstract => originalDeclaration.isAbstract; | 1165 bool get isAbstract => originalDeclaration.isAbstract; |
1166 | 1166 |
1167 bool get isPrivate => originalDeclaration.isPrivate; | 1167 bool get isPrivate => originalDeclaration.isPrivate; |
1168 | 1168 |
1169 bool get isOriginalDeclaration => false; | 1169 bool get isOriginalDeclaration => false; |
1170 | 1170 |
1171 List<TypeMirror> get typeArguments { | 1171 List<TypeMirror> get typeArguments { |
1172 if (_typeArguments == null) { | 1172 if (_typeArguments == null) { |
1173 _typeArguments = <TypeMirror>[]; | 1173 _typeArguments = <TypeMirror>[]; |
1174 Link<DartType> type = _interfaceType.typeArguments; | 1174 if (!_interfaceType.isRaw) { |
1175 while (type != null && type.head != null) { | 1175 Link<DartType> type = _interfaceType.typeArguments; |
1176 _typeArguments.add(_convertTypeToTypeMirror(mirrors, type.head, | 1176 while (type != null && type.head != null) { |
1177 mirrors.compiler.types.dynamicType)); | 1177 _typeArguments.add(_convertTypeToTypeMirror(mirrors, type.head, |
1178 type = type.tail; | 1178 mirrors.compiler.types.dynamicType)); |
| 1179 type = type.tail; |
| 1180 } |
1179 } | 1181 } |
1180 } | 1182 } |
1181 return _typeArguments; | 1183 return _typeArguments; |
1182 } | 1184 } |
1183 | 1185 |
1184 List<TypeVariableMirror> get typeVariables => | 1186 List<TypeVariableMirror> get typeVariables => |
1185 originalDeclaration.typeVariables; | 1187 originalDeclaration.typeVariables; |
1186 | 1188 |
1187 // TODO(johnniwinther): Substitute type arguments for type variables. | 1189 // TODO(johnniwinther): Substitute type arguments for type variables. |
1188 Map<String, MethodMirror> get constructors => | 1190 Map<String, MethodMirror> get constructors => |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1553 var node = _variable.variables.parseNode(_diagnosticListener); | 1555 var node = _variable.variables.parseNode(_diagnosticListener); |
1554 if (node != null) { | 1556 if (node != null) { |
1555 var span = mirrors.compiler.spanFromNode(node, script.uri); | 1557 var span = mirrors.compiler.spanFromNode(node, script.uri); |
1556 return new Dart2JsSourceLocation(script, span); | 1558 return new Dart2JsSourceLocation(script, span); |
1557 } else { | 1559 } else { |
1558 var span = mirrors.compiler.spanFromElement(_variable); | 1560 var span = mirrors.compiler.spanFromElement(_variable); |
1559 return new Dart2JsSourceLocation(script, span); | 1561 return new Dart2JsSourceLocation(script, span); |
1560 } | 1562 } |
1561 } | 1563 } |
1562 } | 1564 } |
OLD | NEW |