Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Unified Diff: src/interpreter/bytecode-array-builder.cc

Issue 1645763003: [Interpreter] TurboFan implementation of intrinsics. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Update. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();

Powered by Google App Engine
This is Rietveld 408576698