| 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 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1137 T visitContinueStatement(ContinueStatement node) { | 1137 T visitContinueStatement(ContinueStatement node) { |
| 1138 TargetElement target = elements[node]; | 1138 TargetElement target = elements[node]; |
| 1139 locals.seenBreakOrContinue = true; | 1139 locals.seenBreakOrContinue = true; |
| 1140 // Do a deep-copy of the locals, because the code following the | 1140 // Do a deep-copy of the locals, because the code following the |
| 1141 // continue will change them. | 1141 // continue will change them. |
| 1142 continuesFor[target].add(new LocalsHandler<T>.deepCopyOf(locals)); | 1142 continuesFor[target].add(new LocalsHandler<T>.deepCopyOf(locals)); |
| 1143 return null; | 1143 return null; |
| 1144 } | 1144 } |
| 1145 | 1145 |
| 1146 void internalError(String reason, {Node node}) { | 1146 void internalError(String reason, {Node node}) { |
| 1147 compiler.internalError(reason, node: node); | 1147 compiler.internalError(node, reason); |
| 1148 } | 1148 } |
| 1149 | 1149 |
| 1150 T visitSwitchStatement(SwitchStatement node) { | 1150 T visitSwitchStatement(SwitchStatement node) { |
| 1151 visit(node.parenthesizedExpression); | 1151 visit(node.parenthesizedExpression); |
| 1152 | 1152 |
| 1153 setupBreaksAndContinues(elements[node]); | 1153 setupBreaksAndContinues(elements[node]); |
| 1154 if (Elements.switchStatementHasContinue(node, elements)) { | 1154 if (Elements.switchStatementHasContinue(node, elements)) { |
| 1155 void forEachLabeledCase(void action(TargetElement target)) { | 1155 void forEachLabeledCase(void action(TargetElement target)) { |
| 1156 for (SwitchCase switchCase in node.cases) { | 1156 for (SwitchCase switchCase in node.cases) { |
| 1157 for (Node labelOrCase in switchCase.labelsAndCases) { | 1157 for (Node labelOrCase in switchCase.labelsAndCases) { |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1214 return type; | 1214 return type; |
| 1215 } | 1215 } |
| 1216 | 1216 |
| 1217 T visitCascade(Cascade node) { | 1217 T visitCascade(Cascade node) { |
| 1218 // Ignore the result of the cascade send and return the type of the cascade | 1218 // Ignore the result of the cascade send and return the type of the cascade |
| 1219 // receiver. | 1219 // receiver. |
| 1220 visit(node.expression); | 1220 visit(node.expression); |
| 1221 return cascadeReceiverStack.removeLast(); | 1221 return cascadeReceiverStack.removeLast(); |
| 1222 } | 1222 } |
| 1223 } | 1223 } |
| OLD | NEW |