summaryrefslogtreecommitdiff
path: root/deps/v8/src/interpreter/control-flow-builders.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/interpreter/control-flow-builders.h')
-rw-r--r--deps/v8/src/interpreter/control-flow-builders.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/deps/v8/src/interpreter/control-flow-builders.h b/deps/v8/src/interpreter/control-flow-builders.h
index 313c9aa536..8cff017e78 100644
--- a/deps/v8/src/interpreter/control-flow-builders.h
+++ b/deps/v8/src/interpreter/control-flow-builders.h
@@ -90,13 +90,15 @@ class V8_EXPORT_PRIVATE LoopBuilder final : public BreakableControlFlowBuilder {
explicit LoopBuilder(BytecodeArrayBuilder* builder)
: BreakableControlFlowBuilder(builder),
continue_labels_(builder->zone()),
- header_labels_(builder->zone()) {}
+ generator_jump_table_location_(nullptr),
+ parent_generator_jump_table_(nullptr) {}
~LoopBuilder();
- void LoopHeader(ZoneVector<BytecodeLabel>* additional_labels = nullptr);
+ void LoopHeader();
+ void LoopHeaderInGenerator(BytecodeJumpTable** parent_generator_jump_table,
+ int first_resume_id, int resume_count);
void JumpToHeader(int loop_depth);
void BindContinueTarget();
- void EndLoop();
// This method is called when visiting continue statements in the AST.
// Inserts a jump to an unbound label that is patched when BindContinueTarget
@@ -111,7 +113,13 @@ class V8_EXPORT_PRIVATE LoopBuilder final : public BreakableControlFlowBuilder {
// Unbound labels that identify jumps for continue statements in the code and
// jumps from checking the loop condition to the header for do-while loops.
BytecodeLabels continue_labels_;
- BytecodeLabels header_labels_;
+
+ // While we're in the loop, we want to have a different jump table for
+ // generator switch statements. We restore it at the end of the loop.
+ // TODO(leszeks): Storing a pointer to the BytecodeGenerator's jump table
+ // field is ugly, figure out a better way to do this.
+ BytecodeJumpTable** generator_jump_table_location_;
+ BytecodeJumpTable* parent_generator_jump_table_;
};