| 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 | 7 import 'dart:collection' show |
| 8 IterableMixin; | 8 IterableMixin; |
| 9 | 9 |
| 10 import '../common.dart'; | 10 import '../common.dart'; |
| 11 import '../compiler.dart' show | 11 import '../compiler.dart' show |
| 12 Compiler; | 12 Compiler; |
| 13 import '../constants/constant_system.dart'; | 13 import '../constants/constant_system.dart'; |
| 14 import '../constants/expressions.dart'; | 14 import '../constants/expressions.dart'; |
| 15 import '../dart_types.dart'; | 15 import '../dart_types.dart'; |
| 16 import '../elements/elements.dart'; | 16 import '../elements/elements.dart'; |
| 17 import '../resolution/operators.dart'; | 17 import '../resolution/operators.dart'; |
| 18 import '../resolution/semantic_visitor.dart'; | 18 import '../resolution/semantic_visitor.dart'; |
| 19 import '../resolution/send_resolver.dart' show | |
| 20 SendResolverMixin; | |
| 21 import '../resolution/tree_elements.dart' show | 19 import '../resolution/tree_elements.dart' show |
| 22 TreeElements; | 20 TreeElements; |
| 23 import '../tree/tree.dart'; | 21 import '../tree/tree.dart'; |
| 24 import '../types/types.dart' show | 22 import '../types/types.dart' show |
| 25 TypeMask; | 23 TypeMask; |
| 26 import '../types/constants.dart' show | 24 import '../types/constants.dart' show |
| 27 computeTypeMask; | 25 computeTypeMask; |
| 28 import '../universe/call_structure.dart' show | 26 import '../universe/call_structure.dart' show |
| 29 CallStructure; | 27 CallStructure; |
| 30 import '../universe/selector.dart' show | 28 import '../universe/selector.dart' show |
| (...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 688 }); | 686 }); |
| 689 } | 687 } |
| 690 | 688 |
| 691 void updateField(Element element, T type) { | 689 void updateField(Element element, T type) { |
| 692 fieldScope.updateField(element, type); | 690 fieldScope.updateField(element, type); |
| 693 } | 691 } |
| 694 } | 692 } |
| 695 | 693 |
| 696 abstract class InferrerVisitor<T, E extends MinimalInferrerEngine<T>> | 694 abstract class InferrerVisitor<T, E extends MinimalInferrerEngine<T>> |
| 697 extends Visitor<T> | 695 extends Visitor<T> |
| 698 with SendResolverMixin, | 696 with SemanticSendResolvedMixin<T, dynamic>, |
| 699 SemanticSendResolvedMixin<T, dynamic>, | |
| 700 CompoundBulkMixin<T, dynamic>, | 697 CompoundBulkMixin<T, dynamic>, |
| 701 SetIfNullBulkMixin<T, dynamic>, | 698 SetIfNullBulkMixin<T, dynamic>, |
| 702 PrefixBulkMixin<T, dynamic>, | 699 PrefixBulkMixin<T, dynamic>, |
| 703 PostfixBulkMixin<T, dynamic>, | 700 PostfixBulkMixin<T, dynamic>, |
| 704 ErrorBulkMixin<T, dynamic>, | 701 ErrorBulkMixin<T, dynamic>, |
| 705 NewBulkMixin<T, dynamic>, | 702 NewBulkMixin<T, dynamic>, |
| 706 SetBulkMixin<T, dynamic> | 703 SetBulkMixin<T, dynamic> |
| 707 implements SemanticSendVisitor<T, dynamic> { | 704 implements SemanticSendVisitor<T, dynamic> { |
| 708 final Compiler compiler; | 705 final Compiler compiler; |
| 709 final AstElement analyzedElement; | 706 final AstElement analyzedElement; |
| (...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1538 return type; | 1535 return type; |
| 1539 } | 1536 } |
| 1540 | 1537 |
| 1541 T visitCascade(Cascade node) { | 1538 T visitCascade(Cascade node) { |
| 1542 // Ignore the result of the cascade send and return the type of the cascade | 1539 // Ignore the result of the cascade send and return the type of the cascade |
| 1543 // receiver. | 1540 // receiver. |
| 1544 visit(node.expression); | 1541 visit(node.expression); |
| 1545 return cascadeReceiverStack.removeLast(); | 1542 return cascadeReceiverStack.removeLast(); |
| 1546 } | 1543 } |
| 1547 } | 1544 } |
| OLD | NEW |