#pragma once
#include "JSObject.h"
namespace JSC {
class ObjectPrototype final : public JSNonFinalObject {
public:
using Base = JSNonFinalObject;
static constexpr unsigned StructureFlags = Base::StructureFlags | IsImmutablePrototypeExoticObject;
template<typename CellType, SubspaceAccess>
static IsoSubspace* subspaceFor(VM& vm)
{
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(ObjectPrototype, Base);
return &vm.plainObjectSpace;
}
static ObjectPrototype* create(VM&, JSGlobalObject*, Structure*);
DECLARE_EXPORT_INFO;
static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
{
return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info());
}
private:
ObjectPrototype(VM&, Structure*);
void finishCreation(VM&, JSGlobalObject*);
};
JS_EXPORT_PRIVATE JSC_DECLARE_HOST_FUNCTION(objectProtoFuncToString);
bool objectPrototypeHasOwnProperty(JSGlobalObject*, JSValue base, const Identifier& property);
}