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

Unified Diff: test/unittests/interpreter/bytecode-array-builder-unittest.cc

Issue 1399773002: [Interpreter] Adds logical and, logical or and comma operators to interpreter (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Added a new bytecode to jump by casting the value to boolean. This reduces code size for logical op… Created 5 years, 2 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
Index: test/unittests/interpreter/bytecode-array-builder-unittest.cc
diff --git a/test/unittests/interpreter/bytecode-array-builder-unittest.cc b/test/unittests/interpreter/bytecode-array-builder-unittest.cc
index 32acf9f15ca9a249adac1cd0b99926a36c733435..0d9057786a65410b3c3ebbb2baefc731b893098f 100644
--- a/test/unittests/interpreter/bytecode-array-builder-unittest.cc
+++ b/test/unittests/interpreter/bytecode-array-builder-unittest.cc
@@ -106,12 +106,14 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
builder.Bind(&start);
// Short jumps with Imm8 operands
builder.Jump(&start).JumpIfTrue(&start).JumpIfFalse(&start);
+ builder.JumpIfToBooleanTrue(&start).JumpIfToBooleanFalse(&start);
rmcilroy 2015/10/13 15:43:24 nit - you can avoid the builder. and just make thi
mythria 2015/10/14 13:33:42 Done.
// Insert dummy ops to force longer jumps
for (int i = 0; i < 128; i++) {
builder.LoadTrue();
}
// Longer jumps requiring Constant operand
builder.Jump(&start).JumpIfTrue(&start).JumpIfFalse(&start);
+ builder.JumpIfToBooleanTrue(&start).JumpIfToBooleanFalse(&start);
builder.Return();
// Generate BytecodeArray.
« test/cctest/interpreter/test-interpreter.cc ('K') | « test/cctest/interpreter/test-interpreter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698