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

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

Issue 1422033002: [Interpreter] Add support for for..in. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Comment nits. 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 629e4bc135e0881cc29bce59dace4d800d6e8528..cd6270ec6fdae24fd2120fb3c64251ae1fa6508c 100644
--- a/test/unittests/interpreter/bytecode-array-builder-unittest.cc
+++ b/test/unittests/interpreter/bytecode-array-builder-unittest.cc
@@ -126,6 +126,7 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
// Emit cast operator invocations.
builder.CastAccumulatorToNumber()
.CastAccumulatorToBoolean()
+ .CastAccumulatorToJSObject()
.CastAccumulatorToName();
// Emit control flow. Return must be the last instruction.
@@ -136,7 +137,10 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
.JumpIfTrue(&start)
.JumpIfFalse(&start)
.JumpIfToBooleanTrue(&start)
- .JumpIfToBooleanFalse(&start);
+ .JumpIfToBooleanFalse(&start)
+ .JumpIfNull(&start)
+ .JumpIfUndefined(&start);
+
// Insert dummy ops to force longer jumps
for (int i = 0; i < 128; i++) {
builder.LoadTrue();
@@ -146,12 +150,16 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
.JumpIfTrue(&start)
.JumpIfFalse(&start)
.JumpIfToBooleanTrue(&start)
- .JumpIfToBooleanFalse(&start);
+ .JumpIfToBooleanFalse(&start)
+ .JumpIfNull(&start)
+ .JumpIfUndefined(&start);
builder.EnterBlock()
.Throw()
.LeaveBlock();
+ builder.ForInPrepare(reg).ForInDone(reg).ForInNext(reg, reg);
+
builder.Return();
// Generate BytecodeArray.

Powered by Google App Engine
This is Rietveld 408576698