Chromium Code Reviews| Index: src/interpreter/bytecode-array-builder.cc |
| diff --git a/src/interpreter/bytecode-array-builder.cc b/src/interpreter/bytecode-array-builder.cc |
| index b901916b60b16df9d5c24db492526e12109ad991..33c51a699eed27f6f19e32738242c0eada57fae3 100644 |
| --- a/src/interpreter/bytecode-array-builder.cc |
| +++ b/src/interpreter/bytecode-array-builder.cc |
| @@ -989,6 +989,7 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::New(Register constructor, |
| BytecodeArrayBuilder& BytecodeArrayBuilder::CallRuntime( |
| Runtime::FunctionId function_id, Register first_arg, size_t arg_count) { |
| + DCHECK_EQ(1, Runtime::FunctionForId(function_id)->result_size); |
| DCHECK(FitsInIdx16Operand(function_id)); |
| DCHECK(FitsInIdx8Operand(arg_count)); |
| if (!first_arg.is_valid()) { |
| @@ -1001,6 +1002,23 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::CallRuntime( |
| } |
| +BytecodeArrayBuilder& BytecodeArrayBuilder::CallRuntimePair( |
|
oth
2016/01/06 15:09:17
This doesn't look like it's called except in tests
rmcilroy
2016/01/06 15:23:25
Yup, as mentioned in the CL message, this is teste
|
| + Runtime::FunctionId function_id, Register first_arg, size_t arg_count, |
| + Register first_return) { |
| + DCHECK_EQ(2, Runtime::FunctionForId(function_id)->result_size); |
| + DCHECK(FitsInIdx16Operand(function_id)); |
| + DCHECK(FitsInIdx8Operand(arg_count)); |
| + if (!first_arg.is_valid()) { |
| + DCHECK_EQ(0u, arg_count); |
| + first_arg = Register(0); |
| + } |
| + Output(Bytecode::kCallRuntimePair, static_cast<uint16_t>(function_id), |
| + first_arg.ToOperand(), static_cast<uint8_t>(arg_count), |
| + first_return.ToOperand()); |
| + return *this; |
| +} |
| + |
| + |
| BytecodeArrayBuilder& BytecodeArrayBuilder::CallJSRuntime(int context_index, |
| Register receiver, |
| size_t arg_count) { |