Chromium Code Reviews| 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 'shared/runtime_data.dart' as encoding; | 7 import 'shared/runtime_data.dart' as encoding; |
| 8 import 'shared/embedded_names.dart' show | 8 import 'shared/embedded_names.dart' show |
| 9 ALL_CLASSES, | 9 ALL_CLASSES, |
| 10 LAZIES, | 10 LAZIES, |
| (...skipping 2500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2511 : super(simpleName) { | 2511 : super(simpleName) { |
| 2512 referent = new JsFunctionTypeMirror(_typeData, this); | 2512 referent = new JsFunctionTypeMirror(_typeData, this); |
| 2513 } | 2513 } |
| 2514 | 2514 |
| 2515 JsFunctionTypeMirror get value => referent; | 2515 JsFunctionTypeMirror get value => referent; |
| 2516 | 2516 |
| 2517 String get _prettyName => 'TypedefMirror'; | 2517 String get _prettyName => 'TypedefMirror'; |
| 2518 | 2518 |
| 2519 bool get hasReflectedType => throw new UnimplementedError(); | 2519 bool get hasReflectedType => throw new UnimplementedError(); |
| 2520 | 2520 |
| 2521 Type get reflectedType => throw new UnimplementedError(); | 2521 Type get reflectedType => createRuntimeType(_mangledName); |
| 2522 | 2522 |
| 2523 // TODO(ahe): Implement this method. | 2523 // TODO(floitsch): Implement this method. |
| 2524 List<TypeVariableMirror> get typeVariables => throw new UnimplementedError(); | 2524 List<TypeVariableMirror> get typeVariables => throw new UnimplementedError(); |
| 2525 | 2525 |
| 2526 // TODO(ahe): Implement this method. | 2526 List<TypeMirror> get typeArguments => const <TypeMirror>[]; |
|
karlklose
2014/09/19 10:39:51
Do you plan to create an InstantiatedJsTypedefMirr
floitsch
2014/09/19 11:42:09
They are needed by the createRuntimeType.
Might be
| |
| 2527 List<TypeMirror> get typeArguments => throw new UnimplementedError(); | |
| 2528 | 2527 |
| 2529 // TODO(ahe): Implement this method. | 2528 bool get isOriginalDeclaration => true; |
| 2530 bool get isOriginalDeclaration => throw new UnimplementedError(); | |
| 2531 | 2529 |
| 2532 // TODO(ahe): Implement this method. | 2530 TypeMirror get originalDeclaration => this; |
| 2533 TypeMirror get originalDeclaration => throw new UnimplementedError(); | |
| 2534 | 2531 |
| 2535 // TODO(ahe): Implement this method. | |
|
karlklose
2014/09/19 10:39:51
Restore TODO (with 'ahe' -> 'floitsch').
floitsch
2014/09/19 11:42:09
Done.
| |
| 2536 DeclarationMirror get owner => throw new UnimplementedError(); | 2532 DeclarationMirror get owner => throw new UnimplementedError(); |
| 2537 | 2533 |
| 2538 // TODO(ahe): Implement this method. | 2534 // TODO(ahe): Implement this method. |
| 2539 List<InstanceMirror> get metadata => throw new UnimplementedError(); | 2535 List<InstanceMirror> get metadata => throw new UnimplementedError(); |
| 2540 | 2536 |
| 2541 bool isSubtypeOf(TypeMirror other) => throw new UnimplementedError(); | 2537 bool isSubtypeOf(TypeMirror other) => throw new UnimplementedError(); |
| 2542 bool isAssignableTo(TypeMirror other) => throw new UnimplementedError(); | 2538 bool isAssignableTo(TypeMirror other) => throw new UnimplementedError(); |
| 2543 } | 2539 } |
| 2544 | 2540 |
| 2545 // TODO(ahe): Remove this class when API is updated. | 2541 // TODO(ahe): Remove this class when API is updated. |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2955 // have a part (following a '.') that starts with '_'. | 2951 // have a part (following a '.') that starts with '_'. |
| 2956 const int UNDERSCORE = 0x5f; | 2952 const int UNDERSCORE = 0x5f; |
| 2957 if (name.isEmpty) return true; | 2953 if (name.isEmpty) return true; |
| 2958 int index = -1; | 2954 int index = -1; |
| 2959 do { | 2955 do { |
| 2960 if (name.codeUnitAt(index + 1) == UNDERSCORE) return false; | 2956 if (name.codeUnitAt(index + 1) == UNDERSCORE) return false; |
| 2961 index = name.indexOf('.', index + 1); | 2957 index = name.indexOf('.', index + 1); |
| 2962 } while (index >= 0 && index + 1 < name.length); | 2958 } while (index >= 0 && index + 1 < name.length); |
| 2963 return true; | 2959 return true; |
| 2964 } | 2960 } |
| OLD | NEW |