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 inferrer_visitor; | 5 library inferrer_visitor; |
6 | 6 |
7 import 'dart:collection' show | 7 import 'dart:collection' show |
8 IterableMixin; | 8 IterableMixin; |
9 | 9 |
10 import '../compiler.dart' show | 10 import '../compiler.dart' show |
11 Compiler; | 11 Compiler; |
12 import '../constants/constant_system.dart'; | 12 import '../constants/constant_system.dart'; |
13 import '../constants/expressions.dart'; | 13 import '../constants/expressions.dart'; |
14 import '../dart_types.dart'; | 14 import '../dart_types.dart'; |
15 import '../diagnostics/spannable.dart' show | 15 import '../diagnostics/spannable.dart' show |
16 Spannable; | 16 Spannable; |
17 import '../elements/elements.dart'; | 17 import '../elements/elements.dart'; |
18 import '../resolution/operators.dart'; | 18 import '../resolution/operators.dart'; |
19 import '../resolution/semantic_visitor.dart'; | 19 import '../resolution/semantic_visitor.dart'; |
20 import '../resolution/send_resolver.dart' show | 20 import '../resolution/send_resolver.dart' show |
21 SendResolverMixin; | 21 SendResolverMixin; |
22 import '../resolution/tree_elements.dart' show | 22 import '../resolution/tree_elements.dart' show |
23 TreeElements; | 23 TreeElements; |
24 import '../tree/tree.dart'; | 24 import '../tree/tree.dart'; |
25 import '../types/types.dart' show | 25 import '../types/types.dart' show |
26 TypeMask; | 26 TypeMask; |
27 import '../types/constants.dart' show | 27 import '../types/constants.dart' show |
28 computeTypeMask; | 28 computeTypeMask; |
29 import '../universe/universe.dart'; | 29 import '../universe/call_structure.dart' show |
| 30 CallStructure; |
| 31 import '../universe/selector.dart' show |
| 32 Selector; |
30 import '../util/util.dart'; | 33 import '../util/util.dart'; |
31 import '../world.dart' show | 34 import '../world.dart' show |
32 ClassWorld; | 35 ClassWorld; |
33 | 36 |
34 /** | 37 /** |
35 * The interface [InferrerVisitor] will use when working on types. | 38 * The interface [InferrerVisitor] will use when working on types. |
36 */ | 39 */ |
37 abstract class TypeSystem<T> { | 40 abstract class TypeSystem<T> { |
38 T get dynamicType; | 41 T get dynamicType; |
39 T get nullType; | 42 T get nullType; |
(...skipping 1493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1533 return type; | 1536 return type; |
1534 } | 1537 } |
1535 | 1538 |
1536 T visitCascade(Cascade node) { | 1539 T visitCascade(Cascade node) { |
1537 // Ignore the result of the cascade send and return the type of the cascade | 1540 // Ignore the result of the cascade send and return the type of the cascade |
1538 // receiver. | 1541 // receiver. |
1539 visit(node.expression); | 1542 visit(node.expression); |
1540 return cascadeReceiverStack.removeLast(); | 1543 return cascadeReceiverStack.removeLast(); |
1541 } | 1544 } |
1542 } | 1545 } |
OLD | NEW |