| 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:async'; | 7 import 'dart:async'; |
| 8 import 'dart:collection' show LinkedHashMap; | 8 import 'dart:collection' show LinkedHashMap; |
| 9 | 9 |
| 10 import '../../compiler.dart' as api; | 10 import '../../compiler.dart' as api; |
| (...skipping 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1077 | 1077 |
| 1078 InterfaceType get _interfaceType => _type; | 1078 InterfaceType get _interfaceType => _type; |
| 1079 | 1079 |
| 1080 String get qualifiedName => originalDeclaration.qualifiedName; | 1080 String get qualifiedName => originalDeclaration.qualifiedName; |
| 1081 | 1081 |
| 1082 // TODO(johnniwinther): Substitute type arguments for type variables. | 1082 // TODO(johnniwinther): Substitute type arguments for type variables. |
| 1083 Map<String, MemberMirror> get members => originalDeclaration.members; | 1083 Map<String, MemberMirror> get members => originalDeclaration.members; |
| 1084 | 1084 |
| 1085 bool get isObject => mirrors.compiler.objectClass == _type.element; | 1085 bool get isObject => mirrors.compiler.objectClass == _type.element; |
| 1086 | 1086 |
| 1087 bool get isDynamic => mirrors.compiler.dynamicClass == _type.element; | 1087 // TODO(johnniwinther): How to show malformed types? |
| 1088 bool get isDynamic => _type.isDynamic; |
| 1088 | 1089 |
| 1089 ClassMirror get originalDeclaration | 1090 ClassMirror get originalDeclaration |
| 1090 => new Dart2JsClassMirror(mirrors, _type.element); | 1091 => new Dart2JsClassMirror(mirrors, _type.element); |
| 1091 | 1092 |
| 1092 // TODO(johnniwinther): Substitute type arguments for type variables. | 1093 // TODO(johnniwinther): Substitute type arguments for type variables. |
| 1093 ClassMirror get superclass => originalDeclaration.superclass; | 1094 ClassMirror get superclass => originalDeclaration.superclass; |
| 1094 | 1095 |
| 1095 // TODO(johnniwinther): Substitute type arguments for type variables. | 1096 // TODO(johnniwinther): Substitute type arguments for type variables. |
| 1096 List<ClassMirror> get superinterfaces => originalDeclaration.superinterfaces; | 1097 List<ClassMirror> get superinterfaces => originalDeclaration.superinterfaces; |
| 1097 | 1098 |
| (...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1748 * | 1749 * |
| 1749 * All API in this class is experimental. | 1750 * All API in this class is experimental. |
| 1750 */ | 1751 */ |
| 1751 class BackDoor { | 1752 class BackDoor { |
| 1752 /// Return the compilation units comprising [library]. | 1753 /// Return the compilation units comprising [library]. |
| 1753 static List<Mirror> compilationUnitsOf(Dart2JsLibraryMirror library) { | 1754 static List<Mirror> compilationUnitsOf(Dart2JsLibraryMirror library) { |
| 1754 return library._library.compilationUnits.toList().map( | 1755 return library._library.compilationUnits.toList().map( |
| 1755 (cu) => new Dart2JsCompilationUnitMirror(cu, library)).toList(); | 1756 (cu) => new Dart2JsCompilationUnitMirror(cu, library)).toList(); |
| 1756 } | 1757 } |
| 1757 } | 1758 } |
| OLD | NEW |