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 '../dart2jslib.dart' hide Selector, TypedSelector; | 7 import '../dart2jslib.dart' hide Selector, TypedSelector; |
8 import '../dart_types.dart'; | 8 import '../dart_types.dart'; |
9 import '../elements/elements.dart'; | 9 import '../elements/elements.dart'; |
10 import '../tree/tree.dart'; | 10 import '../tree/tree.dart'; |
11 import '../universe/universe.dart'; | 11 import '../universe/universe.dart'; |
12 import '../util/util.dart'; | 12 import '../util/util.dart'; |
13 import '../types/types.dart' show TypeMask; | 13 import '../types/types.dart' show TypeMask; |
14 | 14 |
15 /** | 15 /** |
16 * The interface [InferrerVisitor] will use when working on types. | 16 * The interface [InferrerVisitor] will use when working on types. |
17 */ | 17 */ |
18 abstract class TypeSystem<T> { | 18 abstract class TypeSystem<T> { |
19 T get dynamicType; | 19 T get dynamicType; |
20 T get nullType; | 20 T get nullType; |
21 T get intType; | 21 T get intType; |
22 T get uint31Type; | 22 T get uint31Type; |
23 T get uint32Type; | 23 T get uint32Type; |
| 24 T get positiveIntType; |
24 T get doubleType; | 25 T get doubleType; |
25 T get numType; | 26 T get numType; |
26 T get boolType; | 27 T get boolType; |
27 T get functionType; | 28 T get functionType; |
28 T get listType; | 29 T get listType; |
29 T get constListType; | 30 T get constListType; |
30 T get fixedListType; | 31 T get fixedListType; |
31 T get growableListType; | 32 T get growableListType; |
32 T get mapType; | 33 T get mapType; |
33 T get constMapType; | 34 T get constMapType; |
(...skipping 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1148 return type; | 1149 return type; |
1149 } | 1150 } |
1150 | 1151 |
1151 T visitCascade(Cascade node) { | 1152 T visitCascade(Cascade node) { |
1152 // Ignore the result of the cascade send and return the type of the cascade | 1153 // Ignore the result of the cascade send and return the type of the cascade |
1153 // receiver. | 1154 // receiver. |
1154 visit(node.expression); | 1155 visit(node.expression); |
1155 return cascadeReceiverStack.removeLast(); | 1156 return cascadeReceiverStack.removeLast(); |
1156 } | 1157 } |
1157 } | 1158 } |
OLD | NEW |