GenericArguments.h [plain text]
#pragma once
#include "CagedBarrierPtr.h"
#include "JSObject.h"
namespace JSC {
template<typename Type>
class GenericArguments : public JSNonFinalObject {
public:
typedef JSNonFinalObject Base;
static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | OverridesGetPropertyNames;
protected:
GenericArguments(VM& vm, Structure* structure)
: Base(vm, structure)
{
}
static void visitChildren(JSCell*, SlotVisitor&);
static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
static bool getOwnPropertySlotByIndex(JSObject*, ExecState*, unsigned propertyName, PropertySlot&);
static void getOwnPropertyNames(JSObject*, ExecState*, PropertyNameArray&, EnumerationMode);
static bool put(JSCell*, ExecState*, PropertyName, JSValue, PutPropertySlot&);
static bool putByIndex(JSCell*, ExecState*, unsigned propertyName, JSValue, bool shouldThrow);
static bool deleteProperty(JSCell*, ExecState*, PropertyName);
static bool deletePropertyByIndex(JSCell*, ExecState*, unsigned propertyName);
static bool defineOwnProperty(JSObject*, ExecState*, PropertyName, const PropertyDescriptor&, bool shouldThrow);
void initModifiedArgumentsDescriptor(VM&, unsigned length);
void initModifiedArgumentsDescriptorIfNecessary(VM&, unsigned length);
void setModifiedArgumentDescriptor(VM&, unsigned index, unsigned length);
bool isModifiedArgumentDescriptor(unsigned index, unsigned length);
void copyToArguments(ExecState*, VirtualRegister firstElementDest, unsigned offset, unsigned length);
CagedBarrierPtr<Gigacage::Primitive, bool> m_modifiedArgumentsDescriptor;
};
}