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 4dc5d5d32dbae3dcf08a0d8ec63b7b5220cf9373..0c4f431dbe405ee0fd83222e56502bd036f42fe1 100644 |
--- a/test/unittests/interpreter/bytecode-array-builder-unittest.cc |
+++ b/test/unittests/interpreter/bytecode-array-builder-unittest.cc |
@@ -30,6 +30,12 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) { |
CHECK_EQ(builder.context_count(), 1); |
CHECK_EQ(builder.fixed_register_count(), 132); |
+ // Emit argument creation operations. CreateRestArguments should |
+ // be output before any bytecodes that change constant pool. |
+ builder.CreateArguments(CreateArgumentsType::kMappedArguments) |
+ .CreateArguments(CreateArgumentsType::kUnmappedArguments) |
+ .CreateRestArguments(0); |
+ |
// Emit constant loads. |
builder.LoadLiteral(Smi::FromInt(0)) |
.LoadLiteral(Smi::FromInt(8)) |
@@ -91,10 +97,6 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) { |
false); |
builder.CreateClosure(shared_info, NOT_TENURED); |
- // Emit argument creation operations. |
- builder.CreateArguments(CreateArgumentsType::kMappedArguments) |
- .CreateArguments(CreateArgumentsType::kUnmappedArguments); |
- |
// Emit literal creation operations. |
builder.CreateRegExpLiteral(factory->NewStringFromStaticChars("a"), 0, 0) |
.CreateArrayLiteral(factory->NewFixedArray(1), 0, 0) |