OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 dart._js_mirrors; | 5 library dart._js_mirrors; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import 'dart:collection' show | 9 import 'dart:collection' show |
10 UnmodifiableListView; | 10 UnmodifiableListView; |
(...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1139 | 1139 |
1140 List<ClassMirror> get superinterfaces { | 1140 List<ClassMirror> get superinterfaces { |
1141 if (_cachedSuperinterfaces != null) return _cachedSuperinterfaces; | 1141 if (_cachedSuperinterfaces != null) return _cachedSuperinterfaces; |
1142 return _cachedSuperinterfaces = _class._getSuperinterfacesWithOwner(this); | 1142 return _cachedSuperinterfaces = _class._getSuperinterfacesWithOwner(this); |
1143 } | 1143 } |
1144 | 1144 |
1145 bool get isPrivate => _class.isPrivate; | 1145 bool get isPrivate => _class.isPrivate; |
1146 | 1146 |
1147 bool get isTopLevel => _class.isTopLevel; | 1147 bool get isTopLevel => _class.isTopLevel; |
1148 | 1148 |
1149 bool get isAbstract => _class.isAbstract; | |
1150 | |
1151 SourceLocation get location => _class.location; | 1149 SourceLocation get location => _class.location; |
1152 | 1150 |
1153 MirrorSystem get mirrors => _class.mirrors; | 1151 MirrorSystem get mirrors => _class.mirrors; |
1154 | 1152 |
1155 Symbol get qualifiedName => _class.qualifiedName; | 1153 Symbol get qualifiedName => _class.qualifiedName; |
1156 | 1154 |
1157 bool get hasReflectedType => true; | 1155 bool get hasReflectedType => true; |
1158 | 1156 |
1159 Type get reflectedType => createRuntimeType(_mangledName); | 1157 Type get reflectedType => createRuntimeType(_mangledName); |
1160 | 1158 |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1558 => throw new UnimplementedError(); | 1556 => throw new UnimplementedError(); |
1559 | 1557 |
1560 // TODO(ahe): Implement this. | 1558 // TODO(ahe): Implement this. |
1561 Map<Symbol, MethodMirror> get staticMembers => throw new UnimplementedError(); | 1559 Map<Symbol, MethodMirror> get staticMembers => throw new UnimplementedError(); |
1562 | 1560 |
1563 // TODO(ahe): Implement this. | 1561 // TODO(ahe): Implement this. |
1564 ClassMirror get mixin => throw new UnimplementedError(); | 1562 ClassMirror get mixin => throw new UnimplementedError(); |
1565 | 1563 |
1566 // TODO(ahe): Implement this. | 1564 // TODO(ahe): Implement this. |
1567 Function operator [](Symbol name) => throw new UnimplementedError(); | 1565 Function operator [](Symbol name) => throw new UnimplementedError(); |
1568 | |
1569 bool get isAbstract => throw new UnimplementedError(); | |
1570 } | 1566 } |
1571 | 1567 |
1572 class JsVariableMirror extends JsDeclarationMirror implements VariableMirror { | 1568 class JsVariableMirror extends JsDeclarationMirror implements VariableMirror { |
1573 | 1569 |
1574 // TODO(ahe): The values in these fields are virtually untested. | 1570 // TODO(ahe): The values in these fields are virtually untested. |
1575 final String _jsName; | 1571 final String _jsName; |
1576 final bool isFinal; | 1572 final bool isFinal; |
1577 final bool isStatic; | 1573 final bool isStatic; |
1578 final _metadataFunction; | 1574 final _metadataFunction; |
1579 final DeclarationMirror _owner; | 1575 final DeclarationMirror _owner; |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2067 bool get _hasArguments => JS('bool', '"args" in #', _typeData); | 2063 bool get _hasArguments => JS('bool', '"args" in #', _typeData); |
2068 List get _arguments => JS('JSExtendableArray', '#.args', _typeData); | 2064 List get _arguments => JS('JSExtendableArray', '#.args', _typeData); |
2069 | 2065 |
2070 bool get _hasOptionalArguments => JS('bool', '"opt" in #', _typeData); | 2066 bool get _hasOptionalArguments => JS('bool', '"opt" in #', _typeData); |
2071 List get _optionalArguments => JS('JSExtendableArray', '#.opt', _typeData); | 2067 List get _optionalArguments => JS('JSExtendableArray', '#.opt', _typeData); |
2072 | 2068 |
2073 bool get _hasNamedArguments => JS('bool', '"named" in #', _typeData); | 2069 bool get _hasNamedArguments => JS('bool', '"named" in #', _typeData); |
2074 get _namedArguments => JS('=Object', '#.named', _typeData); | 2070 get _namedArguments => JS('=Object', '#.named', _typeData); |
2075 bool get isOriginalDeclaration => true; | 2071 bool get isOriginalDeclaration => true; |
2076 | 2072 |
2077 bool get isAbstract => false; | |
2078 | |
2079 TypeMirror get returnType { | 2073 TypeMirror get returnType { |
2080 if (_cachedReturnType != null) return _cachedReturnType; | 2074 if (_cachedReturnType != null) return _cachedReturnType; |
2081 if (_isVoid) return _cachedReturnType = JsMirrorSystem._voidType; | 2075 if (_isVoid) return _cachedReturnType = JsMirrorSystem._voidType; |
2082 if (!_hasReturnType) return _cachedReturnType = JsMirrorSystem._dynamicType; | 2076 if (!_hasReturnType) return _cachedReturnType = JsMirrorSystem._dynamicType; |
2083 return _cachedReturnType = | 2077 return _cachedReturnType = |
2084 typeMirrorFromRuntimeTypeRepresentation(owner, _returnType); | 2078 typeMirrorFromRuntimeTypeRepresentation(owner, _returnType); |
2085 } | 2079 } |
2086 | 2080 |
2087 List<ParameterMirror> get parameters { | 2081 List<ParameterMirror> get parameters { |
2088 if (_cachedParameters != null) return _cachedParameters; | 2082 if (_cachedParameters != null) return _cachedParameters; |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2389 void operator []=(K key, V value) => _throw(); | 2383 void operator []=(K key, V value) => _throw(); |
2390 | 2384 |
2391 V putIfAbsent(K key, V ifAbsent()) { _throw(); } | 2385 V putIfAbsent(K key, V ifAbsent()) { _throw(); } |
2392 | 2386 |
2393 void addAll(Map<K, V> other) => _throw(); | 2387 void addAll(Map<K, V> other) => _throw(); |
2394 | 2388 |
2395 V remove(K key) { _throw(); } | 2389 V remove(K key) { _throw(); } |
2396 | 2390 |
2397 void clear() => _throw(); | 2391 void clear() => _throw(); |
2398 } | 2392 } |
OLD | NEW |