| Index: sdk/lib/_internal/compiler/implementation/ssa/nodes.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart b/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart
|
| index 592dfa1b67ed01b83ac272355212b62baf56aa58..352e3719471bd8b720a002fe5e5542603be948a2 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart
|
| @@ -1673,7 +1673,7 @@ class HBitNot extends HInvokeUnary {
|
| instructionType = HType.INTEGER;
|
| }
|
| accept(HVisitor visitor) => visitor.visitBitNot(this);
|
| -
|
| +
|
| UnaryOperation operation(ConstantSystem constantSystem)
|
| => constantSystem.bitNot;
|
| int typeCode() => HInstruction.BIT_NOT_TYPECODE;
|
| @@ -1702,8 +1702,16 @@ abstract class HJump extends HControlFlow {
|
| }
|
|
|
| class HBreak extends HJump {
|
| - HBreak(TargetElement target) : super(target);
|
| - HBreak.toLabel(LabelElement label) : super.toLabel(label);
|
| + /**
|
| + * Signals that this is a special break instruction for the synthetic loop
|
| + * generatedfor a switch statement with continue statements. See
|
| + * [SsaBuilder.buildComplexSwitchStatement] for detail.
|
| + */
|
| + final bool breakSwitchContinueLoop;
|
| + HBreak(TargetElement target, {bool this.breakSwitchContinueLoop: false})
|
| + : super(target);
|
| + HBreak.toLabel(LabelElement label)
|
| + : breakSwitchContinueLoop = false, super.toLabel(label);
|
| toString() => (label != null) ? 'break ${label.labelName}' : 'break';
|
| accept(HVisitor visitor) => visitor.visitBreak(this);
|
| }
|
| @@ -2468,6 +2476,8 @@ class LoopTypeVisitor extends Visitor {
|
| int visitFor(For node) => HLoopBlockInformation.FOR_LOOP;
|
| int visitDoWhile(DoWhile node) => HLoopBlockInformation.DO_WHILE_LOOP;
|
| int visitForIn(ForIn node) => HLoopBlockInformation.FOR_IN_LOOP;
|
| + int visitSwitchStatement(SwitchStatement node) =>
|
| + HLoopBlockInformation.SWITCH_CONTINUE_LOOP;
|
| }
|
|
|
| class HLoopBlockInformation implements HStatementInformation {
|
| @@ -2475,6 +2485,7 @@ class HLoopBlockInformation implements HStatementInformation {
|
| static const int FOR_LOOP = 1;
|
| static const int DO_WHILE_LOOP = 2;
|
| static const int FOR_IN_LOOP = 3;
|
| + static const int SWITCH_CONTINUE_LOOP = 4;
|
| static const int NOT_A_LOOP = -1;
|
|
|
| final int kind;
|
|
|