1b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch// Copyright 2014 the V8 project authors. All rights reserved. 2b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch// Use of this source code is governed by a BSD-style license that can be 3b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch// found in the LICENSE file. 4b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 5b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch#ifndef V8_CALL_INTERFACE_DESCRIPTOR_H_ 6b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch#define V8_CALL_INTERFACE_DESCRIPTOR_H_ 7b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 8b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch#include "src/assembler.h" 9b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch#include "src/macro-assembler.h" 10b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 11b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdochnamespace v8 { 12b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdochnamespace internal { 13b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 14b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdochclass PlatformInterfaceDescriptor; 15b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 1621efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch#define INTERFACE_DESCRIPTOR_LIST(V) \ 1721efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(Void) \ 1821efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(ContextOnly) \ 1921efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(OnStackWith1Args) \ 2021efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(OnStackWith2Args) \ 2121efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(OnStackWith3Args) \ 2221efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(OnStackWith4Args) \ 2321efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(OnStackWith5Args) \ 2421efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(OnStackWith6Args) \ 2521efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(OnStackWith7Args) \ 2621efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(Load) \ 2721efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(LoadGlobal) \ 2821efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(LoadGlobalWithVector) \ 2921efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(Store) \ 3021efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(StoreTransition) \ 3121efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(VectorStoreTransition) \ 3221efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(VectorStoreICTrampoline) \ 3321efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(VectorStoreIC) \ 3421efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(LoadWithVector) \ 3521efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(VarArgFunction) \ 3621efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(FastNewClosure) \ 3721efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(FastNewContext) \ 3821efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(FastNewObject) \ 3921efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(FastNewRestParameter) \ 4021efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(FastNewSloppyArguments) \ 4121efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(FastNewStrictArguments) \ 4221efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(TypeConversion) \ 4321efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(Typeof) \ 4421efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(FastCloneRegExp) \ 4521efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(FastCloneShallowArray) \ 4621efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(FastCloneShallowObject) \ 4721efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(CreateAllocationSite) \ 4821efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(CreateWeakCell) \ 4921efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(CallFunction) \ 5021efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(CallFunctionWithFeedback) \ 5121efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(CallFunctionWithFeedbackAndVector) \ 5221efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(CallConstruct) \ 5321efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(CallTrampoline) \ 5421efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(ConstructStub) \ 5521efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(ConstructTrampoline) \ 5621efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(RegExpConstructResult) \ 5721efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(TransitionElementsKind) \ 5821efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(AllocateHeapNumber) \ 5921efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(AllocateFloat32x4) \ 6021efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(AllocateInt32x4) \ 6121efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(AllocateUint32x4) \ 6221efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(AllocateBool32x4) \ 6321efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(AllocateInt16x8) \ 6421efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(AllocateUint16x8) \ 6521efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(AllocateBool16x8) \ 6621efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(AllocateInt8x16) \ 6721efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(AllocateUint8x16) \ 6821efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(AllocateBool8x16) \ 6921efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(ArrayNoArgumentConstructor) \ 7021efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(ArraySingleArgumentConstructor) \ 7121efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(ArrayNArgumentsConstructor) \ 7221efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(Compare) \ 7321efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(BinaryOp) \ 7421efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(BinaryOpWithAllocationSite) \ 7521efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(CountOp) \ 7621efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(StringAdd) \ 7721efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(StringCompare) \ 7821efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(Keyed) \ 7921efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(Named) \ 8021efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(HasProperty) \ 8121efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(CallHandler) \ 8221efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(ArgumentAdaptor) \ 8321efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(ApiCallbackWith0Args) \ 8421efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(ApiCallbackWith1Args) \ 8521efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(ApiCallbackWith2Args) \ 8621efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(ApiCallbackWith3Args) \ 8721efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(ApiCallbackWith4Args) \ 8821efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(ApiCallbackWith5Args) \ 8921efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(ApiCallbackWith6Args) \ 9021efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(ApiCallbackWith7Args) \ 9121efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(ApiGetter) \ 9221efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(StoreGlobalViaContext) \ 9321efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(MathPowTagged) \ 9421efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(MathPowInteger) \ 9521efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(GrowArrayElements) \ 9621efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(InterpreterDispatch) \ 9721efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(InterpreterPushArgsAndCall) \ 9821efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(InterpreterPushArgsAndConstruct) \ 9921efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch V(InterpreterCEntry) \ 100537ba893e2530051ec7f296e769fdd37bb4ae4a0Ben Murdoch V(ResumeGenerator) 101b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 102b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdochclass CallInterfaceDescriptorData { 103b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch public: 104014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch CallInterfaceDescriptorData() 105014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch : register_param_count_(-1), function_type_(nullptr) {} 106b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 107b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch // A copy of the passed in registers and param_representations is made 108b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch // and owned by the CallInterfaceDescriptorData. 109b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 110342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch void InitializePlatformIndependent(FunctionType* function_type) { 111014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch function_type_ = function_type; 112014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch } 113014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 114b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch // TODO(mvstanton): Instead of taking parallel arrays register and 115b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch // param_representations, how about a struct that puts the representation 116b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch // and register side by side (eg, RegRep(r1, Representation::Tagged()). 117b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch // The same should go for the CodeStubDescriptor class. 118014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch void InitializePlatformSpecific( 11921efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch int register_parameter_count, const Register* registers, 120014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch PlatformInterfaceDescriptor* platform_descriptor = NULL); 121b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 122b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch bool IsInitialized() const { return register_param_count_ >= 0; } 123b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 124014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch int param_count() const { return function_type_->Arity(); } 125b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch int register_param_count() const { return register_param_count_; } 126b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch Register register_param(int index) const { return register_params_[index]; } 127b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch Register* register_params() const { return register_params_.get(); } 128014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch Type* param_type(int index) const { return function_type_->Parameter(index); } 129b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch PlatformInterfaceDescriptor* platform_specific_descriptor() const { 130b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch return platform_specific_descriptor_; 131b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch } 132b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 133342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch FunctionType* function_type() const { return function_type_; } 134014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 135b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch private: 136b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch int register_param_count_; 137b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 138b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch // The Register params are allocated dynamically by the 139b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch // InterfaceDescriptor, and freed on destruction. This is because static 140b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch // arrays of Registers cause creation of runtime static initializers 141b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch // which we don't want. 142014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch base::SmartArrayPointer<Register> register_params_; 143014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 144014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch // Specifies types for parameters and return 145342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch FunctionType* function_type_; 146b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 147b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch PlatformInterfaceDescriptor* platform_specific_descriptor_; 148b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 149b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch DISALLOW_COPY_AND_ASSIGN(CallInterfaceDescriptorData); 150b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch}; 151b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 152b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 153b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdochclass CallDescriptors { 154b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch public: 155b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch enum Key { 156b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch#define DEF_ENUM(name) name, 157b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch INTERFACE_DESCRIPTOR_LIST(DEF_ENUM) 158b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch#undef DEF_ENUM 159b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch NUMBER_OF_DESCRIPTORS 160b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch }; 161b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch}; 162b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 163b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 164b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdochclass CallInterfaceDescriptor { 165b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch public: 166b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch CallInterfaceDescriptor() : data_(NULL) {} 167014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch virtual ~CallInterfaceDescriptor() {} 168b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 169b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch CallInterfaceDescriptor(Isolate* isolate, CallDescriptors::Key key) 170b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch : data_(isolate->call_descriptor_data(key)) {} 171b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 172014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch int GetParameterCount() const { return data()->param_count(); } 173b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 174b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch int GetRegisterParameterCount() const { 175b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch return data()->register_param_count(); 176b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch } 177b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 178014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch int GetStackParameterCount() const { 179014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch return data()->function_type()->Arity() - data()->register_param_count(); 180b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch } 181b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 182014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch Register GetRegisterParameter(int index) const { 183014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch return data()->register_param(index); 184b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch } 185b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 186014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch Type* GetParameterType(int index) const { 187014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch DCHECK(index < data()->param_count()); 188014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch return data()->param_type(index); 189b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch } 190b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 191b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch // Some platforms have extra information to associate with the descriptor. 192b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch PlatformInterfaceDescriptor* platform_specific_descriptor() const { 193b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch return data()->platform_specific_descriptor(); 194b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch } 195b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 196342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch FunctionType* GetFunctionType() const { return data()->function_type(); } 197014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 198b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch static const Register ContextRegister(); 199b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 200958fae7ec3f466955f8e5b50fa5b8d38b9e91675Emily Bernier const char* DebugName(Isolate* isolate) const; 201b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 202342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch static FunctionType* BuildDefaultFunctionType(Isolate* isolate, 203342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch int paramater_count); 204014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 205b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch protected: 206b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch const CallInterfaceDescriptorData* data() const { return data_; } 207b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 208342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch virtual FunctionType* BuildCallInterfaceDescriptorFunctionType( 209014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch Isolate* isolate, int register_param_count) { 210014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch return BuildDefaultFunctionType(isolate, register_param_count); 211014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch } 212014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 213014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch virtual void InitializePlatformSpecific(CallInterfaceDescriptorData* data) { 214014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch UNREACHABLE(); 215014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch } 216014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 217014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch void Initialize(Isolate* isolate, CallDescriptors::Key key) { 218014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch if (!data()->IsInitialized()) { 219014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch CallInterfaceDescriptorData* d = isolate->call_descriptor_data(key); 2201b268ca467c924004286c97bac133db489cf43d0Ben Murdoch DCHECK(d == data()); // d should be a modifiable pointer to data(). 221014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch InitializePlatformSpecific(d); 222342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch FunctionType* function_type = BuildCallInterfaceDescriptorFunctionType( 223342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch isolate, d->register_param_count()); 224014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch d->InitializePlatformIndependent(function_type); 225014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch } 226014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch } 227014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 22821efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch // Initializes |data| using the platform dependent default set of registers. 22921efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch // It is intended to be used for TurboFan stubs when particular set of 23021efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch // registers does not matter. 23121efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch static void DefaultInitializePlatformSpecific( 23221efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch CallInterfaceDescriptorData* data, int register_parameter_count); 23321efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch 234b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch private: 235b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch const CallInterfaceDescriptorData* data_; 236b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch}; 237b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 2381b268ca467c924004286c97bac133db489cf43d0Ben Murdoch#define DECLARE_DESCRIPTOR_WITH_BASE(name, base) \ 2391b268ca467c924004286c97bac133db489cf43d0Ben Murdoch public: \ 2401b268ca467c924004286c97bac133db489cf43d0Ben Murdoch explicit name(Isolate* isolate) : base(isolate, key()) { \ 2411b268ca467c924004286c97bac133db489cf43d0Ben Murdoch Initialize(isolate, key()); \ 2421b268ca467c924004286c97bac133db489cf43d0Ben Murdoch } \ 2431b268ca467c924004286c97bac133db489cf43d0Ben Murdoch static inline CallDescriptors::Key key(); 244b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 24521efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch#define DECLARE_DEFAULT_DESCRIPTOR(name, base, parameter_count) \ 24621efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch DECLARE_DESCRIPTOR_WITH_BASE(name, base) \ 24721efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch protected: \ 24821efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch void InitializePlatformSpecific(CallInterfaceDescriptorData* data) \ 24921efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch override { \ 25021efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch DefaultInitializePlatformSpecific(data, parameter_count); \ 25121efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch } \ 25221efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch name(Isolate* isolate, CallDescriptors::Key key) : base(isolate, key) {} \ 25321efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch \ 25421efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch public: 25521efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch 256014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch#define DECLARE_DESCRIPTOR(name, base) \ 2571b268ca467c924004286c97bac133db489cf43d0Ben Murdoch DECLARE_DESCRIPTOR_WITH_BASE(name, base) \ 258014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch protected: \ 259014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch void InitializePlatformSpecific(CallInterfaceDescriptorData* data) override; \ 260014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch name(Isolate* isolate, CallDescriptors::Key key) : base(isolate, key) {} \ 261014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch \ 2621b268ca467c924004286c97bac133db489cf43d0Ben Murdoch public: 263b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 264014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch#define DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(name, base) \ 265014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch DECLARE_DESCRIPTOR(name, base) \ 266014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch protected: \ 267342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch FunctionType* BuildCallInterfaceDescriptorFunctionType( \ 268014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch Isolate* isolate, int register_param_count) override; \ 269014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch \ 270014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch public: 271014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 2721b268ca467c924004286c97bac133db489cf43d0Ben Murdoch#define DECLARE_DESCRIPTOR_WITH_BASE_AND_FUNCTION_TYPE_ARG(name, base, arg) \ 2731b268ca467c924004286c97bac133db489cf43d0Ben Murdoch DECLARE_DESCRIPTOR_WITH_BASE(name, base) \ 2741b268ca467c924004286c97bac133db489cf43d0Ben Murdoch protected: \ 2751b268ca467c924004286c97bac133db489cf43d0Ben Murdoch FunctionType* BuildCallInterfaceDescriptorFunctionType( \ 2761b268ca467c924004286c97bac133db489cf43d0Ben Murdoch Isolate* isolate, int register_param_count) override { \ 2771b268ca467c924004286c97bac133db489cf43d0Ben Murdoch return BuildCallInterfaceDescriptorFunctionTypeWithArg( \ 2781b268ca467c924004286c97bac133db489cf43d0Ben Murdoch isolate, register_param_count, arg); \ 2791b268ca467c924004286c97bac133db489cf43d0Ben Murdoch } \ 2801b268ca467c924004286c97bac133db489cf43d0Ben Murdoch \ 2811b268ca467c924004286c97bac133db489cf43d0Ben Murdoch public: 2821b268ca467c924004286c97bac133db489cf43d0Ben Murdoch 283014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdochclass VoidDescriptor : public CallInterfaceDescriptor { 284014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch public: 285014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch DECLARE_DESCRIPTOR(VoidDescriptor, CallInterfaceDescriptor) 286014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch}; 287014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 28821efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdochclass ContextOnlyDescriptor : public CallInterfaceDescriptor { 28921efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch public: 29021efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch DECLARE_DESCRIPTOR(ContextOnlyDescriptor, CallInterfaceDescriptor) 29121efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch}; 29221efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch 29321efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch// The OnStackWith*ArgsDescriptors have a lot of boilerplate. The superclass 29421efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch// OnStackArgsDescriptorBase is not meant to be instantiated directly and has no 29521efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch// public constructors to ensure this is so.contains all the logic, and the 29621efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch// 29721efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch// Use OnStackArgsDescriptorBase::ForArgs(isolate, parameter_count) to 29821efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch// instantiate a descriptor with the number of args. 29921efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdochclass OnStackArgsDescriptorBase : public CallInterfaceDescriptor { 30021efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch public: 30121efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch static CallInterfaceDescriptor ForArgs(Isolate* isolate, int parameter_count); 30221efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch 30321efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch protected: 30421efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch OnStackArgsDescriptorBase(Isolate* isolate, CallDescriptors::Key key) 30521efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch : CallInterfaceDescriptor(isolate, key) {} 30621efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch void InitializePlatformSpecific(CallInterfaceDescriptorData* data) override; 30721efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch FunctionType* BuildCallInterfaceDescriptorFunctionTypeWithArg( 30821efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch Isolate* isolate, int register_parameter_count, int parameter_count); 30921efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch}; 31021efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch 31121efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdochclass OnStackWith1ArgsDescriptor : public OnStackArgsDescriptorBase { 31221efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch public: 31321efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch DECLARE_DESCRIPTOR_WITH_BASE_AND_FUNCTION_TYPE_ARG(OnStackWith1ArgsDescriptor, 31421efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch OnStackArgsDescriptorBase, 31521efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch 1) 31621efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch}; 31721efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch 31821efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdochclass OnStackWith2ArgsDescriptor : public OnStackArgsDescriptorBase { 31921efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch public: 32021efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch DECLARE_DESCRIPTOR_WITH_BASE_AND_FUNCTION_TYPE_ARG(OnStackWith2ArgsDescriptor, 32121efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch OnStackArgsDescriptorBase, 32221efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch 2) 32321efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch}; 32421efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch 32521efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdochclass OnStackWith3ArgsDescriptor : public OnStackArgsDescriptorBase { 32621efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch public: 32721efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch DECLARE_DESCRIPTOR_WITH_BASE_AND_FUNCTION_TYPE_ARG(OnStackWith3ArgsDescriptor, 32821efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch OnStackArgsDescriptorBase, 32921efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch 3) 33021efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch}; 33121efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch 33221efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdochclass OnStackWith4ArgsDescriptor : public OnStackArgsDescriptorBase { 33321efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch public: 33421efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch DECLARE_DESCRIPTOR_WITH_BASE_AND_FUNCTION_TYPE_ARG(OnStackWith4ArgsDescriptor, 33521efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch OnStackArgsDescriptorBase, 33621efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch 4) 33721efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch}; 33821efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch 33921efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdochclass OnStackWith5ArgsDescriptor : public OnStackArgsDescriptorBase { 34021efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch public: 34121efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch DECLARE_DESCRIPTOR_WITH_BASE_AND_FUNCTION_TYPE_ARG(OnStackWith5ArgsDescriptor, 34221efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch OnStackArgsDescriptorBase, 34321efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch 5) 34421efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch}; 34521efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch 34621efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdochclass OnStackWith6ArgsDescriptor : public OnStackArgsDescriptorBase { 34721efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch public: 34821efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch DECLARE_DESCRIPTOR_WITH_BASE_AND_FUNCTION_TYPE_ARG(OnStackWith6ArgsDescriptor, 34921efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch OnStackArgsDescriptorBase, 35021efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch 6) 35121efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch}; 35221efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch 35321efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdochclass OnStackWith7ArgsDescriptor : public OnStackArgsDescriptorBase { 35421efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch public: 35521efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch DECLARE_DESCRIPTOR_WITH_BASE_AND_FUNCTION_TYPE_ARG(OnStackWith7ArgsDescriptor, 35621efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch OnStackArgsDescriptorBase, 35721efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch 7) 35821efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch}; 359014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 360b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch// LoadDescriptor is used by all stubs that implement Load/KeyedLoad ICs. 361b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdochclass LoadDescriptor : public CallInterfaceDescriptor { 362b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch public: 363014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(LoadDescriptor, 364014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch CallInterfaceDescriptor) 365b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 366014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch enum ParameterIndices { kReceiverIndex, kNameIndex, kSlotIndex }; 367b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch static const Register ReceiverRegister(); 368b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch static const Register NameRegister(); 369014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch static const Register SlotRegister(); 370b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch}; 371b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 37221efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdochclass LoadGlobalDescriptor : public CallInterfaceDescriptor { 37321efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch public: 37421efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(LoadGlobalDescriptor, 37521efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch CallInterfaceDescriptor) 37621efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch 37721efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch enum ParameterIndices { kSlotIndex }; 37821efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch 37921efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch static const Register SlotRegister() { 38021efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch return LoadDescriptor::SlotRegister(); 38121efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch } 38221efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch}; 383b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 384b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdochclass StoreDescriptor : public CallInterfaceDescriptor { 385b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch public: 386b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch DECLARE_DESCRIPTOR(StoreDescriptor, CallInterfaceDescriptor) 387b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 388b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch enum ParameterIndices { 389b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch kReceiverIndex, 390b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch kNameIndex, 391b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch kValueIndex, 392b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch kParameterCount 393b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch }; 394b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch static const Register ReceiverRegister(); 395b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch static const Register NameRegister(); 396b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch static const Register ValueRegister(); 397b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch}; 398b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 399b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 400958fae7ec3f466955f8e5b50fa5b8d38b9e91675Emily Bernierclass StoreTransitionDescriptor : public StoreDescriptor { 401958fae7ec3f466955f8e5b50fa5b8d38b9e91675Emily Bernier public: 402014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(StoreTransitionDescriptor, 403014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch StoreDescriptor) 404958fae7ec3f466955f8e5b50fa5b8d38b9e91675Emily Bernier 405958fae7ec3f466955f8e5b50fa5b8d38b9e91675Emily Bernier // Extends StoreDescriptor with Map parameter. 406958fae7ec3f466955f8e5b50fa5b8d38b9e91675Emily Bernier enum ParameterIndices { 407958fae7ec3f466955f8e5b50fa5b8d38b9e91675Emily Bernier kReceiverIndex, 408958fae7ec3f466955f8e5b50fa5b8d38b9e91675Emily Bernier kNameIndex, 409958fae7ec3f466955f8e5b50fa5b8d38b9e91675Emily Bernier kValueIndex, 410958fae7ec3f466955f8e5b50fa5b8d38b9e91675Emily Bernier kMapIndex, 411958fae7ec3f466955f8e5b50fa5b8d38b9e91675Emily Bernier kParameterCount 412958fae7ec3f466955f8e5b50fa5b8d38b9e91675Emily Bernier }; 413014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 414958fae7ec3f466955f8e5b50fa5b8d38b9e91675Emily Bernier static const Register MapRegister(); 415958fae7ec3f466955f8e5b50fa5b8d38b9e91675Emily Bernier}; 416958fae7ec3f466955f8e5b50fa5b8d38b9e91675Emily Bernier 417958fae7ec3f466955f8e5b50fa5b8d38b9e91675Emily Bernier 418014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdochclass VectorStoreTransitionDescriptor : public StoreDescriptor { 419b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch public: 420014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(VectorStoreTransitionDescriptor, 421014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch StoreDescriptor) 422014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 423014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch // Extends StoreDescriptor with Map parameter. 424014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch enum ParameterIndices { 425014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch kReceiverIndex = 0, 426014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch kNameIndex = 1, 427014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch kValueIndex = 2, 428014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 429014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch kMapIndex = 3, 430014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 431014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch kSlotIndex = 4, // not present on ia32. 432014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch kVirtualSlotVectorIndex = 4, 433014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 434014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch kVectorIndex = 5 435014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch }; 436b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 437b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch static const Register MapRegister(); 438014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch static const Register SlotRegister(); 439014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch static const Register VectorRegister(); 440b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch}; 441b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 442b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 443014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdochclass VectorStoreICTrampolineDescriptor : public StoreDescriptor { 444b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch public: 445014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE( 446014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch VectorStoreICTrampolineDescriptor, StoreDescriptor) 447b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 448014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch enum ParameterIndices { kReceiverIndex, kNameIndex, kValueIndex, kSlotIndex }; 449b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 450b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch static const Register SlotRegister(); 451b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch}; 452b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 453b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 454014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdochclass VectorStoreICDescriptor : public VectorStoreICTrampolineDescriptor { 455b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch public: 456014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE( 457014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch VectorStoreICDescriptor, VectorStoreICTrampolineDescriptor) 458014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 459014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch enum ParameterIndices { 460014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch kReceiverIndex, 461014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch kNameIndex, 462014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch kValueIndex, 463014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch kSlotIndex, 464014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch kVectorIndex 465014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch }; 466014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 467014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch static const Register VectorRegister(); 468014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch}; 469014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 470014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 471014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdochclass LoadWithVectorDescriptor : public LoadDescriptor { 472014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch public: 473014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(LoadWithVectorDescriptor, 474014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch LoadDescriptor) 475b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 476b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch enum ParameterIndices { 477b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch kReceiverIndex, 478b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch kNameIndex, 479b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch kSlotIndex, 480b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch kVectorIndex 481b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch }; 482b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 483b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch static const Register VectorRegister(); 484b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch}; 485b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 48621efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdochclass LoadGlobalWithVectorDescriptor : public LoadGlobalDescriptor { 48721efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch public: 48821efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(LoadGlobalWithVectorDescriptor, 48921efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch LoadGlobalDescriptor) 49021efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch 49121efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch enum ParameterIndices { kSlotIndex, kVectorIndex }; 49221efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch 49321efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch static const Register VectorRegister() { 49421efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch return LoadWithVectorDescriptor::VectorRegister(); 49521efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch } 49621efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch}; 497b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 498b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdochclass FastNewClosureDescriptor : public CallInterfaceDescriptor { 499b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch public: 500b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch DECLARE_DESCRIPTOR(FastNewClosureDescriptor, CallInterfaceDescriptor) 501b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch}; 502b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 503b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 504b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdochclass FastNewContextDescriptor : public CallInterfaceDescriptor { 505b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch public: 506b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch DECLARE_DESCRIPTOR(FastNewContextDescriptor, CallInterfaceDescriptor) 507b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch}; 508b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 509342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdochclass FastNewObjectDescriptor : public CallInterfaceDescriptor { 510342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch public: 511342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch DECLARE_DESCRIPTOR(FastNewObjectDescriptor, CallInterfaceDescriptor) 512342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch}; 513342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch 514342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdochclass FastNewRestParameterDescriptor : public CallInterfaceDescriptor { 515342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch public: 516342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch DECLARE_DESCRIPTOR(FastNewRestParameterDescriptor, CallInterfaceDescriptor) 517342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch}; 518342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch 519342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdochclass FastNewSloppyArgumentsDescriptor : public CallInterfaceDescriptor { 520342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch public: 521342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch DECLARE_DESCRIPTOR(FastNewSloppyArgumentsDescriptor, 522342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch CallInterfaceDescriptor) 523342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch}; 524342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch 525342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdochclass FastNewStrictArgumentsDescriptor : public CallInterfaceDescriptor { 526342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch public: 527342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch DECLARE_DESCRIPTOR(FastNewStrictArgumentsDescriptor, 528342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch CallInterfaceDescriptor) 529342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch}; 530342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch 5311b268ca467c924004286c97bac133db489cf43d0Ben Murdochclass TypeConversionDescriptor final : public CallInterfaceDescriptor { 532b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch public: 5331b268ca467c924004286c97bac133db489cf43d0Ben Murdoch enum ParameterIndices { kArgumentIndex }; 534b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 5351b268ca467c924004286c97bac133db489cf43d0Ben Murdoch DECLARE_DESCRIPTOR(TypeConversionDescriptor, CallInterfaceDescriptor) 536b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 5371b268ca467c924004286c97bac133db489cf43d0Ben Murdoch static const Register ArgumentRegister(); 538b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch}; 539b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 540537ba893e2530051ec7f296e769fdd37bb4ae4a0Ben Murdochclass HasPropertyDescriptor final : public CallInterfaceDescriptor { 541537ba893e2530051ec7f296e769fdd37bb4ae4a0Ben Murdoch public: 542537ba893e2530051ec7f296e769fdd37bb4ae4a0Ben Murdoch enum ParameterIndices { kKeyIndex, kObjectIndex }; 543537ba893e2530051ec7f296e769fdd37bb4ae4a0Ben Murdoch 54421efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch DECLARE_DEFAULT_DESCRIPTOR(HasPropertyDescriptor, CallInterfaceDescriptor, 2) 545537ba893e2530051ec7f296e769fdd37bb4ae4a0Ben Murdoch}; 546b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 547014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdochclass TypeofDescriptor : public CallInterfaceDescriptor { 548014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch public: 549014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch DECLARE_DESCRIPTOR(TypeofDescriptor, CallInterfaceDescriptor) 550014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch}; 551014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 552014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 553014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdochclass FastCloneRegExpDescriptor : public CallInterfaceDescriptor { 554014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch public: 555014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(FastCloneRegExpDescriptor, 556014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch CallInterfaceDescriptor) 557014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch}; 558014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 559014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 560b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdochclass FastCloneShallowArrayDescriptor : public CallInterfaceDescriptor { 561b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch public: 562014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(FastCloneShallowArrayDescriptor, 563014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch CallInterfaceDescriptor) 564b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch}; 565b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 566b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 567b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdochclass FastCloneShallowObjectDescriptor : public CallInterfaceDescriptor { 568b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch public: 569b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch DECLARE_DESCRIPTOR(FastCloneShallowObjectDescriptor, CallInterfaceDescriptor) 570b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch}; 571b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 572b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 573b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdochclass CreateAllocationSiteDescriptor : public CallInterfaceDescriptor { 574b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch public: 575014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(CreateAllocationSiteDescriptor, 576014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch CallInterfaceDescriptor) 577014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch}; 578014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 579014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 580014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdochclass CreateWeakCellDescriptor : public CallInterfaceDescriptor { 581014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch public: 582014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch enum ParameterIndices { 583014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch kVectorIndex, 584014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch kSlotIndex, 585014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch kValueIndex, 586014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch kParameterCount 587014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch }; 588014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 589014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(CreateWeakCellDescriptor, 590014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch CallInterfaceDescriptor) 591014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch}; 592014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 593014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 594014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdochclass CallTrampolineDescriptor : public CallInterfaceDescriptor { 595014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch public: 596014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(CallTrampolineDescriptor, 597014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch CallInterfaceDescriptor) 598014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch}; 599014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 600014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 601014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdochclass ConstructStubDescriptor : public CallInterfaceDescriptor { 602014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch public: 603014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(ConstructStubDescriptor, 604014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch CallInterfaceDescriptor) 605014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch}; 606014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 607014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 608014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdochclass ConstructTrampolineDescriptor : public CallInterfaceDescriptor { 609014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch public: 610014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(ConstructTrampolineDescriptor, 611014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch CallInterfaceDescriptor) 612b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch}; 613b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 614b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 615b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdochclass CallFunctionDescriptor : public CallInterfaceDescriptor { 616b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch public: 617b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch DECLARE_DESCRIPTOR(CallFunctionDescriptor, CallInterfaceDescriptor) 618b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch}; 619b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 620b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 621b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdochclass CallFunctionWithFeedbackDescriptor : public CallInterfaceDescriptor { 622b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch public: 623014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE( 624014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch CallFunctionWithFeedbackDescriptor, CallInterfaceDescriptor) 625014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch}; 626014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 627014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 628014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdochclass CallFunctionWithFeedbackAndVectorDescriptor 629014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch : public CallInterfaceDescriptor { 630014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch public: 631014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE( 632014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch CallFunctionWithFeedbackAndVectorDescriptor, CallInterfaceDescriptor) 633b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch}; 634b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 635b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 636b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdochclass CallConstructDescriptor : public CallInterfaceDescriptor { 637b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch public: 638b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch DECLARE_DESCRIPTOR(CallConstructDescriptor, CallInterfaceDescriptor) 639b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch}; 640b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 641b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 642b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdochclass RegExpConstructResultDescriptor : public CallInterfaceDescriptor { 643b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch public: 644b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch DECLARE_DESCRIPTOR(RegExpConstructResultDescriptor, CallInterfaceDescriptor) 645b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch}; 646b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 647b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 648014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdochclass StoreGlobalViaContextDescriptor : public CallInterfaceDescriptor { 649014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch public: 650014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(StoreGlobalViaContextDescriptor, 651014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch CallInterfaceDescriptor) 652014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 653014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch static const Register SlotRegister(); 654014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch static const Register ValueRegister(); 655014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch}; 656014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 657014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 658b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdochclass TransitionElementsKindDescriptor : public CallInterfaceDescriptor { 659b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch public: 660b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch DECLARE_DESCRIPTOR(TransitionElementsKindDescriptor, CallInterfaceDescriptor) 661b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch}; 662b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 663b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 664958fae7ec3f466955f8e5b50fa5b8d38b9e91675Emily Bernierclass AllocateHeapNumberDescriptor : public CallInterfaceDescriptor { 665958fae7ec3f466955f8e5b50fa5b8d38b9e91675Emily Bernier public: 666958fae7ec3f466955f8e5b50fa5b8d38b9e91675Emily Bernier DECLARE_DESCRIPTOR(AllocateHeapNumberDescriptor, CallInterfaceDescriptor) 667958fae7ec3f466955f8e5b50fa5b8d38b9e91675Emily Bernier}; 668958fae7ec3f466955f8e5b50fa5b8d38b9e91675Emily Bernier 6691b268ca467c924004286c97bac133db489cf43d0Ben Murdoch#define SIMD128_ALLOC_DESC(TYPE, Type, type, lane_count, lane_type) \ 6701b268ca467c924004286c97bac133db489cf43d0Ben Murdoch class Allocate##Type##Descriptor : public CallInterfaceDescriptor { \ 6711b268ca467c924004286c97bac133db489cf43d0Ben Murdoch public: \ 6721b268ca467c924004286c97bac133db489cf43d0Ben Murdoch DECLARE_DESCRIPTOR(Allocate##Type##Descriptor, CallInterfaceDescriptor) \ 6731b268ca467c924004286c97bac133db489cf43d0Ben Murdoch }; 6741b268ca467c924004286c97bac133db489cf43d0Ben MurdochSIMD128_TYPES(SIMD128_ALLOC_DESC) 6751b268ca467c924004286c97bac133db489cf43d0Ben Murdoch#undef SIMD128_ALLOC_DESC 676958fae7ec3f466955f8e5b50fa5b8d38b9e91675Emily Bernier 677537ba893e2530051ec7f296e769fdd37bb4ae4a0Ben Murdochclass ArrayNoArgumentConstructorDescriptor : public CallInterfaceDescriptor { 678014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch public: 679537ba893e2530051ec7f296e769fdd37bb4ae4a0Ben Murdoch DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE( 680537ba893e2530051ec7f296e769fdd37bb4ae4a0Ben Murdoch ArrayNoArgumentConstructorDescriptor, CallInterfaceDescriptor) 681537ba893e2530051ec7f296e769fdd37bb4ae4a0Ben Murdoch enum ParameterIndices { 682537ba893e2530051ec7f296e769fdd37bb4ae4a0Ben Murdoch kFunctionIndex, 683537ba893e2530051ec7f296e769fdd37bb4ae4a0Ben Murdoch kAllocationSiteIndex, 684537ba893e2530051ec7f296e769fdd37bb4ae4a0Ben Murdoch kArgumentCountIndex, 68521efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch kFunctionParameterIndex, 686537ba893e2530051ec7f296e769fdd37bb4ae4a0Ben Murdoch kContextIndex 687537ba893e2530051ec7f296e769fdd37bb4ae4a0Ben Murdoch }; 688014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch}; 689014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 69021efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdochclass ArraySingleArgumentConstructorDescriptor 691b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch : public CallInterfaceDescriptor { 692b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch public: 69321efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE( 69421efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch ArraySingleArgumentConstructorDescriptor, CallInterfaceDescriptor) 69521efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch enum ParameterIndices { 69621efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch kFunctionIndex, 69721efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch kAllocationSiteIndex, 69821efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch kArgumentCountIndex, 69921efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch kFunctionParameterIndex, 70021efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch kArraySizeSmiParameterIndex, 70121efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch kContextIndex 70221efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch }; 703b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch}; 704b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 70521efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdochclass ArrayNArgumentsConstructorDescriptor : public CallInterfaceDescriptor { 706b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch public: 707014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE( 70821efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch ArrayNArgumentsConstructorDescriptor, CallInterfaceDescriptor) 70921efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch enum ParameterIndices { 71021efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch kFunctionIndex, 71121efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch kAllocationSiteIndex, 71221efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch kArgumentCountIndex, 71321efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch kContextIndex 71421efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch }; 715014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch}; 716014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 717014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 718014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdochclass CompareDescriptor : public CallInterfaceDescriptor { 719014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch public: 720014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch DECLARE_DESCRIPTOR(CompareDescriptor, CallInterfaceDescriptor) 721b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch}; 722b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 723b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 724b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdochclass BinaryOpDescriptor : public CallInterfaceDescriptor { 725b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch public: 726b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch DECLARE_DESCRIPTOR(BinaryOpDescriptor, CallInterfaceDescriptor) 727b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch}; 728b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 729b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 730b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdochclass BinaryOpWithAllocationSiteDescriptor : public CallInterfaceDescriptor { 731b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch public: 732b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch DECLARE_DESCRIPTOR(BinaryOpWithAllocationSiteDescriptor, 733b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch CallInterfaceDescriptor) 734b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch}; 735b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 736537ba893e2530051ec7f296e769fdd37bb4ae4a0Ben Murdochclass CountOpDescriptor final : public CallInterfaceDescriptor { 737537ba893e2530051ec7f296e769fdd37bb4ae4a0Ben Murdoch public: 738537ba893e2530051ec7f296e769fdd37bb4ae4a0Ben Murdoch DECLARE_DESCRIPTOR(CountOpDescriptor, CallInterfaceDescriptor) 739537ba893e2530051ec7f296e769fdd37bb4ae4a0Ben Murdoch}; 740b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 741b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdochclass StringAddDescriptor : public CallInterfaceDescriptor { 742b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch public: 743b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch DECLARE_DESCRIPTOR(StringAddDescriptor, CallInterfaceDescriptor) 744b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch}; 745b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 746b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 747014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdochclass StringCompareDescriptor : public CallInterfaceDescriptor { 748014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch public: 749014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch DECLARE_DESCRIPTOR(StringCompareDescriptor, CallInterfaceDescriptor) 750014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 751014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch enum ParameterIndices { kLeftIndex, kRightIndex, kParameterCount }; 752014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch static const Register LeftRegister(); 753014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch static const Register RightRegister(); 754014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch}; 755014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 756014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 757b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdochclass KeyedDescriptor : public CallInterfaceDescriptor { 758b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch public: 759b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch DECLARE_DESCRIPTOR(KeyedDescriptor, CallInterfaceDescriptor) 760b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch}; 761b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 762b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 763b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdochclass NamedDescriptor : public CallInterfaceDescriptor { 764b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch public: 765b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch DECLARE_DESCRIPTOR(NamedDescriptor, CallInterfaceDescriptor) 766b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch}; 767b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 768b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 769b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdochclass CallHandlerDescriptor : public CallInterfaceDescriptor { 770b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch public: 771b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch DECLARE_DESCRIPTOR(CallHandlerDescriptor, CallInterfaceDescriptor) 772b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch}; 773b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 774b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 775b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdochclass ArgumentAdaptorDescriptor : public CallInterfaceDescriptor { 776b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch public: 777014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(ArgumentAdaptorDescriptor, 778014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch CallInterfaceDescriptor) 779b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch}; 780b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 7811b268ca467c924004286c97bac133db489cf43d0Ben Murdoch// The ApiCallback*Descriptors have a lot of boilerplate. The superclass 7821b268ca467c924004286c97bac133db489cf43d0Ben Murdoch// ApiCallbackDescriptorBase contains all the logic, and the 7831b268ca467c924004286c97bac133db489cf43d0Ben Murdoch// ApiCallbackWith*ArgsDescriptor merely instantiate these with a 7841b268ca467c924004286c97bac133db489cf43d0Ben Murdoch// parameter for the number of args. 7851b268ca467c924004286c97bac133db489cf43d0Ben Murdoch// 7861b268ca467c924004286c97bac133db489cf43d0Ben Murdoch// The base class is not meant to be instantiated directly and has no 7871b268ca467c924004286c97bac133db489cf43d0Ben Murdoch// public constructors to ensure this is so. 7881b268ca467c924004286c97bac133db489cf43d0Ben Murdoch// 7891b268ca467c924004286c97bac133db489cf43d0Ben Murdoch// The simplest usage for all the ApiCallback*Descriptors is probably 7901b268ca467c924004286c97bac133db489cf43d0Ben Murdoch// ApiCallbackDescriptorBase::ForArgs(isolate, argc) 7911b268ca467c924004286c97bac133db489cf43d0Ben Murdoch// 7921b268ca467c924004286c97bac133db489cf43d0Ben Murdochclass ApiCallbackDescriptorBase : public CallInterfaceDescriptor { 7931b268ca467c924004286c97bac133db489cf43d0Ben Murdoch public: 7941b268ca467c924004286c97bac133db489cf43d0Ben Murdoch static CallInterfaceDescriptor ForArgs(Isolate* isolate, int argc); 795b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 7961b268ca467c924004286c97bac133db489cf43d0Ben Murdoch protected: 7971b268ca467c924004286c97bac133db489cf43d0Ben Murdoch ApiCallbackDescriptorBase(Isolate* isolate, CallDescriptors::Key key) 7981b268ca467c924004286c97bac133db489cf43d0Ben Murdoch : CallInterfaceDescriptor(isolate, key) {} 7991b268ca467c924004286c97bac133db489cf43d0Ben Murdoch void InitializePlatformSpecific(CallInterfaceDescriptorData* data) override; 8001b268ca467c924004286c97bac133db489cf43d0Ben Murdoch FunctionType* BuildCallInterfaceDescriptorFunctionTypeWithArg( 8011b268ca467c924004286c97bac133db489cf43d0Ben Murdoch Isolate* isolate, int parameter_count, int argc); 8021b268ca467c924004286c97bac133db489cf43d0Ben Murdoch}; 8031b268ca467c924004286c97bac133db489cf43d0Ben Murdoch 8041b268ca467c924004286c97bac133db489cf43d0Ben Murdochclass ApiCallbackWith0ArgsDescriptor : public ApiCallbackDescriptorBase { 805b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch public: 8061b268ca467c924004286c97bac133db489cf43d0Ben Murdoch DECLARE_DESCRIPTOR_WITH_BASE_AND_FUNCTION_TYPE_ARG( 8071b268ca467c924004286c97bac133db489cf43d0Ben Murdoch ApiCallbackWith0ArgsDescriptor, ApiCallbackDescriptorBase, 0) 808014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch}; 809014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 8101b268ca467c924004286c97bac133db489cf43d0Ben Murdochclass ApiCallbackWith1ArgsDescriptor : public ApiCallbackDescriptorBase { 8111b268ca467c924004286c97bac133db489cf43d0Ben Murdoch public: 8121b268ca467c924004286c97bac133db489cf43d0Ben Murdoch DECLARE_DESCRIPTOR_WITH_BASE_AND_FUNCTION_TYPE_ARG( 8131b268ca467c924004286c97bac133db489cf43d0Ben Murdoch ApiCallbackWith1ArgsDescriptor, ApiCallbackDescriptorBase, 1) 8141b268ca467c924004286c97bac133db489cf43d0Ben Murdoch}; 815014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 8161b268ca467c924004286c97bac133db489cf43d0Ben Murdochclass ApiCallbackWith2ArgsDescriptor : public ApiCallbackDescriptorBase { 817014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch public: 8181b268ca467c924004286c97bac133db489cf43d0Ben Murdoch DECLARE_DESCRIPTOR_WITH_BASE_AND_FUNCTION_TYPE_ARG( 8191b268ca467c924004286c97bac133db489cf43d0Ben Murdoch ApiCallbackWith2ArgsDescriptor, ApiCallbackDescriptorBase, 2) 8201b268ca467c924004286c97bac133db489cf43d0Ben Murdoch}; 8211b268ca467c924004286c97bac133db489cf43d0Ben Murdoch 8221b268ca467c924004286c97bac133db489cf43d0Ben Murdochclass ApiCallbackWith3ArgsDescriptor : public ApiCallbackDescriptorBase { 8231b268ca467c924004286c97bac133db489cf43d0Ben Murdoch public: 8241b268ca467c924004286c97bac133db489cf43d0Ben Murdoch DECLARE_DESCRIPTOR_WITH_BASE_AND_FUNCTION_TYPE_ARG( 8251b268ca467c924004286c97bac133db489cf43d0Ben Murdoch ApiCallbackWith3ArgsDescriptor, ApiCallbackDescriptorBase, 3) 8261b268ca467c924004286c97bac133db489cf43d0Ben Murdoch}; 8271b268ca467c924004286c97bac133db489cf43d0Ben Murdoch 8281b268ca467c924004286c97bac133db489cf43d0Ben Murdochclass ApiCallbackWith4ArgsDescriptor : public ApiCallbackDescriptorBase { 8291b268ca467c924004286c97bac133db489cf43d0Ben Murdoch public: 8301b268ca467c924004286c97bac133db489cf43d0Ben Murdoch DECLARE_DESCRIPTOR_WITH_BASE_AND_FUNCTION_TYPE_ARG( 8311b268ca467c924004286c97bac133db489cf43d0Ben Murdoch ApiCallbackWith4ArgsDescriptor, ApiCallbackDescriptorBase, 4) 8321b268ca467c924004286c97bac133db489cf43d0Ben Murdoch}; 8331b268ca467c924004286c97bac133db489cf43d0Ben Murdoch 8341b268ca467c924004286c97bac133db489cf43d0Ben Murdochclass ApiCallbackWith5ArgsDescriptor : public ApiCallbackDescriptorBase { 8351b268ca467c924004286c97bac133db489cf43d0Ben Murdoch public: 8361b268ca467c924004286c97bac133db489cf43d0Ben Murdoch DECLARE_DESCRIPTOR_WITH_BASE_AND_FUNCTION_TYPE_ARG( 8371b268ca467c924004286c97bac133db489cf43d0Ben Murdoch ApiCallbackWith5ArgsDescriptor, ApiCallbackDescriptorBase, 5) 8381b268ca467c924004286c97bac133db489cf43d0Ben Murdoch}; 8391b268ca467c924004286c97bac133db489cf43d0Ben Murdoch 8401b268ca467c924004286c97bac133db489cf43d0Ben Murdochclass ApiCallbackWith6ArgsDescriptor : public ApiCallbackDescriptorBase { 8411b268ca467c924004286c97bac133db489cf43d0Ben Murdoch public: 8421b268ca467c924004286c97bac133db489cf43d0Ben Murdoch DECLARE_DESCRIPTOR_WITH_BASE_AND_FUNCTION_TYPE_ARG( 8431b268ca467c924004286c97bac133db489cf43d0Ben Murdoch ApiCallbackWith6ArgsDescriptor, ApiCallbackDescriptorBase, 6) 8441b268ca467c924004286c97bac133db489cf43d0Ben Murdoch}; 8451b268ca467c924004286c97bac133db489cf43d0Ben Murdoch 8461b268ca467c924004286c97bac133db489cf43d0Ben Murdochclass ApiCallbackWith7ArgsDescriptor : public ApiCallbackDescriptorBase { 8471b268ca467c924004286c97bac133db489cf43d0Ben Murdoch public: 8481b268ca467c924004286c97bac133db489cf43d0Ben Murdoch DECLARE_DESCRIPTOR_WITH_BASE_AND_FUNCTION_TYPE_ARG( 8491b268ca467c924004286c97bac133db489cf43d0Ben Murdoch ApiCallbackWith7ArgsDescriptor, ApiCallbackDescriptorBase, 7) 850b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch}; 851b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 852b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 853b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdochclass ApiGetterDescriptor : public CallInterfaceDescriptor { 854b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch public: 855537ba893e2530051ec7f296e769fdd37bb4ae4a0Ben Murdoch DECLARE_DESCRIPTOR(ApiGetterDescriptor, CallInterfaceDescriptor) 856b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 857537ba893e2530051ec7f296e769fdd37bb4ae4a0Ben Murdoch static const Register ReceiverRegister(); 858537ba893e2530051ec7f296e769fdd37bb4ae4a0Ben Murdoch static const Register HolderRegister(); 859537ba893e2530051ec7f296e769fdd37bb4ae4a0Ben Murdoch static const Register CallbackRegister(); 860b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch}; 861b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 862b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdochclass MathPowTaggedDescriptor : public CallInterfaceDescriptor { 863b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch public: 864b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch DECLARE_DESCRIPTOR(MathPowTaggedDescriptor, CallInterfaceDescriptor) 865b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 866b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch static const Register exponent(); 867b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch}; 868b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 869b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdochclass MathPowIntegerDescriptor : public CallInterfaceDescriptor { 870b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch public: 871b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch DECLARE_DESCRIPTOR(MathPowIntegerDescriptor, CallInterfaceDescriptor) 872b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 873b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch static const Register exponent(); 874b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch}; 875b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 87621efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdochclass VarArgFunctionDescriptor : public CallInterfaceDescriptor { 8771b268ca467c924004286c97bac133db489cf43d0Ben Murdoch public: 87821efce637eb329c94f1323b6a2334a1c977e1a9dBen Murdoch DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(VarArgFunctionDescriptor, 8791b268ca467c924004286c97bac133db489cf43d0Ben Murdoch CallInterfaceDescriptor) 8801b268ca467c924004286c97bac133db489cf43d0Ben Murdoch}; 881014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 882014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdochclass GrowArrayElementsDescriptor : public CallInterfaceDescriptor { 883014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch public: 884014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch DECLARE_DESCRIPTOR(GrowArrayElementsDescriptor, CallInterfaceDescriptor) 885014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 886014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch enum RegisterInfo { kObjectIndex, kKeyIndex }; 887014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch static const Register ObjectRegister(); 888014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch static const Register KeyRegister(); 889014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch}; 890014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 8911b268ca467c924004286c97bac133db489cf43d0Ben Murdochclass InterpreterDispatchDescriptor : public CallInterfaceDescriptor { 892342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch public: 893342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(InterpreterDispatchDescriptor, 894342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch CallInterfaceDescriptor) 895342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch 896342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch static const int kAccumulatorParameter = 0; 897537ba893e2530051ec7f296e769fdd37bb4ae4a0Ben Murdoch static const int kBytecodeOffsetParameter = 1; 898537ba893e2530051ec7f296e769fdd37bb4ae4a0Ben Murdoch static const int kBytecodeArrayParameter = 2; 899537ba893e2530051ec7f296e769fdd37bb4ae4a0Ben Murdoch static const int kDispatchTableParameter = 3; 900342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch}; 901014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 902014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdochclass InterpreterPushArgsAndCallDescriptor : public CallInterfaceDescriptor { 903014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch public: 904014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch DECLARE_DESCRIPTOR(InterpreterPushArgsAndCallDescriptor, 905014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch CallInterfaceDescriptor) 906014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch}; 907014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 908014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 909014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdochclass InterpreterPushArgsAndConstructDescriptor 910014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch : public CallInterfaceDescriptor { 911014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch public: 912014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch DECLARE_DESCRIPTOR(InterpreterPushArgsAndConstructDescriptor, 913014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch CallInterfaceDescriptor) 914014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch}; 915014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 916014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 917014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdochclass InterpreterCEntryDescriptor : public CallInterfaceDescriptor { 918014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch public: 919014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch DECLARE_DESCRIPTOR(InterpreterCEntryDescriptor, CallInterfaceDescriptor) 920014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch}; 921014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch 922537ba893e2530051ec7f296e769fdd37bb4ae4a0Ben Murdochclass ResumeGeneratorDescriptor final : public CallInterfaceDescriptor { 923537ba893e2530051ec7f296e769fdd37bb4ae4a0Ben Murdoch public: 924537ba893e2530051ec7f296e769fdd37bb4ae4a0Ben Murdoch DECLARE_DESCRIPTOR(ResumeGeneratorDescriptor, CallInterfaceDescriptor) 925537ba893e2530051ec7f296e769fdd37bb4ae4a0Ben Murdoch}; 926537ba893e2530051ec7f296e769fdd37bb4ae4a0Ben Murdoch 9271b268ca467c924004286c97bac133db489cf43d0Ben Murdoch#undef DECLARE_DESCRIPTOR_WITH_BASE 928b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch#undef DECLARE_DESCRIPTOR 9291b268ca467c924004286c97bac133db489cf43d0Ben Murdoch#undef DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE 9301b268ca467c924004286c97bac133db489cf43d0Ben Murdoch#undef DECLARE_DESCRIPTOR_WITH_BASE_AND_FUNCTION_TYPE_ARG 931b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 932b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch// We define the association between CallDescriptors::Key and the specialized 933b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch// descriptor here to reduce boilerplate and mistakes. 934b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch#define DEF_KEY(name) \ 935b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch CallDescriptors::Key name##Descriptor::key() { return CallDescriptors::name; } 936b8a8cc1952d61a2f3a2568848933943a543b5d3eBen MurdochINTERFACE_DESCRIPTOR_LIST(DEF_KEY) 937b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch#undef DEF_KEY 938014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch} // namespace internal 939014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch} // namespace v8 940b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 941b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 942b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch#if V8_TARGET_ARCH_ARM64 943b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch#include "src/arm64/interface-descriptors-arm64.h" 944b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch#elif V8_TARGET_ARCH_ARM 945b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch#include "src/arm/interface-descriptors-arm.h" 946b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch#endif 947b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch 948b8a8cc1952d61a2f3a2568848933943a543b5d3eBen Murdoch#endif // V8_CALL_INTERFACE_DESCRIPTOR_H_ 949