| 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_;
|
|
|