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

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

Issue 1641143002: [Interpreter] Adds a placeholder merge node when visiting jumps. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address review comments 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 | « no previous file | test/cctest/compiler/test-run-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.cc
diff --git a/src/compiler/bytecode-graph-builder.cc b/src/compiler/bytecode-graph-builder.cc
index 843cd5f85808289c3b2b9a177757dff0d68a8edc..178a8811f2f4b73bc8009b0cc3bbd281baa17001 100644
--- a/src/compiler/bytecode-graph-builder.cc
+++ b/src/compiler/bytecode-graph-builder.cc
@@ -1898,6 +1898,12 @@ void BytecodeGraphBuilder::BuildLoopHeaderForBackwardBranches(
void BytecodeGraphBuilder::BuildJump(int source_offset, int target_offset) {
DCHECK_NULL(merge_environments_[source_offset]);
+ // Append merge nodes to the environment. We may merge here with another
+ // environment. So add a place holder for merge nodes. We may add redundant
+ // but will be eliminated in a later pass.
+ // TODO(mstarzinger): This can be simplified by propagating environment
+ // forward along the direction of the dataflow.
+ NewMerge();
merge_environments_[source_offset] = environment();
if (source_offset >= target_offset) {
MergeEnvironmentsOfBackwardBranches(source_offset, target_offset);
« no previous file with comments | « no previous file | test/cctest/compiler/test-run-bytecode-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698