- static bool deleteProperty(JSCell*, ExecState*, const Identifier& propertyName);
- static bool deletePropertyByIndex(JSCell*, ExecState*, unsigned propertyName);
-
- static JSObject* toThisObject(JSCell*, ExecState*);
-
- void zap() { *reinterpret_cast<uintptr_t**>(this) = 0; }
- bool isZapped() const { return !*reinterpret_cast<uintptr_t* const*>(this); }
-
- // FIXME: Rename getOwnPropertySlot to virtualGetOwnPropertySlot, and
- // fastGetOwnPropertySlot to getOwnPropertySlot. Callers should always
- // call this function, not its slower virtual counterpart. (For integer
- // property names, we want a similar interface with appropriate optimizations.)
- bool fastGetOwnPropertySlot(ExecState*, const Identifier& propertyName, PropertySlot&);
- JSValue fastGetOwnProperty(ExecState*, const UString&);
-
- static ptrdiff_t structureOffset()
- {
- return OBJECT_OFFSETOF(JSCell, m_structure);
- }
-
- static ptrdiff_t classInfoOffset()
- {
- return OBJECT_OFFSETOF(JSCell, m_classInfo);
- }
-
- void* structureAddress()
- {
- return &m_structure;
- }
-
-#if ENABLE(GC_VALIDATION)
- Structure* unvalidatedStructure() { return m_structure.unvalidatedGet(); }
-#endif
-
- static const TypedArrayType TypedArrayStorageType = TypedArrayNone;
- protected:
-
- void finishCreation(JSGlobalData&);
- void finishCreation(JSGlobalData&, Structure*, CreatingEarlyCellTag);
-
- // Base implementation; for non-object classes implements getPropertySlot.
- static bool getOwnPropertySlot(JSCell*, ExecState*, const Identifier& propertyName, PropertySlot&);
- static bool getOwnPropertySlotByIndex(JSCell*, ExecState*, unsigned propertyName, PropertySlot&);
-
- // Dummy implementations of override-able static functions for classes to put in their MethodTable
- static JSValue defaultValue(const JSObject*, ExecState*, PreferredPrimitiveType);
- static NO_RETURN_DUE_TO_ASSERT void getOwnPropertyNames(JSObject*, ExecState*, PropertyNameArray&, EnumerationMode);
- static NO_RETURN_DUE_TO_ASSERT void getPropertyNames(JSObject*, ExecState*, PropertyNameArray&, EnumerationMode);
- static UString className(const JSObject*);
- static bool hasInstance(JSObject*, ExecState*, JSValue, JSValue prototypeProperty);
- static NO_RETURN_DUE_TO_ASSERT void putDirectVirtual(JSObject*, ExecState*, const Identifier& propertyName, JSValue, unsigned attributes);
- static bool defineOwnProperty(JSObject*, ExecState*, const Identifier& propertyName, PropertyDescriptor&, bool shouldThrow);
- static bool getOwnPropertyDescriptor(JSObject*, ExecState*, const Identifier&, PropertyDescriptor&);
-
- private:
- friend class LLIntOffsetsExtractor;
+ JS_EXPORT_PRIVATE static CallType getCallData(JSCell*, CallData&);
+ JS_EXPORT_PRIVATE static ConstructType getConstructData(JSCell*, ConstructData&);
+
+ // Basic conversions.
+ JS_EXPORT_PRIVATE JSValue toPrimitive(ExecState*, PreferredPrimitiveType) const;
+ bool getPrimitiveNumber(ExecState*, double& number, JSValue&) const;
+ bool toBoolean(ExecState*) const;
+ TriState pureToBoolean() const;
+ JS_EXPORT_PRIVATE double toNumber(ExecState*) const;
+ JS_EXPORT_PRIVATE JSObject* toObject(ExecState*, JSGlobalObject*) const;
+
+ static void visitChildren(JSCell*, SlotVisitor&);
+ JS_EXPORT_PRIVATE static void copyBackingStore(JSCell*, CopyVisitor&);
+
+ // Object operations, with the toObject operation included.
+ const ClassInfo* classInfo() const;
+ const MethodTable* methodTable() const;
+ const MethodTable* methodTableForDestruction() const;
+ static void put(JSCell*, ExecState*, PropertyName, JSValue, PutPropertySlot&);
+ static void putByIndex(JSCell*, ExecState*, unsigned propertyName, JSValue, bool shouldThrow);