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 72af0c4f5389c935856f2e37b9dd60ea939247b5..9b4d3abbf28d4d2c149c935455cdc77c8a19962b 100644 |
--- a/test/unittests/interpreter/bytecode-array-builder-unittest.cc |
+++ b/test/unittests/interpreter/bytecode-array-builder-unittest.cc |
@@ -22,6 +22,7 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) { |
BytecodeArrayBuilder builder(isolate()); |
builder.set_locals_count(1); |
+ builder.set_parameter_count(0); |
CHECK_EQ(builder.locals_count(), 1); |
// Emit constant loads. |
@@ -79,6 +80,7 @@ TEST_F(BytecodeArrayBuilderTest, FrameSizesLookGood) { |
for (int locals = 0; locals < 5; locals++) { |
for (int temps = 0; temps < 3; temps++) { |
BytecodeArrayBuilder builder(isolate()); |
+ builder.set_parameter_count(0); |
builder.set_locals_count(locals); |
builder.Return(); |
@@ -97,6 +99,7 @@ TEST_F(BytecodeArrayBuilderTest, FrameSizesLookGood) { |
TEST_F(BytecodeArrayBuilderTest, TemporariesRecycled) { |
BytecodeArrayBuilder builder(isolate()); |
+ builder.set_parameter_count(0); |
builder.set_locals_count(0); |
builder.Return(); |
@@ -133,6 +136,17 @@ TEST_F(BytecodeArrayBuilderTest, RegisterValues) { |
CHECK_EQ(actual_index, index); |
} |
+ |
+TEST_F(BytecodeArrayBuilderTest, Parameters) { |
+ BytecodeArrayBuilder builder(isolate()); |
+ builder.set_parameter_count(10); |
+ builder.set_locals_count(0); |
+ |
+ Register param0(builder.Parameter(0)); |
+ Register param9(builder.Parameter(9)); |
+ CHECK_EQ(param9.index() - param0.index(), 9); |
+} |
+ |
} // namespace interpreter |
} // namespace internal |
} // namespace v8 |