| 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'; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 T get stringType; | 35 T get stringType; |
| 36 T get typeType; | 36 T get typeType; |
| 37 | 37 |
| 38 T nonNullSubtype(ClassElement type); | 38 T nonNullSubtype(ClassElement type); |
| 39 T nonNullSubclass(ClassElement type); | 39 T nonNullSubclass(ClassElement type); |
| 40 T nonNullExact(ClassElement type); | 40 T nonNullExact(ClassElement type); |
| 41 T nonNullEmpty(); | 41 T nonNullEmpty(); |
| 42 bool isNull(T type); | 42 bool isNull(T type); |
| 43 Selector newTypedSelector(T receiver, Selector selector); | 43 Selector newTypedSelector(T receiver, Selector selector); |
| 44 | 44 |
| 45 T allocateContainer(T type, | 45 T allocateList(T type, |
| 46 Node node, | 46 Node node, |
| 47 Element enclosing, | 47 Element enclosing, |
| 48 [T elementType, int length]); | 48 [T elementType, int length]); |
| 49 |
| 50 T allocateMap(T keyType, T valueType, T type); |
| 49 | 51 |
| 50 /** | 52 /** |
| 51 * Returns the least upper bound between [firstType] and | 53 * Returns the least upper bound between [firstType] and |
| 52 * [secondType]. | 54 * [secondType]. |
| 53 */ | 55 */ |
| 54 T computeLUB(T firstType, T secondType); | 56 T computeLUB(T firstType, T secondType); |
| 55 | 57 |
| 56 /** | 58 /** |
| 57 * Returns the intersection between [T] and [annotation]. | 59 * Returns the intersection between [T] and [annotation]. |
| 58 * [isNullable] indicates whether the annotation implies a null | 60 * [isNullable] indicates whether the annotation implies a null |
| (...skipping 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1149 return type; | 1151 return type; |
| 1150 } | 1152 } |
| 1151 | 1153 |
| 1152 T visitCascade(Cascade node) { | 1154 T visitCascade(Cascade node) { |
| 1153 // Ignore the result of the cascade send and return the type of the cascade | 1155 // Ignore the result of the cascade send and return the type of the cascade |
| 1154 // receiver. | 1156 // receiver. |
| 1155 visit(node.expression); | 1157 visit(node.expression); |
| 1156 return cascadeReceiverStack.removeLast(); | 1158 return cascadeReceiverStack.removeLast(); |
| 1157 } | 1159 } |
| 1158 } | 1160 } |
| OLD | NEW |