Chromium Code Reviews| 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 dart2js.ir_builder_task; | 5 library dart2js.ir_builder_task; |
| 6 | 6 |
| 7 import '../closure.dart' as closure; | 7 import '../closure.dart' as closure; |
| 8 import '../common.dart'; | 8 import '../common.dart'; |
| 9 import '../common/names.dart' show | 9 import '../common/names.dart' show |
| 10 Names, | 10 Names, |
| (...skipping 1213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1224 // break L; // Break from switch becomes break from loop. | 1224 // break L; // Break from switch becomes break from loop. |
| 1225 // case 1: | 1225 // case 1: |
| 1226 // BODY2; | 1226 // BODY2; |
| 1227 // state = 0; // Continue to label ID = 0. | 1227 // state = 0; // Continue to label ID = 0. |
| 1228 // break; | 1228 // break; |
| 1229 // } | 1229 // } |
| 1230 assert(irBuilder.isOpen); | 1230 assert(irBuilder.isOpen); |
| 1231 // Preprocess: compute a list of cases that are the target of continue. | 1231 // Preprocess: compute a list of cases that are the target of continue. |
| 1232 // These are the so-called 'recursive' cases. | 1232 // These are the so-called 'recursive' cases. |
| 1233 List<JumpTarget> continueTargets = <JumpTarget>[]; | 1233 List<JumpTarget> continueTargets = <JumpTarget>[]; |
| 1234 List<ast.SwitchCase> switchCases = node.cases.nodes.toList(); | 1234 List<ast.Node> switchCases = node.cases.nodes.toList(); |
|
Johnni Winther
2016/01/26 10:53:49
Type assertion failure in checked mode.
karlklose
2016/01/26 11:43:07
This was fixed in 091d807d71b792e08818bf6b5bc98f05
| |
| 1235 for (ast.SwitchCase switchCase in switchCases) { | 1235 for (ast.SwitchCase switchCase in switchCases) { |
| 1236 for (ast.Node labelOrCase in switchCase.labelsAndCases) { | 1236 for (ast.Node labelOrCase in switchCase.labelsAndCases) { |
| 1237 if (labelOrCase is ast.Label) { | 1237 if (labelOrCase is ast.Label) { |
| 1238 LabelDefinition definition = elements.getLabelDefinition(labelOrCase); | 1238 LabelDefinition definition = elements.getLabelDefinition(labelOrCase); |
| 1239 if (definition != null && definition.isContinueTarget) { | 1239 if (definition != null && definition.isContinueTarget) { |
| 1240 continueTargets.add(definition.target); | 1240 continueTargets.add(definition.target); |
| 1241 } | 1241 } |
| 1242 } | 1242 } |
| 1243 } | 1243 } |
| 1244 } | 1244 } |
| (...skipping 2578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3823 } | 3823 } |
| 3824 | 3824 |
| 3825 Element get closureConverter { | 3825 Element get closureConverter { |
| 3826 return _backend.helpers.closureConverter; | 3826 return _backend.helpers.closureConverter; |
| 3827 } | 3827 } |
| 3828 | 3828 |
| 3829 void addNativeMethod(FunctionElement function) { | 3829 void addNativeMethod(FunctionElement function) { |
| 3830 _backend.emitter.nativeEmitter.nativeMethods.add(function); | 3830 _backend.emitter.nativeEmitter.nativeMethods.add(function); |
| 3831 } | 3831 } |
| 3832 } | 3832 } |
| OLD | NEW |