| Index: src/interpreter/bytecode-array-builder.cc
|
| diff --git a/src/interpreter/bytecode-array-builder.cc b/src/interpreter/bytecode-array-builder.cc
|
| index 271d054caa40a3c0f33cdcfcbc83d29a9957ebca..ecc1d03891228a3f3af448b8998c510868a36a2b 100644
|
| --- a/src/interpreter/bytecode-array-builder.cc
|
| +++ b/src/interpreter/bytecode-array-builder.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "src/interpreter/bytecode-array-builder.h"
|
| #include "src/compiler.h"
|
| +#include "src/interpreter/interpreter-intrinsics.h"
|
|
|
| namespace v8 {
|
| namespace internal {
|
| @@ -1121,19 +1122,22 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::CallRuntime(
|
| DCHECK_EQ(0u, arg_count);
|
| first_arg = Register(0);
|
| }
|
| + Bytecode bytecode = IntrinsicsHelper::IsSupported(function_id)
|
| + ? Bytecode::kInvokeIntrinsic
|
| + : Bytecode::kCallRuntime;
|
| if (FitsInReg8Operand(first_arg) && FitsInIdx8Operand(arg_count)) {
|
| - Output(Bytecode::kCallRuntime, static_cast<uint16_t>(function_id),
|
| + Output(bytecode, static_cast<uint16_t>(function_id),
|
| first_arg.ToRawOperand(), static_cast<uint8_t>(arg_count));
|
| } else if (FitsInReg16Operand(first_arg) && FitsInIdx16Operand(arg_count)) {
|
| - Output(Bytecode::kCallRuntimeWide, static_cast<uint16_t>(function_id),
|
| - first_arg.ToRawOperand(), static_cast<uint16_t>(arg_count));
|
| + Output(BytecodeForWideOperands(bytecode),
|
| + static_cast<uint16_t>(function_id), first_arg.ToRawOperand(),
|
| + static_cast<uint16_t>(arg_count));
|
| } else {
|
| UNIMPLEMENTED();
|
| }
|
| return *this;
|
| }
|
|
|
| -
|
| BytecodeArrayBuilder& BytecodeArrayBuilder::CallRuntimeForPair(
|
| Runtime::FunctionId function_id, Register first_arg, size_t arg_count,
|
| Register first_return) {
|
| @@ -1473,6 +1477,10 @@ Bytecode BytecodeArrayBuilder::BytecodeForWideOperands(Bytecode bytecode) {
|
| return Bytecode::kStaLookupSlotStrictWide;
|
| case Bytecode::kStaLookupSlotSloppy:
|
| return Bytecode::kStaLookupSlotSloppyWide;
|
| + case Bytecode::kInvokeIntrinsic:
|
| + return Bytecode::kInvokeIntrinsicWide;
|
| + case Bytecode::kCallRuntime:
|
| + return Bytecode::kCallRuntimeWide;
|
| default:
|
| UNREACHABLE();
|
| return static_cast<Bytecode>(-1);
|
|
|