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 elements.modelx; | 5 library elements.modelx; |
6 | 6 |
7 import 'elements.dart'; | 7 import 'elements.dart'; |
8 import '../../compiler.dart' as api; | 8 import '../../compiler.dart' as api; |
9 import '../tree/tree.dart'; | 9 import '../tree/tree.dart'; |
10 import '../util/util.dart'; | 10 import '../util/util.dart'; |
(...skipping 11 matching lines...) Expand all Loading... |
22 FunctionType, | 22 FunctionType, |
23 Selector, | 23 Selector, |
24 Constant, | 24 Constant, |
25 Compiler, | 25 Compiler, |
26 isPrivateName; | 26 isPrivateName; |
27 | 27 |
28 import '../dart_types.dart'; | 28 import '../dart_types.dart'; |
29 | 29 |
30 import '../scanner/scannerlib.dart' show Token, EOF_TOKEN; | 30 import '../scanner/scannerlib.dart' show Token, EOF_TOKEN; |
31 | 31 |
32 | |
33 class ElementX implements Element { | 32 class ElementX implements Element { |
34 static int elementHashCode = 0; | 33 static int elementHashCode = 0; |
35 | 34 |
36 final String name; | 35 final String name; |
37 final ElementKind kind; | 36 final ElementKind kind; |
38 final Element enclosingElement; | 37 final Element enclosingElement; |
39 final int hashCode = ++elementHashCode; | 38 final int hashCode = ++elementHashCode; |
40 Link<MetadataAnnotation> metadata = const Link<MetadataAnnotation>(); | 39 Link<MetadataAnnotation> metadata = const Link<MetadataAnnotation>(); |
41 | 40 |
42 ElementX(this.name, this.kind, this.enclosingElement) { | 41 ElementX(this.name, this.kind, this.enclosingElement) { |
(...skipping 2338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2381 | 2380 |
2382 MetadataAnnotation ensureResolved(Compiler compiler) { | 2381 MetadataAnnotation ensureResolved(Compiler compiler) { |
2383 if (resolutionState == STATE_NOT_STARTED) { | 2382 if (resolutionState == STATE_NOT_STARTED) { |
2384 compiler.resolver.resolveMetadataAnnotation(this); | 2383 compiler.resolver.resolveMetadataAnnotation(this); |
2385 } | 2384 } |
2386 return this; | 2385 return this; |
2387 } | 2386 } |
2388 | 2387 |
2389 String toString() => 'MetadataAnnotation($value, $resolutionState)'; | 2388 String toString() => 'MetadataAnnotation($value, $resolutionState)'; |
2390 } | 2389 } |
OLD | NEW |