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

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

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 | « no previous file | src/compiler/code-assembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/code-assembler.h
diff --git a/src/compiler/code-assembler.h b/src/compiler/code-assembler.h
index 96ee97630c0bd0432f1c478e4ed80cc315b43697..a8aa86c04811fe49d3faa3a10a7f65b4ed2a82a4 100644
--- a/src/compiler/code-assembler.h
+++ b/src/compiler/code-assembler.h
@@ -327,14 +327,6 @@ class V8_EXPORT_PRIVATE CodeAssembler {
Node* CallStubN(const CallInterfaceDescriptor& descriptor, size_t result_size,
int input_count, Node* const* inputs);
- Node* CallStubN(const CallInterfaceDescriptor& descriptor,
- int js_parameter_count, Node* target, Node** args,
- size_t result_size = 1);
- Node* CallStubN(const CallInterfaceDescriptor& descriptor, Node* target,
- Node** args, size_t result_size = 1) {
- return CallStubN(descriptor, 0, target, args, result_size);
- }
-
Node* TailCallStub(Callable const& callable, Node* context, Node* arg1,
size_t result_size = 1);
Node* TailCallStub(Callable const& callable, Node* context, Node* arg1,
@@ -370,15 +362,13 @@ class V8_EXPORT_PRIVATE CodeAssembler {
Node* TailCallBytecodeDispatch(const CallInterfaceDescriptor& descriptor,
Node* code_target_address, Node** args);
+ template <class... TArgs>
Node* CallJS(Callable const& callable, Node* context, Node* function,
- Node* receiver, size_t result_size = 1);
- Node* CallJS(Callable const& callable, Node* context, Node* function,
- Node* receiver, Node* arg1, size_t result_size = 1);
- Node* CallJS(Callable const& callable, Node* context, Node* function,
- Node* receiver, Node* arg1, Node* arg2, size_t result_size = 1);
- Node* CallJS(Callable const& callable, Node* context, Node* function,
- Node* receiver, Node* arg1, Node* arg2, Node* arg3,
- size_t result_size = 1);
+ Node* receiver, TArgs... args) {
+ int argc = static_cast<int>(sizeof...(args));
+ Node* arity = Int32Constant(argc);
+ return CallStub(callable, context, function, arity, receiver, args...);
+ }
// Call to a C function with two arguments.
Node* CallCFunction2(MachineType return_type, MachineType arg0_type,
@@ -407,8 +397,6 @@ class V8_EXPORT_PRIVATE CodeAssembler {
Node* CallN(CallDescriptor* descriptor, Node* code_target, Node** args);
Node* TailCallN(CallDescriptor* descriptor, Node* code_target, Node** args);
- void InstallBreakOnNodeDecorator();
-
RawMachineAssembler* raw_assembler() const;
CodeAssemblerState* state_;
« no previous file with comments | « no previous file | src/compiler/code-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698