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('../../compiler/compiler.dart', prefix: 'diagnostics'); | 7 #import('../../compiler/compiler.dart', prefix: 'diagnostics'); |
8 #import('../../compiler/implementation/elements/elements.dart'); | 8 #import('../../compiler/implementation/elements/elements.dart'); |
9 #import('../../compiler/implementation/apiimpl.dart', prefix: 'api'); | 9 #import('../../compiler/implementation/apiimpl.dart', prefix: 'api'); |
10 #import('../../compiler/implementation/scanner/scannerlib.dart'); | 10 #import('../../compiler/implementation/scanner/scannerlib.dart'); |
(...skipping 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1014 | 1014 |
1015 bool get isInterface() => declaration.isInterface; | 1015 bool get isInterface() => declaration.isInterface; |
1016 | 1016 |
1017 bool get isPrivate() => declaration.isPrivate; | 1017 bool get isPrivate() => declaration.isPrivate; |
1018 | 1018 |
1019 bool get isDeclaration() => false; | 1019 bool get isDeclaration() => false; |
1020 | 1020 |
1021 List<TypeMirror> typeArguments() { | 1021 List<TypeMirror> typeArguments() { |
1022 if (_typeArguments == null) { | 1022 if (_typeArguments == null) { |
1023 _typeArguments = <TypeMirror>[]; | 1023 _typeArguments = <TypeMirror>[]; |
1024 Link<Type> type = _interfaceType.arguments; | 1024 Link<Type> type = _interfaceType.typeArguments; |
1025 while (type != null && type.head != null) { | 1025 while (type != null && type.head != null) { |
1026 _typeArguments.add(_convertTypeToTypeMirror(system, type.head, | 1026 _typeArguments.add(_convertTypeToTypeMirror(system, type.head, |
1027 system.compiler.dynamicClass.computeType(system.compiler))); | 1027 system.compiler.dynamicClass.computeType(system.compiler))); |
1028 type = type.tail; | 1028 type = type.tail; |
1029 } | 1029 } |
1030 } | 1030 } |
1031 return _typeArguments; | 1031 return _typeArguments; |
1032 } | 1032 } |
1033 | 1033 |
1034 List<TypeVariableMirror> typeVariables() => declaration.typeVariables(); | 1034 List<TypeVariableMirror> typeVariables() => declaration.typeVariables(); |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1362 if (node !== null) { | 1362 if (node !== null) { |
1363 var span = system.compiler.spanFromNode(node, script.uri); | 1363 var span = system.compiler.spanFromNode(node, script.uri); |
1364 return new Dart2JsLocation(script, span); | 1364 return new Dart2JsLocation(script, span); |
1365 } else { | 1365 } else { |
1366 var span = system.compiler.spanFromElement(_variable); | 1366 var span = system.compiler.spanFromElement(_variable); |
1367 return new Dart2JsLocation(script, span); | 1367 return new Dart2JsLocation(script, span); |
1368 } | 1368 } |
1369 } | 1369 } |
1370 } | 1370 } |
1371 | 1371 |
OLD | NEW |