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

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

Issue 2584743003: [turbofan] Combine family of TailCallStub() 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 a8aa86c04811fe49d3faa3a10a7f65b4ed2a82a4..c212f5ac7bc0c2531dd80837add0c8bdffc249be 100644
--- a/src/compiler/code-assembler.h
+++ b/src/compiler/code-assembler.h
@@ -327,37 +327,15 @@ class V8_EXPORT_PRIVATE CodeAssembler {
Node* CallStubN(const CallInterfaceDescriptor& descriptor, size_t result_size,
int input_count, Node* const* inputs);
- Node* TailCallStub(Callable const& callable, Node* context, Node* arg1,
- size_t result_size = 1);
- Node* TailCallStub(Callable const& callable, Node* context, Node* arg1,
- Node* arg2, size_t result_size = 1);
- Node* TailCallStub(Callable const& callable, Node* context, Node* arg1,
- Node* arg2, Node* arg3, size_t result_size = 1);
- Node* TailCallStub(Callable const& callable, Node* context, Node* arg1,
- Node* arg2, Node* arg3, Node* arg4,
- size_t result_size = 1);
- Node* TailCallStub(Callable const& callable, Node* context, Node* arg1,
- Node* arg2, Node* arg3, Node* arg4, Node* arg5,
- size_t result_size = 1);
+ template <class... TArgs>
+ Node* TailCallStub(Callable const& callable, Node* context, TArgs... args) {
+ Node* target = HeapConstant(callable.code());
+ return TailCallStub(callable.descriptor(), target, context, args...);
+ }
+ template <class... TArgs>
Node* TailCallStub(const CallInterfaceDescriptor& descriptor, Node* target,
- Node* context, Node* arg1, size_t result_size = 1);
- Node* TailCallStub(const CallInterfaceDescriptor& descriptor, Node* target,
- Node* context, Node* arg1, Node* arg2,
- size_t result_size = 1);
- Node* TailCallStub(const CallInterfaceDescriptor& descriptor, Node* target,
- Node* context, Node* arg1, Node* arg2, Node* arg3,
- size_t result_size = 1);
- Node* TailCallStub(const CallInterfaceDescriptor& descriptor, Node* target,
- Node* context, Node* arg1, Node* arg2, Node* arg3,
- Node* arg4, size_t result_size = 1);
- Node* TailCallStub(const CallInterfaceDescriptor& descriptor, Node* target,
- Node* context, Node* arg1, Node* arg2, Node* arg3,
- Node* arg4, Node* arg5, size_t result_size = 1);
- Node* TailCallStub(const CallInterfaceDescriptor& descriptor, Node* target,
- Node* context, Node* arg1, Node* arg2, Node* arg3,
- Node* arg4, Node* arg5, Node* arg6,
- size_t result_size = 1);
+ Node* context, TArgs... args);
Node* TailCallBytecodeDispatch(const CallInterfaceDescriptor& descriptor,
Node* code_target_address, Node** args);
« 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