5#ifndef V8_COMPILER_TURBOSHAFT_RUNTIME_CALL_DESCRIPTORS_H_
6#define V8_COMPILER_TURBOSHAFT_RUNTIME_CALL_DESCRIPTORS_H_
17 template <
typename Derived>
22 Derived::kNeedsFrameState);
24 zone, Derived::kFunction,
25 std::tuple_size_v<typename Derived::arguments_t>,
30 Derived::Verify(descriptor);
36 lazy_deopt_on_throw, zone);
41 using result_t =
typename Derived::result_t;
42 using arguments_t =
typename Derived::arguments_t;
43 if constexpr (std::is_same_v<result_t, void>) {
47 DCHECK(result_t::allows_representation(
49 desc->GetReturnType(0).representation())));
51 DCHECK_EQ(desc->NeedsFrameState(), Derived::kNeedsFrameState);
52 DCHECK_EQ(desc->properties(), Derived::kProperties);
53 constexpr int additional_stub_arguments =
56 std::tuple_size_v<arguments_t> + additional_stub_arguments);
57 DCHECK(VerifyArguments<arguments_t>(desc));
60 template <
typename Arguments>
61 static bool VerifyArguments(
const CallDescriptor* desc) {
62 return VerifyArgumentsImpl<Arguments>(
63 desc, std::make_index_sequence<std::tuple_size_v<Arguments>>());
67 template <
typename Arguments,
size_t... Indices>
68 static bool VerifyArgumentsImpl(
const CallDescriptor* desc,
69 std::index_sequence<Indices...>) {
70 return (std::tuple_element_t<Indices, Arguments>::allows_representation(
72 desc->GetParameterType(Indices).representation())) &&
97 static constexpr auto kFunction = Runtime::kBigIntUnaryOp;
107 static constexpr auto kFunction = Runtime::kDateCurrentTime;
137 static constexpr auto kFunction = Runtime::kStackGuardWithGap;
147 :
public Descriptor<HandleNoHeapWritesInterrupts> {
148 static constexpr auto kFunction = Runtime::kHandleNoHeapWritesInterrupts;
157 static constexpr auto kFunction = Runtime::kPropagateException;
175 static constexpr auto kFunction = Runtime::kStringCharCodeAt;
184#ifdef V8_INTL_SUPPORT
185 struct StringToUpperCaseIntl :
public Descriptor<StringToUpperCaseIntl> {
186 static constexpr auto kFunction = Runtime::kStringToUpperCaseIntl;
187 using arguments_t = std::tuple<V<String>>;
190 static constexpr bool kNeedsFrameState =
false;
192 Operator::kNoDeopt | Operator::kNoThrow;
197 static constexpr auto kFunction = Runtime::kSymbolDescriptiveString;
206 static constexpr auto kFunction = Runtime::kTerminateExecution;
215 static constexpr auto kFunction = Runtime::kTransitionElementsKind;
225 static constexpr auto kFunction = Runtime::kTryMigrateInstance;
235 :
public Descriptor<TryMigrateInstanceAndMarkMapAsMigrationTarget> {
237 Runtime::kTryMigrateInstanceAndMarkMapAsMigrationTarget;
247 :
public Descriptor<ThrowAccessedUninitializedVariable> {
249 Runtime::kThrowAccessedUninitializedVariable;
260 :
public Descriptor<ThrowConstructorReturnedNonObject> {
262 Runtime::kThrowConstructorReturnedNonObject;
273 :
public Descriptor<ThrowNotSuperConstructor> {
274 static constexpr auto kFunction = Runtime::kThrowNotSuperConstructor;
285 :
public Descriptor<ThrowSuperAlreadyCalledError> {
286 static constexpr auto kFunction = Runtime::kThrowSuperAlreadyCalledError;
297 static constexpr auto kFunction = Runtime::kThrowSuperNotCalled;
308 static constexpr auto kFunction = Runtime::kThrowCalledNonCallable;
319 :
public Descriptor<ThrowInvalidStringLength> {
320 static constexpr auto kFunction = Runtime::kThrowInvalidStringLength;
340 static constexpr auto kFunction = Runtime::kNewClosure_Tenured;
349 static constexpr auto kFunction = Runtime::kHasInPrototypeChain;
static CallDescriptor * GetRuntimeCallDescriptor(Zone *zone, Runtime::FunctionId function, int js_parameter_count, Operator::Properties properties, CallDescriptor::Flags flags, LazyDeoptOnThrow lazy_deopt_on_throw=LazyDeoptOnThrow::kNo)
static constexpr RegisterRepresentation FromMachineRepresentation(MachineRepresentation rep)
#define DCHECK_IMPLIES(v1, v2)
#define DCHECK(condition)
#define DCHECK_EQ(v1, v2)
static constexpr Operator::Properties kProperties
std::tuple< V< Smi > > arguments_t
static constexpr auto kFunction
static constexpr bool kNeedsFrameState
static constexpr Operator::Properties kProperties
std::tuple< V< BigInt >, V< Smi > > arguments_t
static constexpr auto kFunction
static constexpr bool kNeedsFrameState
static constexpr Operator::Properties kProperties
static constexpr bool kNeedsFrameState
static constexpr auto kFunction
static constexpr bool kNeedsFrameState
std::tuple< V< Object > > arguments_t
static constexpr auto kFunction
static constexpr Operator::Properties kProperties
static const TSCallDescriptor * Create(Zone *zone, LazyDeoptOnThrow lazy_deopt_on_throw)
static constexpr auto kFunction
static constexpr bool kNeedsFrameState
static constexpr Operator::Properties kProperties
static constexpr Operator::Properties kProperties
std::tuple< V< Object >, V< HeapObject > > arguments_t
static constexpr auto kFunction
static constexpr bool kNeedsFrameState
static constexpr bool kNeedsFrameState
static constexpr auto kFunction
std::tuple< V< SharedFunctionInfo >, V< FeedbackCell > > arguments_t
static constexpr Operator::Properties kProperties
static constexpr Operator::Properties kProperties
static constexpr bool kNeedsFrameState
static constexpr auto kFunction
std::tuple< V< SharedFunctionInfo >, V< FeedbackCell > > arguments_t
static constexpr Operator::Properties kProperties
static constexpr auto kFunction
static constexpr bool kNeedsFrameState
static constexpr bool kNeedsFrameState
static constexpr auto kFunction
static constexpr Operator::Properties kProperties
std::tuple< V< Object > > arguments_t
static constexpr bool kNeedsFrameState
static constexpr Operator::Properties kProperties
std::tuple< V< Smi > > arguments_t
static constexpr auto kFunction
static constexpr bool kNeedsFrameState
static constexpr Operator::Properties kProperties
static constexpr auto kFunction
static constexpr Operator::Properties kProperties
std::tuple< V< String >, V< Number > > arguments_t
static constexpr bool kNeedsFrameState
static constexpr auto kFunction
static constexpr bool kNeedsFrameState
static constexpr Operator::Properties kProperties
std::tuple< V< Symbol > > arguments_t
static constexpr auto kFunction
static constexpr Operator::Properties kProperties
static constexpr auto kFunction
static constexpr bool kNeedsFrameState
std::tuple< V< Object > > arguments_t
static constexpr auto kFunction
static constexpr bool kNeedsFrameState
static constexpr Operator::Properties kProperties
static constexpr Operator::Properties kProperties
static constexpr bool kNeedsFrameState
std::tuple< V< Object > > arguments_t
static constexpr auto kFunction
static constexpr Operator::Properties kProperties
static constexpr auto kFunction
static constexpr bool kNeedsFrameState
static constexpr Operator::Properties kProperties
static constexpr bool kNeedsFrameState
static constexpr auto kFunction
std::tuple< V< Object >, V< Object > > arguments_t
static constexpr bool kNeedsFrameState
static constexpr Operator::Properties kProperties
static constexpr auto kFunction
static constexpr bool kNeedsFrameState
static constexpr Operator::Properties kProperties
static constexpr auto kFunction
static constexpr bool kNeedsFrameState
static constexpr Operator::Properties kProperties
static constexpr auto kFunction
static constexpr auto kFunction
std::tuple< V< HeapObject >, V< Map > > arguments_t
static constexpr Operator::Properties kProperties
static constexpr bool kNeedsFrameState
static constexpr auto kFunction
static constexpr bool kNeedsFrameState
std::tuple< V< HeapObject > > arguments_t
static constexpr Operator::Properties kProperties
static constexpr auto kFunction
std::tuple< V< HeapObject > > arguments_t
static constexpr bool kNeedsFrameState
static constexpr Operator::Properties kProperties
static const TSCallDescriptor * Create(const CallDescriptor *descriptor, CanThrow can_throw, LazyDeoptOnThrow lazy_deopt_on_throw, Zone *graph_zone, const JSWasmCallParameters *js_wasm_call_parameters=nullptr)