X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/f9bf01c6616d5ddcf65b13b33cedf9e387ff7a63..a253471d7f8e4d91bf6ebabab00155c3b387d3d0:/runtime/InternalFunction.h diff --git a/runtime/InternalFunction.h b/runtime/InternalFunction.h index d19b82b..532bd0c 100644 --- a/runtime/InternalFunction.h +++ b/runtime/InternalFunction.h @@ -31,35 +31,36 @@ namespace JSC { class FunctionPrototype; - class InternalFunction : public JSObject { + class InternalFunction : public JSNonFinalObject { public: - virtual const ClassInfo* classInfo() const; - static JS_EXPORTDATA const ClassInfo info; + typedef JSNonFinalObject Base; - const UString& name(ExecState*); + static JS_EXPORTDATA const ClassInfo s_info; + + JS_EXPORT_PRIVATE const UString& name(ExecState*); const UString displayName(ExecState*); const UString calculatedDisplayName(ExecState*); - static PassRefPtr createStructure(JSValue proto) + static Structure* createStructure(JSGlobalData& globalData, JSGlobalObject* globalObject, JSValue proto) { - return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); + return Structure::create(globalData, globalObject, proto, TypeInfo(ObjectType, StructureFlags), &s_info); } protected: static const unsigned StructureFlags = ImplementsHasInstance | JSObject::StructureFlags; - InternalFunction(NonNullPassRefPtr structure) : JSObject(structure) { } - InternalFunction(JSGlobalData*, NonNullPassRefPtr, const Identifier&); + JS_EXPORT_PRIVATE InternalFunction(JSGlobalObject*, Structure*); + + JS_EXPORT_PRIVATE void finishCreation(JSGlobalData&, const Identifier& name); - private: - virtual CallType getCallData(CallData&) = 0; + static CallType getCallData(JSCell*, CallData&); }; InternalFunction* asInternalFunction(JSValue); inline InternalFunction* asInternalFunction(JSValue value) { - ASSERT(asObject(value)->inherits(&InternalFunction::info)); + ASSERT(asObject(value)->inherits(&InternalFunction::s_info)); return static_cast(asObject(value)); }