Index: src/interpreter/bytecode-array-builder.cc |
diff --git a/src/interpreter/bytecode-array-builder.cc b/src/interpreter/bytecode-array-builder.cc |
index 4a1602a1d6ea6c3749cc74b30111c53a4cd1e730..6387cdae9d6145ba819ab07e62e14503f8380481 100644 |
--- a/src/interpreter/bytecode-array-builder.cc |
+++ b/src/interpreter/bytecode-array-builder.cc |
@@ -606,6 +606,16 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::CreateArguments( |
return *this; |
} |
+BytecodeArrayBuilder& BytecodeArrayBuilder::CreateRestArguments(int index) { |
+ size_t index_entry = |
+ GetConstantPoolEntry(Handle<Object>(Smi::FromInt(index), isolate_)); |
+ // This will always be the first entry in the constant pool, since the rest |
+ // arguments object is created at the start of the function just after |
+ // creating the arguments object. |
+ CHECK(FitsInIdx8Operand(index_entry)); |
+ Output(Bytecode::kCreateRestArguments, static_cast<uint8_t>(index_entry)); |
+ return *this; |
+} |
BytecodeArrayBuilder& BytecodeArrayBuilder::CreateRegExpLiteral( |
Handle<String> pattern, int literal_index, int flags) { |