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