| 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 '../constants/constant_system.dart'; | 7 import '../constants/constant_system.dart'; |
| 8 import '../constants/expressions.dart'; | 8 import '../constants/expressions.dart'; |
| 9 import '../dart2jslib.dart' hide Selector, TypedSelector; | 9 import '../dart2jslib.dart' hide Selector, TypedSelector; |
| 10 import '../dart_types.dart'; | 10 import '../dart_types.dart'; |
| (...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 809 // symbol is always a non-null exact symbol implementation -- not just | 809 // symbol is always a non-null exact symbol implementation -- not just |
| 810 // any non-null subtype of the symbol interface. | 810 // any non-null subtype of the symbol interface. |
| 811 return types.nonNullSubtype(compiler.symbolClass); | 811 return types.nonNullSubtype(compiler.symbolClass); |
| 812 } | 812 } |
| 813 | 813 |
| 814 T visitTypePrefixSend(Send node) { | 814 T visitTypePrefixSend(Send node) { |
| 815 // TODO(johnniwinther): Remove the need for handling this node. | 815 // TODO(johnniwinther): Remove the need for handling this node. |
| 816 return types.dynamicType; | 816 return types.dynamicType; |
| 817 } | 817 } |
| 818 | 818 |
| 819 @override |
| 820 void previsitDeferredAccess(Send node, PrefixElement prefix, _) { |
| 821 // Deferred access does not affect inference. |
| 822 } |
| 823 |
| 819 T handleTypeLiteralGet() { | 824 T handleTypeLiteralGet() { |
| 820 return types.typeType; | 825 return types.typeType; |
| 821 } | 826 } |
| 822 | 827 |
| 823 T handleTypeLiteralInvoke(NodeList arguments) { | 828 T handleTypeLiteralInvoke(NodeList arguments) { |
| 824 return types.dynamicType; | 829 return types.dynamicType; |
| 825 } | 830 } |
| 826 | 831 |
| 827 T visitClassTypeLiteralGet( | 832 T visitClassTypeLiteralGet( |
| 828 Send node, | 833 Send node, |
| (...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1443 return type; | 1448 return type; |
| 1444 } | 1449 } |
| 1445 | 1450 |
| 1446 T visitCascade(Cascade node) { | 1451 T visitCascade(Cascade node) { |
| 1447 // 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 |
| 1448 // receiver. | 1453 // receiver. |
| 1449 visit(node.expression); | 1454 visit(node.expression); |
| 1450 return cascadeReceiverStack.removeLast(); | 1455 return cascadeReceiverStack.removeLast(); |
| 1451 } | 1456 } |
| 1452 } | 1457 } |
| OLD | NEW |