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..cefd9bb6def1ae69219bb16500e9f8a89a92c631 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 would always be the first entry in the constant pool, since rest |
rmcilroy
2016/02/03 14:00:56
/s/since rest/since the rest/
rmcilroy
2016/02/03 14:00:56
/s/would/will
mythria
2016/02/03 15:56:16
Done.
mythria
2016/02/03 15:56:16
Done.
|
+ // arguments object is created at the start of function just after creating |
rmcilroy
2016/02/03 14:00:56
/s/function/the function/
mythria
2016/02/03 15:56:16
Done.
|
+ // arguments object. |
rmcilroy
2016/02/03 14:00:56
/s/arguments/the arguments
mythria
2016/02/03 15:56:16
Done.
|
+ DCHECK_EQ(index_entry, 0); |
mythria
2016/02/03 12:44:36
I will change it to DCHECK(FitsInIdx8Operand(index
rmcilroy
2016/02/03 14:00:56
Yes please do that, but also make it a CHECK rathe
mythria
2016/02/03 15:56:16
Done.
|
+ Output(Bytecode::kCreateRestArguments, static_cast<uint8_t>(index_entry)); |
+ return *this; |
+} |
BytecodeArrayBuilder& BytecodeArrayBuilder::CreateRegExpLiteral( |
Handle<String> pattern, int literal_index, int flags) { |