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

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

Issue 2668933002: Revert of [turbofan] Constant propagation for JumpIfFalse/JumpIfTrue. (Closed)
Patch Set: Created 3 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/code-stub-assembler.cc ('k') | src/compiler/simplified-lowering.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 c89117c5cd283da8e7efe772bc03725fd35e636c..bafc0e7a9da446f4b42575a5e068cdc6dd1d92f4 100644
--- a/src/compiler/bytecode-graph-builder.cc
+++ b/src/compiler/bytecode-graph-builder.cc
@@ -2072,25 +2072,11 @@
}
void BytecodeGraphBuilder::BuildJumpIfFalse() {
- NewBranch(environment()->LookupAccumulator());
- Environment* if_true_environment = environment()->Copy();
- environment()->BindAccumulator(jsgraph()->FalseConstant());
- NewIfFalse();
- MergeIntoSuccessorEnvironment(bytecode_iterator().GetJumpTargetOffset());
- if_true_environment->BindAccumulator(jsgraph()->TrueConstant());
- set_environment(if_true_environment);
- NewIfTrue();
+ BuildJumpIfNot(environment()->LookupAccumulator());
}
void BytecodeGraphBuilder::BuildJumpIfTrue() {
- NewBranch(environment()->LookupAccumulator());
- Environment* if_false_environment = environment()->Copy();
- environment()->BindAccumulator(jsgraph()->TrueConstant());
- NewIfTrue();
- MergeIntoSuccessorEnvironment(bytecode_iterator().GetJumpTargetOffset());
- if_false_environment->BindAccumulator(jsgraph()->FalseConstant());
- set_environment(if_false_environment);
- NewIfFalse();
+ BuildJumpIf(environment()->LookupAccumulator());
}
void BytecodeGraphBuilder::BuildJumpIfToBooleanTrue() {
« no previous file with comments | « src/code-stub-assembler.cc ('k') | src/compiler/simplified-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698