| 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 '../compiler.dart' show | 10 import '../compiler.dart' show |
| (...skipping 1161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1172 | 1172 |
| 1173 T visitVariableDefinitions(VariableDefinitions node) { | 1173 T visitVariableDefinitions(VariableDefinitions node) { |
| 1174 for (Link<Node> link = node.definitions.nodes; | 1174 for (Link<Node> link = node.definitions.nodes; |
| 1175 !link.isEmpty; | 1175 !link.isEmpty; |
| 1176 link = link.tail) { | 1176 link = link.tail) { |
| 1177 Node definition = link.head; | 1177 Node definition = link.head; |
| 1178 if (definition is Identifier) { | 1178 if (definition is Identifier) { |
| 1179 locals.update(elements[definition], types.nullType, node); | 1179 locals.update(elements[definition], types.nullType, node); |
| 1180 } else { | 1180 } else { |
| 1181 assert(definition.asSendSet() != null); | 1181 assert(definition.asSendSet() != null); |
| 1182 visit(definition); | 1182 handleSendSet(definition); |
| 1183 } | 1183 } |
| 1184 } | 1184 } |
| 1185 return null; | 1185 return null; |
| 1186 } | 1186 } |
| 1187 | 1187 |
| 1188 bool handleCondition(Node node, List<Send> tests) { | 1188 bool handleCondition(Node node, List<Send> tests) { |
| 1189 bool oldConditionIsSimple = conditionIsSimple; | 1189 bool oldConditionIsSimple = conditionIsSimple; |
| 1190 bool oldAccumulateIsChecks = accumulateIsChecks; | 1190 bool oldAccumulateIsChecks = accumulateIsChecks; |
| 1191 List<Send> oldIsChecks = isChecks; | 1191 List<Send> oldIsChecks = isChecks; |
| 1192 accumulateIsChecks = true; | 1192 accumulateIsChecks = true; |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1458 return type; | 1458 return type; |
| 1459 } | 1459 } |
| 1460 | 1460 |
| 1461 T visitCascade(Cascade node) { | 1461 T visitCascade(Cascade node) { |
| 1462 // Ignore the result of the cascade send and return the type of the cascade | 1462 // Ignore the result of the cascade send and return the type of the cascade |
| 1463 // receiver. | 1463 // receiver. |
| 1464 visit(node.expression); | 1464 visit(node.expression); |
| 1465 return cascadeReceiverStack.removeLast(); | 1465 return cascadeReceiverStack.removeLast(); |
| 1466 } | 1466 } |
| 1467 } | 1467 } |
| OLD | NEW |