Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(608)

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/nodes.dart

Issue 14969004: Implement continue for switch. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 727bcc9f3f35b2eecb651f19dbdfaf9dd749c79d..36f11e3c02bcea1c68020b1d2a8d9987e24b1163 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart
@@ -1668,7 +1668,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;
@@ -1697,8 +1697,11 @@ abstract class HJump extends HControlFlow {
}
class HBreak extends HJump {
- HBreak(TargetElement target) : super(target);
- HBreak.toLabel(LabelElement label) : super.toLabel(label);
+ final bool breakSwitchContinueLoop;
ngeoffray 2013/05/14 07:08:51 Please add a comment on this field.
Johnni Winther 2013/05/17 07:03:04 Done.
+ 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);
}
@@ -2463,6 +2466,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 {
@@ -2470,6 +2475,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;

Powered by Google App Engine
This is Rietveld 408576698