Index: src/interpreter/bytecode-array-builder.cc |
diff --git a/src/interpreter/bytecode-array-builder.cc b/src/interpreter/bytecode-array-builder.cc |
index 68972c81c2a26786bcf9bf3f919974aca3102069..6f380efe6efe91f27f20c92a9cd5a43e720674bc 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 { |
@@ -1123,10 +1124,16 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::CallRuntime( |
first_arg = Register(0); |
} |
if (FitsInReg8Operand(first_arg) && FitsInIdx8Operand(arg_count)) { |
- Output(Bytecode::kCallRuntime, static_cast<uint16_t>(function_id), |
+ Bytecode bytecode = IntrinsicsHelper::IsSupported(function_id) |
rmcilroy
2016/03/05 04:21:46
Please pull this out above the if block and then a
epertoso
2016/03/07 11:26:35
Done.
|
+ ? Bytecode::kInvokeIntrinsic |
+ : Bytecode::kCallRuntime; |
+ 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), |
+ Bytecode bytecode = IntrinsicsHelper::IsSupported(function_id) |
+ ? Bytecode::kInvokeIntrinsicWide |
+ : Bytecode::kCallRuntimeWide; |
+ Output(bytecode, static_cast<uint16_t>(function_id), |
first_arg.ToRawOperand(), static_cast<uint16_t>(arg_count)); |
} else { |
UNIMPLEMENTED(); |