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

Unified Diff: src/compiler/raw-machine-assembler.h

Issue 2577013003: [turbofan] Combine family of TailCallRuntime() methods into single implementation. (Closed)
Patch Set: Addressing comments 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.cc ('k') | src/compiler/raw-machine-assembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/raw-machine-assembler.h
diff --git a/src/compiler/raw-machine-assembler.h b/src/compiler/raw-machine-assembler.h
index 69151f1ecf09d763d4740b83b4cab2815c0999f2..8382d583cf20c62f9737f23bb335fca861c815bf 100644
--- a/src/compiler/raw-machine-assembler.h
+++ b/src/compiler/raw-machine-assembler.h
@@ -6,7 +6,6 @@
#define V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_
#include "src/assembler.h"
-#include "src/code-factory.h"
#include "src/compiler/common-operator.h"
#include "src/compiler/graph.h"
#include "src/compiler/linkage.h"
@@ -707,25 +706,13 @@ class V8_EXPORT_PRIVATE RawMachineAssembler {
Node* CallNWithFrameState(CallDescriptor* desc, Node* function, Node** args,
Node* frame_state);
- // Call to a runtime function with given arguments.
- template <class... TArgs>
- Node* CallRuntime(Runtime::FunctionId function, Node* context,
- TArgs... args) {
- int argc = static_cast<int>(sizeof...(args));
- CallDescriptor* descriptor = Linkage::GetRuntimeCallDescriptor(
- zone(), function, argc, Operator::kNoProperties,
- CallDescriptor::kNoFlags);
- int return_count = static_cast<int>(descriptor->ReturnCount());
-
- Node* centry =
- HeapConstant(CodeFactory::RuntimeCEntry(isolate(), return_count));
- Node* ref = AddNode(
- common()->ExternalConstant(ExternalReference(function, isolate())));
- Node* arity = Int32Constant(argc);
+ // Call a given call descriptor and the given arguments.
+ // The call target is passed as part of the {inputs} array.
+ Node* CallN(CallDescriptor* desc, int input_count, Node* const* inputs);
- return AddNode(common()->Call(descriptor), centry, args..., ref, arity,
- context);
- }
+ // Tail call a given call descriptor and the given arguments.
+ // The call target is passed as part of the {inputs} array.
+ Node* TailCallN(CallDescriptor* desc, int input_count, Node* const* inputs);
// Call to a C function with zero arguments.
Node* CallCFunction0(MachineType return_type, Node* function);
@@ -747,27 +734,6 @@ class V8_EXPORT_PRIVATE RawMachineAssembler {
// Tail call the given call descriptor and the given arguments.
Node* TailCallN(CallDescriptor* call_descriptor, Node* function, Node** args);
- // Tail call to a runtime function with zero arguments.
- Node* TailCallRuntime0(Runtime::FunctionId function, Node* context);
- // Tail call to a runtime function with one argument.
- Node* TailCallRuntime1(Runtime::FunctionId function, Node* arg0,
- Node* context);
- // Tail call to a runtime function with two arguments.
- Node* TailCallRuntime2(Runtime::FunctionId function, Node* arg1, Node* arg2,
- Node* context);
- // Tail call to a runtime function with three arguments.
- Node* TailCallRuntime3(Runtime::FunctionId function, Node* arg1, Node* arg2,
- Node* arg3, Node* context);
- // Tail call to a runtime function with four arguments.
- Node* TailCallRuntime4(Runtime::FunctionId function, Node* arg1, Node* arg2,
- Node* arg3, Node* arg4, Node* context);
- // Tail call to a runtime function with five arguments.
- Node* TailCallRuntime5(Runtime::FunctionId function, Node* arg1, Node* arg2,
- Node* arg3, Node* arg4, Node* arg5, Node* context);
- // Tail call to a runtime function with six arguments.
- Node* TailCallRuntime6(Runtime::FunctionId function, Node* arg1, Node* arg2,
- Node* arg3, Node* arg4, Node* arg5, Node* arg6,
- Node* context);
// ===========================================================================
// The following utility methods deal with control flow, hence might switch
« no previous file with comments | « src/compiler/code-assembler.cc ('k') | src/compiler/raw-machine-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698