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

Unified Diff: src/interpreter/control-flow-builders.cc

Issue 2795183002: [Interpreter] Move ToBoolean elision in BytecodeGenerator. (Closed)
Patch Set: tests Created 3 years, 8 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/interpreter/control-flow-builders.h ('k') | src/interpreter/mkpeephole.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/control-flow-builders.cc
diff --git a/src/interpreter/control-flow-builders.cc b/src/interpreter/control-flow-builders.cc
index 41d1ad82d9c9a704fea57596950daffc90e6981e..81041e6a3d29eb6ccebb75a03ad7f28676a4d181 100644
--- a/src/interpreter/control-flow-builders.cc
+++ b/src/interpreter/control-flow-builders.cc
@@ -22,12 +22,14 @@ void BreakableControlFlowBuilder::EmitJump(BytecodeLabels* sites) {
builder()->Jump(sites->New());
}
-void BreakableControlFlowBuilder::EmitJumpIfTrue(BytecodeLabels* sites) {
- builder()->JumpIfTrue(sites->New());
+void BreakableControlFlowBuilder::EmitJumpIfTrue(
+ BytecodeArrayBuilder::ToBooleanMode mode, BytecodeLabels* sites) {
+ builder()->JumpIfTrue(mode, sites->New());
}
-void BreakableControlFlowBuilder::EmitJumpIfFalse(BytecodeLabels* sites) {
- builder()->JumpIfFalse(sites->New());
+void BreakableControlFlowBuilder::EmitJumpIfFalse(
+ BytecodeArrayBuilder::ToBooleanMode mode, BytecodeLabels* sites) {
+ builder()->JumpIfFalse(mode, sites->New());
}
void BreakableControlFlowBuilder::EmitJumpIfUndefined(BytecodeLabels* sites) {
@@ -38,7 +40,6 @@ void BreakableControlFlowBuilder::EmitJumpIfNull(BytecodeLabels* sites) {
builder()->JumpIfNull(sites->New());
}
-
void BlockBuilder::EndBlock() {
builder()->Bind(&block_end_);
BindBreakTarget();
« no previous file with comments | « src/interpreter/control-flow-builders.h ('k') | src/interpreter/mkpeephole.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698