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 IterableMixin; |
| 8 |
7 import '../constants/constant_system.dart'; | 9 import '../constants/constant_system.dart'; |
8 import '../constants/expressions.dart'; | 10 import '../constants/expressions.dart'; |
9 import '../dart2jslib.dart' hide Selector, TypedSelector; | 11 import '../dart2jslib.dart' hide Selector, TypedSelector; |
10 import '../dart_types.dart'; | 12 import '../dart_types.dart'; |
11 import '../elements/elements.dart'; | 13 import '../elements/elements.dart'; |
12 import '../resolution/operators.dart'; | 14 import '../resolution/operators.dart'; |
| 15 import '../resolved_visitor.dart'; |
13 import '../tree/tree.dart'; | 16 import '../tree/tree.dart'; |
| 17 import '../types/types.dart' show TypeMask; |
| 18 import '../types/constants.dart' show computeTypeMask; |
14 import '../universe/universe.dart'; | 19 import '../universe/universe.dart'; |
15 import '../util/util.dart'; | 20 import '../util/util.dart'; |
16 import '../types/types.dart' show TypeMask; | 21 import '../world.dart' show ClassWorld; |
17 import '../types/constants.dart' show computeTypeMask; | |
18 import 'dart:collection' show IterableMixin; | |
19 | 22 |
20 /** | 23 /** |
21 * The interface [InferrerVisitor] will use when working on types. | 24 * The interface [InferrerVisitor] will use when working on types. |
22 */ | 25 */ |
23 abstract class TypeSystem<T> { | 26 abstract class TypeSystem<T> { |
24 T get dynamicType; | 27 T get dynamicType; |
25 T get nullType; | 28 T get nullType; |
26 T get intType; | 29 T get intType; |
27 T get uint31Type; | 30 T get uint31Type; |
28 T get uint32Type; | 31 T get uint32Type; |
(...skipping 1419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1448 return type; | 1451 return type; |
1449 } | 1452 } |
1450 | 1453 |
1451 T visitCascade(Cascade node) { | 1454 T visitCascade(Cascade node) { |
1452 // Ignore the result of the cascade send and return the type of the cascade | 1455 // Ignore the result of the cascade send and return the type of the cascade |
1453 // receiver. | 1456 // receiver. |
1454 visit(node.expression); | 1457 visit(node.expression); |
1455 return cascadeReceiverStack.removeLast(); | 1458 return cascadeReceiverStack.removeLast(); |
1456 } | 1459 } |
1457 } | 1460 } |
OLD | NEW |