Index: src/interpreter/bytecode-array-builder.cc |
diff --git a/src/interpreter/bytecode-array-builder.cc b/src/interpreter/bytecode-array-builder.cc |
index 248aeebe7776707d01b3c03a4c23b6219d14777a..bfb3c8c8e4eb1b8f8ac47360582014d0b7f0b267 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 { |
@@ -1026,11 +1027,13 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::CallRuntime( |
DCHECK_EQ(0u, arg_count); |
first_arg = Register(0); |
} |
+ Bytecode bytecode = IntrinsicsHelper::IsSupported(function_id) |
+ ? Bytecode::kInvokeIntrinsic |
+ : Bytecode::kCallRuntime; |
OperandScale operand_scale = OperandSizesToScale( |
SizeForRegisterOperand(first_arg), SizeForUnsignedOperand(arg_count)); |
- OutputScaled(Bytecode::kCallRuntime, operand_scale, |
- static_cast<uint16_t>(function_id), RegisterOperand(first_arg), |
- UnsignedOperand(arg_count)); |
+ OutputScaled(bytecode, operand_scale, static_cast<uint16_t>(function_id), |
+ RegisterOperand(first_arg), UnsignedOperand(arg_count)); |
return *this; |
} |