Index: src/compiler/control-builders.cc |
diff --git a/src/compiler/control-builders.cc b/src/compiler/control-builders.cc |
index 2978d8b6484a0fd2f0709b971db14cb3e9b2fc52..6cf2905e613e3e6b4837a262cbe1c3588906d606 100644 |
--- a/src/compiler/control-builders.cc |
+++ b/src/compiler/control-builders.cc |
@@ -73,6 +73,16 @@ void LoopBuilder::BreakUnless(Node* condition) { |
} |
+void LoopBuilder::BreakWhen(Node* condition) { |
+ IfBuilder control_if(builder_); |
+ control_if.If(condition); |
+ control_if.Then(); |
+ Break(); |
+ control_if.Else(); |
+ control_if.End(); |
+} |
+ |
+ |
void SwitchBuilder::BeginSwitch() { |
body_environment_ = environment()->CopyAsUnreachable(); |
label_environment_ = environment()->CopyAsUnreachable(); |