Index: src/compiler/bytecode-graph-builder.h |
diff --git a/src/compiler/bytecode-graph-builder.h b/src/compiler/bytecode-graph-builder.h |
index d3742008c9b067df265b252f647ebec5ad4b3307..89f4f798851bc9484f245879de02b347fd0d05a5 100644 |
--- a/src/compiler/bytecode-graph-builder.h |
+++ b/src/compiler/bytecode-graph-builder.h |
@@ -7,6 +7,7 @@ |
#include "src/compiler.h" |
#include "src/compiler/bytecode-branch-analysis.h" |
+#include "src/compiler/bytecode-loop-analysis.h" |
#include "src/compiler/js-graph.h" |
#include "src/interpreter/bytecode-array-iterator.h" |
#include "src/interpreter/bytecode-flags.h" |
@@ -148,6 +149,12 @@ class BytecodeGraphBuilder { |
// Simulates control flow that exits the function body. |
void MergeControlToLeaveFunction(Node* exit); |
+ // Builds loop exit nodes for every exited loop between the current bytecode |
+ // offset and {target_offset}. |
+ void BuildLoopExitsForBranch(int target_offset); |
+ void BuildLoopExitsForFunctionExit(); |
+ void BuildLoopExitsUntilLoop(int loop_offset); |
+ |
// Simulates entry and exit of exception handlers. |
void EnterAndExitExceptionHandlers(int current_offset); |
@@ -203,6 +210,12 @@ class BytecodeGraphBuilder { |
branch_analysis_ = branch_analysis; |
} |
+ const BytecodeLoopAnalysis* loop_analysis() const { return loop_analysis_; } |
+ |
+ void set_loop_analysis(const BytecodeLoopAnalysis* loop_analysis) { |
+ loop_analysis_ = loop_analysis; |
+ } |
+ |
#define DECLARE_VISIT_BYTECODE(name, ...) void Visit##name(); |
BYTECODE_LIST(DECLARE_VISIT_BYTECODE) |
#undef DECLARE_VISIT_BYTECODE |
@@ -215,6 +228,7 @@ class BytecodeGraphBuilder { |
const FrameStateFunctionInfo* frame_state_function_info_; |
const interpreter::BytecodeArrayIterator* bytecode_iterator_; |
const BytecodeBranchAnalysis* branch_analysis_; |
+ const BytecodeLoopAnalysis* loop_analysis_; |
Environment* environment_; |
BailoutId osr_ast_id_; |