class Stringifier;
- class JSONObject : public JSObject {
+ class JSONObject : public JSNonFinalObject {
public:
- JSONObject(PassRefPtr<Structure> structure)
- : JSObject(structure)
+ typedef JSNonFinalObject Base;
+
+ static JSONObject* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure)
{
+ JSONObject* object = new (NotNull, allocateCell<JSONObject>(*exec->heap())) JSONObject(globalObject, structure);
+ object->finishCreation(globalObject);
+ return object;
}
-
- static PassRefPtr<Structure> createStructure(JSValue prototype)
+
+ static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
{
- return Structure::create(prototype, TypeInfo(ObjectType));
+ return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), &s_info);
}
+
+ static const ClassInfo s_info;
- static void markStringifiers(Stringifier*);
+ protected:
+ void finishCreation(JSGlobalObject*);
+ static const unsigned StructureFlags = OverridesGetOwnPropertySlot | JSObject::StructureFlags;
private:
- virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
+ JSONObject(JSGlobalObject*, Structure*);
+ static bool getOwnPropertySlot(JSCell*, ExecState*, PropertyName, PropertySlot&);
+ static bool getOwnPropertyDescriptor(JSObject*, ExecState*, PropertyName, PropertyDescriptor&);
- virtual const ClassInfo* classInfo() const { return &info; }
- static const ClassInfo info;
};
+ String JSONStringify(ExecState*, JSValue, unsigned indent);
+
} // namespace JSC
#endif // JSONObject_h