Index: src/interpreter/control-flow-builders.cc |
diff --git a/src/interpreter/control-flow-builders.cc b/src/interpreter/control-flow-builders.cc |
index 1a1d3b45a35d805993bad81cd32478ead9ddf13e..1624712425392f6addf140473ede669b059f6760 100644 |
--- a/src/interpreter/control-flow-builders.cc |
+++ b/src/interpreter/control-flow-builders.cc |
@@ -102,11 +102,21 @@ void LoopBuilder::LoopHeader(ZoneVector<BytecodeLabel>* additional_labels) { |
} |
} |
+void LoopBuilder::JumpToHeader() { |
+ // Loop must have closed form, i.e. all loop elements are within the loop, |
+ // the loop header precedes the body and next elements in the loop. |
+ DCHECK(loop_header_.is_bound()); |
+ builder()->Jump(&loop_header_); |
+} |
-void LoopBuilder::EndLoop() { |
+void LoopBuilder::JumpToHeaderIfTrue() { |
// Loop must have closed form, i.e. all loop elements are within the loop, |
// the loop header precedes the body and next elements in the loop. |
DCHECK(loop_header_.is_bound()); |
+ builder()->JumpIfTrue(&loop_header_); |
+} |
+ |
+void LoopBuilder::EndLoop() { |
builder()->Bind(&loop_end_); |
SetBreakTarget(loop_end_); |
} |