Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Unified Diff: src/compiler/bytecode-graph-builder.h

Issue 1641893004: [interpreter] Simplify graph builder control flow simulation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_interpreter-cleanup-move-environment
Patch Set: Rebased. Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/bytecode-branch-analysis.cc ('k') | src/compiler/bytecode-graph-builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/bytecode-graph-builder.h
diff --git a/src/compiler/bytecode-graph-builder.h b/src/compiler/bytecode-graph-builder.h
index 7932b8722827a0112b1063ed1c7d1a5e6e64c42f..a25f3a2037d5002906a4232100b46b5311adfc5b 100644
--- a/src/compiler/bytecode-graph-builder.h
+++ b/src/compiler/bytecode-graph-builder.h
@@ -147,17 +147,15 @@ class BytecodeGraphBuilder {
void BuildForInNext();
// Control flow plumbing.
- void BuildJump(int source_offset, int target_offset);
void BuildJump();
void BuildConditionalJump(Node* condition);
void BuildJumpIfEqual(Node* comperand);
void BuildJumpIfToBooleanEqual(Node* boolean_comperand);
- // Constructing merge and loop headers.
- void MergeEnvironmentsOfBackwardBranches(int source_offset,
- int target_offset);
- void MergeEnvironmentsOfForwardBranches(int source_offset);
- void BuildLoopHeaderForBackwardBranches(int source_offset);
+ // Simulates control flow by forward-propagating environments.
+ void MergeIntoSuccessorEnvironment(int target_offset);
+ void BuildLoopHeaderEnvironment(int current_offset);
+ void SwitchToMergeEnvironment(int current_offset);
// Simulates entry and exit of exception handlers.
void EnterAndExitExceptionHandlers(int current_offset);
@@ -233,14 +231,11 @@ class BytecodeGraphBuilder {
BytecodeBranchAnalysis* branch_analysis_; // TODO(mstarzinger): Make const.
Environment* environment_;
- // Merge environments are snapshots of the environment at a particular
- // bytecode offset to be merged into a later environment.
+ // Merge environments are snapshots of the environment at points where the
+ // control flow merges. This models a forward data flow propagation of all
+ // values from all predecessors of the merge in question.
ZoneMap<int, Environment*> merge_environments_;
- // Loop header environments are environments created for bytecodes
- // where it is known there are back branches, ie a loop header.
- ZoneMap<int, Environment*> loop_header_environments_;
-
// Exception handlers currently entered by the iteration.
ZoneStack<ExceptionHandler> exception_handlers_;
int current_exception_handler_;
« no previous file with comments | « src/compiler/bytecode-branch-analysis.cc ('k') | src/compiler/bytecode-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698