| 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('elements'); | 5 library elements; |
| 6 | 6 |
| 7 #import('dart:uri'); | 7 import 'dart:uri'; |
| 8 | 8 |
| 9 // TODO(ahe): Rename prefix to 'api' when VM bug is fixed. | 9 // TODO(ahe): Rename prefix to 'api' when VM bug is fixed. |
| 10 #import('../../compiler.dart', prefix: 'api_e'); | 10 import '../../compiler.dart' as api_e; |
| 11 #import('../tree/tree.dart'); | 11 import '../tree/tree.dart'; |
| 12 #import('../scanner/scannerlib.dart'); | 12 import '../dart2jslib.dart' show invariant, |
| 13 #import('../leg.dart'); // TODO(karlklose): we only need type. | 13 InterfaceType, |
| 14 #import('../universe/universe.dart'); | 14 DartType, |
| 15 #import('../util/util.dart'); | 15 TypeVariableType, |
| 16 TypedefType, |
| 17 MessageKind, |
| 18 DiagnosticListener, |
| 19 Script, |
| 20 FunctionType, |
| 21 SourceString, |
| 22 Selector, |
| 23 Constant, |
| 24 Compiler; |
| 25 import '../scanner/scannerlib.dart' show Token, EOF_TOKEN; |
| 26 import '../util/util.dart'; |
| 27 import '../resolution/resolution.dart'; |
| 16 | 28 |
| 17 const int STATE_NOT_STARTED = 0; | 29 const int STATE_NOT_STARTED = 0; |
| 18 const int STATE_STARTED = 1; | 30 const int STATE_STARTED = 1; |
| 19 const int STATE_DONE = 2; | 31 const int STATE_DONE = 2; |
| 20 | 32 |
| 21 class ElementCategory { | 33 class ElementCategory { |
| 22 /** | 34 /** |
| 23 * Represents things that we don't expect to find when looking in a | 35 * Represents things that we don't expect to find when looking in a |
| 24 * scope. | 36 * scope. |
| 25 */ | 37 */ |
| (...skipping 1939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1965 | 1977 |
| 1966 MetadataAnnotation ensureResolved(Compiler compiler) { | 1978 MetadataAnnotation ensureResolved(Compiler compiler) { |
| 1967 if (resolutionState == STATE_NOT_STARTED) { | 1979 if (resolutionState == STATE_NOT_STARTED) { |
| 1968 compiler.resolver.resolveMetadataAnnotation(this); | 1980 compiler.resolver.resolveMetadataAnnotation(this); |
| 1969 } | 1981 } |
| 1970 return this; | 1982 return this; |
| 1971 } | 1983 } |
| 1972 | 1984 |
| 1973 String toString() => 'MetadataAnnotation($value, $resolutionState)'; | 1985 String toString() => 'MetadataAnnotation($value, $resolutionState)'; |
| 1974 } | 1986 } |
| OLD | NEW |