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

Unified Diff: lib/compiler/implementation/ssa/validate.dart

Issue 10511007: Make HBreak and HContinue not extend HGoto. They now extend HJump which is independent of HGoto. To… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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: lib/compiler/implementation/ssa/validate.dart
diff --git a/lib/compiler/implementation/ssa/validate.dart b/lib/compiler/implementation/ssa/validate.dart
index c247235b5f8eea657975951467de0677142ac86a..bfddd11e6fe28c7279fc3f9586fa43eecd537aaa 100644
--- a/lib/compiler/implementation/ssa/validate.dart
+++ b/lib/compiler/implementation/ssa/validate.dart
@@ -39,6 +39,9 @@ class HValidator extends HInstructionVisitor {
if (block.last is HGoto && block.successors.length != 1) {
markInvalid("Goto node without one successor");
}
+ if (block.last is HJump && block.successors.length != 1) {
+ markInvalid("Break or continue node without one successor");
+ }
if (block.last is HReturn &&
(block.successors.length != 1 || !block.successors[0].isExitBlock())) {
markInvalid("Return node with > 1 succesor or not going to exit-block");
« lib/compiler/implementation/ssa/codegen.dart ('K') | « lib/compiler/implementation/ssa/nodes.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698