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

Unified Diff: frog/leg/ssa/nodes.dart

Issue 9632018: Switch-implementation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 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: frog/leg/ssa/nodes.dart
diff --git a/frog/leg/ssa/nodes.dart b/frog/leg/ssa/nodes.dart
index c4c7e14041f971138a939ebeb68092ce124ca831..9be41041c7d7b99c8381e093128933b00d08d3dd 100644
--- a/frog/leg/ssa/nodes.dart
+++ b/frog/leg/ssa/nodes.dart
@@ -142,7 +142,7 @@ class HGraph {
return result;
}
- HBasicBlock addNewLoopHeaderBlock(List<SourceString> labels) {
+ HBasicBlock addNewLoopHeaderBlock(List<LabelElement> labels) {
HBasicBlock result = addNewBlock();
result.loopInformation = new HLoopInformation(result, labels);
return result;
@@ -433,9 +433,6 @@ class HBasicBlock extends HInstructionList {
HBasicBlock dominator = null;
final List<HBasicBlock> dominatedBlocks;
- // For recognizing labeled statements.
- List<SourceString> labels;
-
HBasicBlock() : this.withId(null);
HBasicBlock.withId(this.id)
: phis = new HInstructionList(),
@@ -669,7 +666,7 @@ class HBlockInformation {
class HLabeledBlockInformation extends HBlockInformation {
final SubGraph body;
final HBasicBlock joinBlock;
- final List<SourceString> labels;
+ final List<LabelElement> labels;
HLabeledBlockInformation(this.body, this.joinBlock, this.labels);
}
@@ -677,7 +674,7 @@ class HLoopInformation extends HBlockInformation {
final HBasicBlock header;
final List<HBasicBlock> blocks;
final List<HBasicBlock> backEdges;
- final List<SourceString> labels;
+ final List<LabelElement> labels;
HLoopInformation(this.header, this.labels)
: blocks = new List<HBasicBlock>(),
@@ -1665,9 +1662,9 @@ class HGoto extends HControlFlow {
}
class HBreak extends HGoto {
- final SourceString label;
+ final LabelElement label;
HBreak([this.label]);
- toString() => 'break';
+ toString() => label === null ? 'break' : 'break ${label.labelName}';
accept(HVisitor visitor) => visitor.visitBreak(this);
}

Powered by Google App Engine
This is Rietveld 408576698