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

Unified Diff: src/compiler/code-assembler.cc

Issue 2579163003: [turbofan] Combine family of CallJS() methods into single implementation. (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « src/compiler/code-assembler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/code-assembler.cc
diff --git a/src/compiler/code-assembler.cc b/src/compiler/code-assembler.cc
index 25d93f0fac8ad9ba598c1f43ad99454abf6f541a..4c4594e47a5cfff0ebbf9ba714b7e419f307aa21 100644
--- a/src/compiler/code-assembler.cc
+++ b/src/compiler/code-assembler.cc
@@ -485,11 +485,11 @@ Node* CodeAssembler::CallStubR(const CallInterfaceDescriptor& descriptor,
return CallStubN(descriptor, result_size, arraysize(nodes), nodes);
}
-// Instantiate CallStubR() with up to 5 arguments.
+// Instantiate CallStubR() with up to 6 arguments.
#define INSTANTIATE(...) \
template V8_EXPORT_PRIVATE Node* CodeAssembler::CallStubR( \
const CallInterfaceDescriptor& descriptor, size_t, Node*, __VA_ARGS__);
-REPEAT_1_TO_6(INSTANTIATE, Node*)
+REPEAT_1_TO_7(INSTANTIATE, Node*)
#undef INSTANTIATE
Node* CodeAssembler::CallStubN(const CallInterfaceDescriptor& descriptor,
@@ -513,18 +513,6 @@ Node* CodeAssembler::CallStubN(const CallInterfaceDescriptor& descriptor,
return return_value;
}
-Node* CodeAssembler::CallStubN(const CallInterfaceDescriptor& descriptor,
- int js_parameter_count, Node* target,
- Node** args, size_t result_size) {
- CallDescriptor* call_descriptor = Linkage::GetStubCallDescriptor(
- isolate(), zone(), descriptor,
- descriptor.GetStackParameterCount() + js_parameter_count,
- CallDescriptor::kNoFlags, Operator::kNoProperties,
- MachineType::AnyTagged(), result_size);
-
- return CallN(call_descriptor, target, args);
-}
-
Node* CodeAssembler::TailCallStub(Callable const& callable, Node* context,
Node* arg1, size_t result_size) {
Node* target = HeapConstant(callable.code());
@@ -680,72 +668,6 @@ Node* CodeAssembler::TailCallBytecodeDispatch(
return raw_assembler()->TailCallN(descriptor, code_target_address, args);
}
-Node* CodeAssembler::CallJS(Callable const& callable, Node* context,
- Node* function, Node* receiver,
- size_t result_size) {
- const int argc = 0;
- Node* target = HeapConstant(callable.code());
-
- Node** args = zone()->NewArray<Node*>(argc + 4);
- args[0] = function;
- args[1] = Int32Constant(argc);
- args[2] = receiver;
- args[3] = context;
-
- return CallStubN(callable.descriptor(), argc + 1, target, args, result_size);
-}
-
-Node* CodeAssembler::CallJS(Callable const& callable, Node* context,
- Node* function, Node* receiver, Node* arg1,
- size_t result_size) {
- const int argc = 1;
- Node* target = HeapConstant(callable.code());
-
- Node** args = zone()->NewArray<Node*>(argc + 4);
- args[0] = function;
- args[1] = Int32Constant(argc);
- args[2] = receiver;
- args[3] = arg1;
- args[4] = context;
-
- return CallStubN(callable.descriptor(), argc + 1, target, args, result_size);
-}
-
-Node* CodeAssembler::CallJS(Callable const& callable, Node* context,
- Node* function, Node* receiver, Node* arg1,
- Node* arg2, size_t result_size) {
- const int argc = 2;
- Node* target = HeapConstant(callable.code());
-
- Node** args = zone()->NewArray<Node*>(argc + 4);
- args[0] = function;
- args[1] = Int32Constant(argc);
- args[2] = receiver;
- args[3] = arg1;
- args[4] = arg2;
- args[5] = context;
-
- return CallStubN(callable.descriptor(), argc + 1, target, args, result_size);
-}
-
-Node* CodeAssembler::CallJS(Callable const& callable, Node* context,
- Node* function, Node* receiver, Node* arg1,
- Node* arg2, Node* arg3, size_t result_size) {
- const int argc = 3;
- Node* target = HeapConstant(callable.code());
-
- Node** args = zone()->NewArray<Node*>(argc + 4);
- args[0] = function;
- args[1] = Int32Constant(argc);
- args[2] = receiver;
- args[3] = arg1;
- args[4] = arg2;
- args[5] = arg3;
- args[6] = context;
-
- return CallStubN(callable.descriptor(), argc + 1, target, args, result_size);
-}
-
Node* CodeAssembler::CallCFunction2(MachineType return_type,
MachineType arg0_type,
MachineType arg1_type, Node* function,
« no previous file with comments | « src/compiler/code-assembler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698