Index: src/compiler/control-builders.cc |
diff --git a/src/compiler/control-builders.cc b/src/compiler/control-builders.cc |
index 0e4f1683b86668d5d623f88a56f192cad4bd6ada..6bc364965c0c6a55d7bed600855f9bdad07b2596 100644 |
--- a/src/compiler/control-builders.cc |
+++ b/src/compiler/control-builders.cc |
@@ -143,6 +143,16 @@ void BlockBuilder::Break() { |
} |
+void BlockBuilder::BreakWhen(Node* condition, BranchHint hint) { |
+ IfBuilder control_if(builder_); |
+ control_if.If(condition, hint); |
+ control_if.Then(); |
+ Break(); |
+ control_if.Else(); |
+ control_if.End(); |
+} |
+ |
+ |
void BlockBuilder::EndBlock() { |
break_environment_->Merge(environment()); |
set_environment(break_environment_); |