diff options
Diffstat (limited to 'deps/v8/src/codegen/interface-descriptors.h')
-rw-r--r-- | deps/v8/src/codegen/interface-descriptors.h | 334 |
1 files changed, 284 insertions, 50 deletions
diff --git a/deps/v8/src/codegen/interface-descriptors.h b/deps/v8/src/codegen/interface-descriptors.h index ae93513021..d9ae65f5c6 100644 --- a/deps/v8/src/codegen/interface-descriptors.h +++ b/deps/v8/src/codegen/interface-descriptors.h @@ -25,7 +25,6 @@ namespace internal { V(Allocate) \ V(ApiCallback) \ V(ApiGetter) \ - V(ArgumentsAdaptor) \ V(ArrayConstructor) \ V(ArrayNArgumentsConstructor) \ V(ArrayNoArgumentConstructor) \ @@ -34,19 +33,24 @@ namespace internal { V(BigIntToI32Pair) \ V(BigIntToI64) \ V(BinaryOp) \ + V(BinaryOp_Baseline) \ V(BinaryOp_WithFeedback) \ V(CallForwardVarargs) \ V(CallFunctionTemplate) \ V(CallTrampoline) \ + V(CallTrampoline_Baseline) \ V(CallTrampoline_WithFeedback) \ V(CallVarargs) \ V(CallWithArrayLike) \ V(CallWithArrayLike_WithFeedback) \ V(CallWithSpread) \ + V(CallWithSpread_Baseline) \ V(CallWithSpread_WithFeedback) \ V(CEntry1ArgvOnStack) \ + V(CloneObjectBaseline) \ V(CloneObjectWithVector) \ V(Compare) \ + V(Compare_Baseline) \ V(Compare_WithFeedback) \ V(ConstructForwardVarargs) \ V(ConstructStub) \ @@ -54,13 +58,16 @@ namespace internal { V(ConstructWithArrayLike) \ V(ConstructWithArrayLike_WithFeedback) \ V(Construct_WithFeedback) \ + V(Construct_Baseline) \ V(ConstructWithSpread) \ + V(ConstructWithSpread_Baseline) \ V(ConstructWithSpread_WithFeedback) \ V(ContextOnly) \ V(CppBuiltinAdaptor) \ V(DynamicCheckMaps) \ V(EphemeronKeyBarrier) \ V(FastNewObject) \ + V(ForInPrepare) \ V(FrameDropperTrampoline) \ V(GetIteratorStackParameter) \ V(GetProperty) \ @@ -70,23 +77,33 @@ namespace internal { V(InterpreterCEntry1) \ V(InterpreterCEntry2) \ V(InterpreterDispatch) \ + V(TailCallOptimizedCodeSlot) \ V(InterpreterPushArgsThenCall) \ V(InterpreterPushArgsThenConstruct) \ V(JSTrampoline) \ + V(BaselineOutOfLinePrologue) \ + V(BaselineLeaveFrame) \ V(Load) \ + V(LoadBaseline) \ V(LoadGlobal) \ + V(LoadGlobalBaseline) \ V(LoadGlobalNoFeedback) \ V(LoadGlobalWithVector) \ V(LoadNoFeedback) \ V(LoadWithVector) \ V(LoadWithReceiverAndVector) \ + V(LoadWithReceiverBaseline) \ + V(LookupBaseline) \ V(NoContext) \ V(RecordWrite) \ V(ResumeGenerator) \ V(RunMicrotasks) \ V(RunMicrotasksEntry) \ + V(SingleParameterOnStack) \ V(Store) \ + V(StoreBaseline) \ V(StoreGlobal) \ + V(StoreGlobalBaseline) \ V(StoreGlobalWithVector) \ V(StoreTransition) \ V(StoreWithVector) \ @@ -95,8 +112,9 @@ namespace internal { V(StringSubstring) \ V(TypeConversion) \ V(TypeConversionNoContext) \ - V(TypeConversionStackParameter) \ + V(TypeConversion_Baseline) \ V(Typeof) \ + V(UnaryOp_Baseline) \ V(UnaryOp_WithFeedback) \ V(Void) \ V(WasmFloat32ToNumber) \ @@ -328,6 +346,14 @@ class V8_EXPORT_PRIVATE CallInterfaceDescriptor { UNREACHABLE(); } + // Initializes |data| to an unspecified state, for platforms that haven't + // implemented a given builtin. + static void InitializePlatformUnimplemented(CallInterfaceDescriptorData* data, + int register_parameter_count) { + DefaultInitializePlatformSpecific(data, + std::min(register_parameter_count, 4)); + } + virtual void InitializePlatformIndependent( CallInterfaceDescriptorData* data) { // Default descriptor configuration: one result, all parameters are passed @@ -521,11 +547,25 @@ STATIC_ASSERT(kMaxTFSBuiltinRegisterParams <= kMaxBuiltinRegisterParams); kNewTarget, \ kActualArgumentsCount, \ ##__VA_ARGS__, \ - \ kParameterCount, \ kContext = kParameterCount /* implicit parameter */ \ }; +#define DEFINE_JS_PARAMETERS_NO_CONTEXT(...) \ + static constexpr int kDescriptorFlags = \ + CallInterfaceDescriptorData::kAllowVarArgs | \ + CallInterfaceDescriptorData::kNoContext; \ + static constexpr int kReturnCount = 1; \ + static constexpr StackArgumentOrder kStackArgumentOrder = \ + StackArgumentOrder::kJS; \ + enum ParameterIndices { \ + kTarget, \ + kNewTarget, \ + kActualArgumentsCount, \ + ##__VA_ARGS__, \ + kParameterCount, \ + }; + #define DEFINE_JS_PARAMETER_TYPES(...) \ DEFINE_PARAMETER_TYPES(MachineType::AnyTagged(), /* kTarget */ \ MachineType::AnyTagged(), /* kNewTarget */ \ @@ -548,7 +588,7 @@ class V8_EXPORT_PRIVATE VoidDescriptor : public CallInterfaceDescriptor { }; // This class is subclassed by Torque-generated call interface descriptors. -template <int parameter_count, bool has_context_parameter> +template <int return_count, int parameter_count, bool has_context_parameter> class TorqueInterfaceDescriptor : public CallInterfaceDescriptor { public: static constexpr int kDescriptorFlags = @@ -561,7 +601,7 @@ class TorqueInterfaceDescriptor : public CallInterfaceDescriptor { STATIC_ASSERT(0 <= i && i < kParameterCount); return static_cast<ParameterIndices>(i); } - static constexpr int kReturnCount = 1; + static constexpr int kReturnCount = return_count; using CallInterfaceDescriptor::CallInterfaceDescriptor; @@ -571,14 +611,15 @@ class TorqueInterfaceDescriptor : public CallInterfaceDescriptor { ? kMaxTFSBuiltinRegisterParams : kParameterCount; static const int kStackParams = kParameterCount - kRegisterParams; - virtual MachineType ReturnType() = 0; + virtual std::vector<MachineType> ReturnType() = 0; virtual std::array<MachineType, kParameterCount> ParameterTypes() = 0; void InitializePlatformSpecific(CallInterfaceDescriptorData* data) override { DefaultInitializePlatformSpecific(data, kRegisterParams); } void InitializePlatformIndependent( CallInterfaceDescriptorData* data) override { - std::vector<MachineType> machine_types = {ReturnType()}; + std::vector<MachineType> machine_types = ReturnType(); + DCHECK_EQ(kReturnCount, machine_types.size()); auto parameter_types = ParameterTypes(); machine_types.insert(machine_types.end(), parameter_types.begin(), parameter_types.end()); @@ -652,6 +693,17 @@ class LoadDescriptor : public CallInterfaceDescriptor { static const Register SlotRegister(); }; +// LoadBaselineDescriptor is a load descriptor that does not take a context as +// input. +class LoadBaselineDescriptor : public CallInterfaceDescriptor { + public: + DEFINE_PARAMETERS_NO_CONTEXT(kReceiver, kName, kSlot) + DEFINE_PARAMETER_TYPES(MachineType::AnyTagged(), // kReceiver + MachineType::AnyTagged(), // kName + MachineType::TaggedSigned()) // kSlot + DECLARE_DESCRIPTOR(LoadBaselineDescriptor, CallInterfaceDescriptor) +}; + class LoadGlobalNoFeedbackDescriptor : public CallInterfaceDescriptor { public: DEFINE_PARAMETERS(kName, kICKind) @@ -705,6 +757,23 @@ class LoadGlobalDescriptor : public CallInterfaceDescriptor { } }; +class LoadGlobalBaselineDescriptor : public CallInterfaceDescriptor { + public: + DEFINE_PARAMETERS_NO_CONTEXT(kName, kSlot) + DEFINE_PARAMETER_TYPES(MachineType::AnyTagged(), // kName + MachineType::TaggedSigned()) // kSlot + DECLARE_DESCRIPTOR(LoadGlobalBaselineDescriptor, CallInterfaceDescriptor) +}; + +class LookupBaselineDescriptor : public CallInterfaceDescriptor { + public: + DEFINE_PARAMETERS_NO_CONTEXT(kName, kDepth, kSlot) + DEFINE_PARAMETER_TYPES(MachineType::AnyTagged(), // kName + MachineType::AnyTagged(), // kDepth + MachineType::AnyTagged()) // kSlot + DECLARE_DESCRIPTOR(LookupBaselineDescriptor, CallInterfaceDescriptor) +}; + class StoreDescriptor : public CallInterfaceDescriptor { public: DEFINE_PARAMETERS(kReceiver, kName, kValue, kSlot) @@ -729,6 +798,25 @@ class StoreDescriptor : public CallInterfaceDescriptor { static const int kStackArgumentsCount = kPassLastArgsOnStack ? 2 : 0; }; +class StoreBaselineDescriptor : public CallInterfaceDescriptor { + public: + DEFINE_PARAMETERS_NO_CONTEXT(kReceiver, kName, kValue, kSlot) + DEFINE_PARAMETER_TYPES(MachineType::AnyTagged(), // kReceiver + MachineType::AnyTagged(), // kName + MachineType::AnyTagged(), // kValue + MachineType::TaggedSigned()) // kSlot + DECLARE_DESCRIPTOR(StoreBaselineDescriptor, CallInterfaceDescriptor) + +#if V8_TARGET_ARCH_IA32 + static const bool kPassLastArgsOnStack = true; +#else + static const bool kPassLastArgsOnStack = false; +#endif + + // Pass value and slot through the stack. + static const int kStackArgumentsCount = kPassLastArgsOnStack ? 2 : 0; +}; + class StoreTransitionDescriptor : public StoreDescriptor { public: DEFINE_PARAMETERS(kReceiver, kName, kMap, kValue, kSlot, kVector) @@ -790,6 +878,20 @@ class StoreGlobalDescriptor : public CallInterfaceDescriptor { } }; +class StoreGlobalBaselineDescriptor : public CallInterfaceDescriptor { + public: + DEFINE_PARAMETERS_NO_CONTEXT(kName, kValue, kSlot) + DEFINE_PARAMETER_TYPES(MachineType::AnyTagged(), // kName + MachineType::AnyTagged(), // kValue + MachineType::TaggedSigned()) // kSlot + DECLARE_DESCRIPTOR(StoreGlobalBaselineDescriptor, CallInterfaceDescriptor) + + static const bool kPassLastArgsOnStack = + StoreDescriptor::kPassLastArgsOnStack; + // Pass value and slot through the stack. + static const int kStackArgumentsCount = kPassLastArgsOnStack ? 2 : 0; +}; + class StoreGlobalWithVectorDescriptor : public StoreGlobalDescriptor { public: DEFINE_PARAMETERS(kName, kValue, kSlot, kVector) @@ -858,6 +960,18 @@ class LoadWithReceiverAndVectorDescriptor : public LoadWithVectorDescriptor { static const int kStackArgumentsCount = kPassLastArgsOnStack ? 1 : 0; }; +class LoadWithReceiverBaselineDescriptor : public LoadBaselineDescriptor { + public: + // TODO(v8:9497): Revert the Machine type for kSlot to the + // TaggedSigned once Torque can emit better call descriptors + DEFINE_PARAMETERS_NO_CONTEXT(kReceiver, kLookupStartObject, kName, kSlot) + DEFINE_PARAMETER_TYPES(MachineType::AnyTagged(), // kReceiver + MachineType::AnyTagged(), // kLookupStartObject + MachineType::AnyTagged(), // kName + MachineType::AnyTagged()) // kSlot + DECLARE_DESCRIPTOR(LoadWithReceiverBaselineDescriptor, LoadBaselineDescriptor) +}; + class LoadGlobalWithVectorDescriptor : public LoadGlobalDescriptor { public: DEFINE_PARAMETERS(kName, kSlot, kVector) @@ -935,13 +1049,18 @@ class TypeConversionNoContextDescriptor final : public CallInterfaceDescriptor { DECLARE_DESCRIPTOR(TypeConversionNoContextDescriptor, CallInterfaceDescriptor) }; -class TypeConversionStackParameterDescriptor final - : public CallInterfaceDescriptor { +class TypeConversion_BaselineDescriptor final : public CallInterfaceDescriptor { + public: + DEFINE_PARAMETERS_NO_CONTEXT(kArgument, kSlot) + DEFINE_PARAMETER_TYPES(MachineType::AnyTagged(), MachineType::UintPtr()) + DECLARE_DESCRIPTOR(TypeConversion_BaselineDescriptor, CallInterfaceDescriptor) +}; + +class SingleParameterOnStackDescriptor final : public CallInterfaceDescriptor { public: DEFINE_PARAMETERS(kArgument) DEFINE_PARAMETER_TYPES(MachineType::AnyTagged()) - DECLARE_DESCRIPTOR(TypeConversionStackParameterDescriptor, - CallInterfaceDescriptor) + DECLARE_DESCRIPTOR(SingleParameterOnStackDescriptor, CallInterfaceDescriptor) }; class AsyncFunctionStackParameterDescriptor final @@ -1021,16 +1140,25 @@ class CallWithSpreadDescriptor : public CallInterfaceDescriptor { DECLARE_DESCRIPTOR(CallWithSpreadDescriptor, CallInterfaceDescriptor) }; -// TODO(jgruber): Pass the slot as UintPtr. +class CallWithSpread_BaselineDescriptor : public CallInterfaceDescriptor { + public: + DEFINE_PARAMETERS_VARARGS(kTarget, kArgumentsCount, kSpread, kSlot) + DEFINE_PARAMETER_TYPES(MachineType::AnyTagged(), // kTarget + MachineType::Int32(), // kArgumentsCount + MachineType::AnyTagged(), // kSpread + MachineType::UintPtr()) // kSlot + DECLARE_DESCRIPTOR(CallWithSpread_BaselineDescriptor, CallInterfaceDescriptor) +}; + class CallWithSpread_WithFeedbackDescriptor : public CallInterfaceDescriptor { public: DEFINE_PARAMETERS_VARARGS(kTarget, kArgumentsCount, kSpread, kSlot, - kMaybeFeedbackVector) + kFeedbackVector) DEFINE_PARAMETER_TYPES(MachineType::AnyTagged(), // kTarget MachineType::Int32(), // kArgumentsCount MachineType::AnyTagged(), // kSpread - MachineType::Int32(), // kSlot - MachineType::AnyTagged()) // kMaybeFeedbackVector + MachineType::UintPtr(), // kSlot + MachineType::AnyTagged()) // kFeedbackVector DECLARE_DESCRIPTOR(CallWithSpread_WithFeedbackDescriptor, CallInterfaceDescriptor) }; @@ -1043,15 +1171,14 @@ class CallWithArrayLikeDescriptor : public CallInterfaceDescriptor { DECLARE_DESCRIPTOR(CallWithArrayLikeDescriptor, CallInterfaceDescriptor) }; -// TODO(jgruber): Pass the slot as UintPtr. class CallWithArrayLike_WithFeedbackDescriptor : public CallInterfaceDescriptor { public: - DEFINE_PARAMETERS(kTarget, kArgumentsList, kSlot, kMaybeFeedbackVector) + DEFINE_PARAMETERS(kTarget, kArgumentsList, kSlot, kFeedbackVector) DEFINE_PARAMETER_TYPES(MachineType::AnyTagged(), // kTarget MachineType::AnyTagged(), // kArgumentsList - MachineType::Int32(), // kSlot - MachineType::AnyTagged()) // kMaybeFeedbackVector + MachineType::UintPtr(), // kSlot + MachineType::AnyTagged()) // kFeedbackVector DECLARE_DESCRIPTOR(CallWithArrayLike_WithFeedbackDescriptor, CallInterfaceDescriptor) }; @@ -1079,16 +1206,35 @@ class ConstructWithSpreadDescriptor : public CallInterfaceDescriptor { DECLARE_DESCRIPTOR(ConstructWithSpreadDescriptor, CallInterfaceDescriptor) }; -// TODO(jgruber): Pass the slot as UintPtr. +class ConstructWithSpread_BaselineDescriptor : public CallInterfaceDescriptor { + public: + // Note: kSlot comes before kSpread since as an untagged value it must be + // passed in a register. + DEFINE_JS_PARAMETERS(kSlot, kSpread) + DEFINE_JS_PARAMETER_TYPES(MachineType::UintPtr(), // kSlot + MachineType::AnyTagged()) // kSpread + DECLARE_DESCRIPTOR(ConstructWithSpread_BaselineDescriptor, + CallInterfaceDescriptor) + +#if V8_TARGET_ARCH_IA32 + static const bool kPassLastArgsOnStack = true; +#else + static const bool kPassLastArgsOnStack = false; +#endif + + // Pass spread through the stack. + static const int kStackArgumentsCount = kPassLastArgsOnStack ? 1 : 0; +}; + class ConstructWithSpread_WithFeedbackDescriptor : public CallInterfaceDescriptor { public: // Note: kSlot comes before kSpread since as an untagged value it must be // passed in a register. - DEFINE_JS_PARAMETERS(kSlot, kSpread, kMaybeFeedbackVector) - DEFINE_JS_PARAMETER_TYPES(MachineType::Int32(), // kSlot + DEFINE_JS_PARAMETERS(kSlot, kSpread, kFeedbackVector) + DEFINE_JS_PARAMETER_TYPES(MachineType::UintPtr(), // kSlot MachineType::AnyTagged(), // kSpread - MachineType::AnyTagged()) // kMaybeFeedbackVector + MachineType::AnyTagged()) // kFeedbackVector DECLARE_DESCRIPTOR(ConstructWithSpread_WithFeedbackDescriptor, CallInterfaceDescriptor) }; @@ -1102,17 +1248,15 @@ class ConstructWithArrayLikeDescriptor : public CallInterfaceDescriptor { DECLARE_DESCRIPTOR(ConstructWithArrayLikeDescriptor, CallInterfaceDescriptor) }; -// TODO(jgruber): Pass the slot as UintPtr. class ConstructWithArrayLike_WithFeedbackDescriptor : public CallInterfaceDescriptor { public: - DEFINE_PARAMETERS(kTarget, kNewTarget, kArgumentsList, kSlot, - kMaybeFeedbackVector) + DEFINE_PARAMETERS(kTarget, kNewTarget, kArgumentsList, kSlot, kFeedbackVector) DEFINE_PARAMETER_TYPES(MachineType::AnyTagged(), // kTarget MachineType::AnyTagged(), // kNewTarget MachineType::AnyTagged(), // kArgumentsList - MachineType::Int32(), // kSlot - MachineType::AnyTagged()) // kMaybeFeedbackVector + MachineType::UintPtr(), // kSlot + MachineType::AnyTagged()) // kFeedbackVector DECLARE_DESCRIPTOR(ConstructWithArrayLike_WithFeedbackDescriptor, CallInterfaceDescriptor) }; @@ -1204,6 +1348,15 @@ class BinaryOpDescriptor : public CallInterfaceDescriptor { DECLARE_DESCRIPTOR(BinaryOpDescriptor, CallInterfaceDescriptor) }; +class BinaryOp_BaselineDescriptor : public CallInterfaceDescriptor { + public: + DEFINE_PARAMETERS_NO_CONTEXT(kLeft, kRight, kSlot) + DEFINE_PARAMETER_TYPES(MachineType::AnyTagged(), // kLeft + MachineType::AnyTagged(), // kRight + MachineType::UintPtr()) // kSlot + DECLARE_DESCRIPTOR(BinaryOp_BaselineDescriptor, CallInterfaceDescriptor) +}; + // This desciptor is shared among String.p.charAt/charCodeAt/codePointAt // as they all have the same interface. class StringAtDescriptor final : public CallInterfaceDescriptor { @@ -1238,13 +1391,6 @@ class StringSubstringDescriptor final : public CallInterfaceDescriptor { DECLARE_DESCRIPTOR(StringSubstringDescriptor, CallInterfaceDescriptor) }; -class ArgumentsAdaptorDescriptor : public CallInterfaceDescriptor { - public: - DEFINE_JS_PARAMETERS(kExpectedArgumentsCount) - DEFINE_JS_PARAMETER_TYPES(MachineType::Int32()) - DECLARE_DESCRIPTOR(ArgumentsAdaptorDescriptor, CallInterfaceDescriptor) -}; - class CppBuiltinAdaptorDescriptor : public CallInterfaceDescriptor { public: DEFINE_JS_PARAMETERS(kCFunction) @@ -1308,6 +1454,41 @@ class GrowArrayElementsDescriptor : public CallInterfaceDescriptor { static const Register KeyRegister(); }; +class V8_EXPORT_PRIVATE TailCallOptimizedCodeSlotDescriptor + : public CallInterfaceDescriptor { + public: + DEFINE_PARAMETERS(kOptimizedCodeEntry) + DEFINE_PARAMETER_TYPES(MachineType::AnyTagged()) // kAccumulator + DECLARE_DESCRIPTOR(TailCallOptimizedCodeSlotDescriptor, + CallInterfaceDescriptor) +}; + +class BaselineOutOfLinePrologueDescriptor : public CallInterfaceDescriptor { + public: + DEFINE_PARAMETERS_NO_CONTEXT(kCalleeContext, kClosure, + kJavaScriptCallArgCount, + kInterpreterBytecodeArray, + kJavaScriptCallNewTarget) + DEFINE_PARAMETER_TYPES(MachineType::AnyTagged(), // kCalleeContext + MachineType::AnyTagged(), // kClosure + MachineType::Int32(), // kJavaScriptCallArgCount + MachineType::AnyTagged(), // kInterpreterBytecodeArray + MachineType::AnyTagged()) // kJavaScriptCallNewTarget + DECLARE_DESCRIPTOR(BaselineOutOfLinePrologueDescriptor, + CallInterfaceDescriptor) +}; + +class BaselineLeaveFrameDescriptor : public CallInterfaceDescriptor { + public: + DEFINE_PARAMETERS_NO_CONTEXT(kParamsSize, kWeight) + DEFINE_PARAMETER_TYPES(MachineType::Int32(), // kParamsSize + MachineType::Int32()) // kWeight + DECLARE_DESCRIPTOR(BaselineLeaveFrameDescriptor, CallInterfaceDescriptor) + + static const Register ParamsSizeRegister(); + static const Register WeightRegister(); +}; + class V8_EXPORT_PRIVATE InterpreterDispatchDescriptor : public CallInterfaceDescriptor { public: @@ -1376,6 +1557,18 @@ class InterpreterCEntry2Descriptor : public CallInterfaceDescriptor { DECLARE_DESCRIPTOR(InterpreterCEntry2Descriptor, CallInterfaceDescriptor) }; +class ForInPrepareDescriptor : public CallInterfaceDescriptor { + public: + DEFINE_RESULT_AND_PARAMETERS(2, kEnumerator, kVectorIndex, kFeedbackVector) + DEFINE_RESULT_AND_PARAMETER_TYPES( + MachineType::AnyTagged(), // result 1 (cache array) + MachineType::AnyTagged(), // result 2 (cache length) + MachineType::AnyTagged(), // kEnumerator + MachineType::TaggedSigned(), // kVectorIndex + MachineType::AnyTagged()) // kFeedbackVector + DECLARE_DESCRIPTOR(ForInPrepareDescriptor, CallInterfaceDescriptor) +}; + class ResumeGeneratorDescriptor final : public CallInterfaceDescriptor { public: DEFINE_PARAMETERS(kValue, kGenerator) @@ -1510,59 +1703,100 @@ class CloneObjectWithVectorDescriptor final : public CallInterfaceDescriptor { DECLARE_DESCRIPTOR(CloneObjectWithVectorDescriptor, CallInterfaceDescriptor) }; +class CloneObjectBaselineDescriptor final : public CallInterfaceDescriptor { + public: + DEFINE_PARAMETERS_NO_CONTEXT(kSource, kFlags, kSlot) + DEFINE_PARAMETER_TYPES(MachineType::AnyTagged(), // kSource + MachineType::TaggedSigned(), // kFlags + MachineType::TaggedSigned()) // kSlot + DECLARE_DESCRIPTOR(CloneObjectBaselineDescriptor, CallInterfaceDescriptor) +}; + class BinaryOp_WithFeedbackDescriptor : public CallInterfaceDescriptor { public: - DEFINE_PARAMETERS(kLeft, kRight, kSlot, kMaybeFeedbackVector) + DEFINE_PARAMETERS(kLeft, kRight, kSlot, kFeedbackVector) DEFINE_PARAMETER_TYPES(MachineType::AnyTagged(), // kLeft MachineType::AnyTagged(), // kRight MachineType::UintPtr(), // kSlot - MachineType::AnyTagged()) // kMaybeFeedbackVector + MachineType::AnyTagged()) // kFeedbackVector DECLARE_DESCRIPTOR(BinaryOp_WithFeedbackDescriptor, CallInterfaceDescriptor) }; -// TODO(jgruber): Pass the slot as UintPtr. +class CallTrampoline_BaselineDescriptor : public CallInterfaceDescriptor { + public: + DEFINE_PARAMETERS_VARARGS(kFunction, kActualArgumentsCount, kSlot) + DEFINE_PARAMETER_TYPES(MachineType::AnyTagged(), // kFunction + MachineType::Int32(), // kActualArgumentsCount + MachineType::UintPtr()) // kSlot + DECLARE_DESCRIPTOR(CallTrampoline_BaselineDescriptor, CallInterfaceDescriptor) +}; + class CallTrampoline_WithFeedbackDescriptor : public CallInterfaceDescriptor { public: DEFINE_PARAMETERS_VARARGS(kFunction, kActualArgumentsCount, kSlot, - kMaybeFeedbackVector) + kFeedbackVector) DEFINE_PARAMETER_TYPES(MachineType::AnyTagged(), // kFunction MachineType::Int32(), // kActualArgumentsCount - MachineType::Int32(), // kSlot - MachineType::AnyTagged()) // kMaybeFeedbackVector + MachineType::UintPtr(), // kSlot + MachineType::AnyTagged()) // kFeedbackVector DECLARE_DESCRIPTOR(CallTrampoline_WithFeedbackDescriptor, CallInterfaceDescriptor) }; class Compare_WithFeedbackDescriptor : public CallInterfaceDescriptor { public: - DEFINE_PARAMETERS(kLeft, kRight, kSlot, kMaybeFeedbackVector) + DEFINE_PARAMETERS(kLeft, kRight, kSlot, kFeedbackVector) DEFINE_PARAMETER_TYPES(MachineType::AnyTagged(), // kLeft MachineType::AnyTagged(), // kRight MachineType::UintPtr(), // kSlot - MachineType::AnyTagged()) // kMaybeFeedbackVector + MachineType::AnyTagged()) // kFeedbackVector DECLARE_DESCRIPTOR(Compare_WithFeedbackDescriptor, CallInterfaceDescriptor) }; -// TODO(jgruber): Pass the slot as UintPtr. +class Compare_BaselineDescriptor : public CallInterfaceDescriptor { + public: + DEFINE_PARAMETERS_NO_CONTEXT(kLeft, kRight, kSlot) + DEFINE_PARAMETER_TYPES(MachineType::AnyTagged(), // kLeft + MachineType::AnyTagged(), // kRight + MachineType::UintPtr()) // kSlot + DECLARE_DESCRIPTOR(Compare_BaselineDescriptor, CallInterfaceDescriptor) +}; + +class Construct_BaselineDescriptor : public CallInterfaceDescriptor { + public: + DEFINE_JS_PARAMETERS_NO_CONTEXT(kSlot) + DEFINE_JS_PARAMETER_TYPES(MachineType::UintPtr()) // kSlot + DECLARE_JS_COMPATIBLE_DESCRIPTOR(Construct_BaselineDescriptor, + CallInterfaceDescriptor, 1) +}; + class Construct_WithFeedbackDescriptor : public CallInterfaceDescriptor { public: - // kSlot is passed in a register, kMaybeFeedbackVector on the stack. - DEFINE_JS_PARAMETERS(kSlot, kMaybeFeedbackVector) - DEFINE_JS_PARAMETER_TYPES(MachineType::Int32(), // kSlot - MachineType::AnyTagged()) // kMaybeFeedbackVector + // kSlot is passed in a register, kFeedbackVector on the stack. + DEFINE_JS_PARAMETERS(kSlot, kFeedbackVector) + DEFINE_JS_PARAMETER_TYPES(MachineType::UintPtr(), // kSlot + MachineType::AnyTagged()) // kFeedbackVector DECLARE_JS_COMPATIBLE_DESCRIPTOR(Construct_WithFeedbackDescriptor, CallInterfaceDescriptor, 1) }; class UnaryOp_WithFeedbackDescriptor : public CallInterfaceDescriptor { public: - DEFINE_PARAMETERS(kValue, kSlot, kMaybeFeedbackVector) + DEFINE_PARAMETERS(kValue, kSlot, kFeedbackVector) DEFINE_PARAMETER_TYPES(MachineType::AnyTagged(), // kValue MachineType::UintPtr(), // kSlot - MachineType::AnyTagged()) // kMaybeFeedbackVector + MachineType::AnyTagged()) // kFeedbackVector DECLARE_DESCRIPTOR(UnaryOp_WithFeedbackDescriptor, CallInterfaceDescriptor) }; +class UnaryOp_BaselineDescriptor : public CallInterfaceDescriptor { + public: + DEFINE_PARAMETERS(kValue, kSlot) + DEFINE_PARAMETER_TYPES(MachineType::AnyTagged(), // kValue + MachineType::UintPtr()) // kSlot + DECLARE_DESCRIPTOR(UnaryOp_BaselineDescriptor, CallInterfaceDescriptor) +}; + #define DEFINE_TFS_BUILTIN_DESCRIPTOR(Name, ...) \ class Name##Descriptor : public CallInterfaceDescriptor { \ public: \ |