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 part of resolution; | 5 library dart2js.resolution.members; |
| 6 |
| 7 import '../compiler.dart' show |
| 8 Compiler, |
| 9 isPrivateName; |
| 10 import '../constants/constructors.dart' show |
| 11 RedirectingFactoryConstantConstructor; |
| 12 import '../constants/expressions.dart'; |
| 13 import '../constants/values.dart'; |
| 14 import '../core_types.dart'; |
| 15 import '../dart_types.dart'; |
| 16 import '../diagnostics/invariant.dart' show |
| 17 invariant; |
| 18 import '../diagnostics/messages.dart' show |
| 19 MessageKind; |
| 20 import '../diagnostics/spannable.dart' show |
| 21 Spannable; |
| 22 import '../elements/elements.dart'; |
| 23 import '../elements/modelx.dart' show |
| 24 ConstructorElementX, |
| 25 ErroneousElementX, |
| 26 FunctionElementX, |
| 27 JumpTargetX, |
| 28 LocalFunctionElementX, |
| 29 LocalParameterElementX, |
| 30 LocalVariableElementX, |
| 31 MethodElementX, |
| 32 ParameterElementX, |
| 33 VariableElementX, |
| 34 VariableList; |
| 35 import '../scanner/scannerlib.dart' show |
| 36 isUserDefinableOperator; |
| 37 import '../tree/tree.dart'; |
| 38 import '../util/util.dart' show |
| 39 Link; |
| 40 import '../universe/universe.dart' show |
| 41 CallStructure, |
| 42 Selector, |
| 43 SelectorKind, |
| 44 UniverseSelector; |
| 45 |
| 46 import 'access_semantics.dart'; |
| 47 import 'class_members.dart' show MembersCreator; |
| 48 import 'operators.dart'; |
| 49 import 'send_structure.dart'; |
| 50 |
| 51 import 'constructors.dart' show |
| 52 ConstructorResolver; |
| 53 import 'label_scope.dart' show |
| 54 StatementScope; |
| 55 import 'registry.dart' show |
| 56 ResolutionRegistry; |
| 57 import 'resolution.dart' show |
| 58 ResolverTask; |
| 59 import 'resolution_common.dart' show |
| 60 MappingVisitor; |
| 61 import 'resolution_result.dart'; |
| 62 import 'scope.dart' show |
| 63 BlockScope, |
| 64 MethodScope, |
| 65 Scope; |
| 66 import 'signatures.dart' show |
| 67 SignatureResolver; |
| 68 import 'variables.dart' show |
| 69 VariableDefinitionsVisitor; |
6 | 70 |
7 /// The state of constants in resolutions. | 71 /// The state of constants in resolutions. |
8 enum ConstantState { | 72 enum ConstantState { |
9 /// Expressions are not required to be constants. | 73 /// Expressions are not required to be constants. |
10 NON_CONSTANT, | 74 NON_CONSTANT, |
11 | 75 |
12 /// Expressions are required to be constants. | 76 /// Expressions are required to be constants. |
13 /// | 77 /// |
14 /// For instance the values of a constant list literal. | 78 /// For instance the values of a constant list literal. |
15 CONSTANT, | 79 CONSTANT, |
(...skipping 4490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4506 } | 4570 } |
4507 return const NoneResult(); | 4571 return const NoneResult(); |
4508 } | 4572 } |
4509 } | 4573 } |
4510 | 4574 |
4511 /// Looks up [name] in [scope] and unwraps the result. | 4575 /// Looks up [name] in [scope] and unwraps the result. |
4512 Element lookupInScope(Compiler compiler, Node node, | 4576 Element lookupInScope(Compiler compiler, Node node, |
4513 Scope scope, String name) { | 4577 Scope scope, String name) { |
4514 return Elements.unwrap(scope.lookup(name), compiler, node); | 4578 return Elements.unwrap(scope.lookup(name), compiler, node); |
4515 } | 4579 } |
OLD | NEW |