class FunctionPrototype;
- class InternalFunction : public JSObject {
+ class InternalFunction : public JSNonFinalObject {
public:
- virtual const ClassInfo* classInfo() const;
- static const ClassInfo info;
+ typedef JSNonFinalObject Base;
- const UString& name(JSGlobalData*);
+ static JS_EXPORTDATA const ClassInfo s_info;
- static PassRefPtr<Structure> createStructure(JSValuePtr proto)
+ JS_EXPORT_PRIVATE const UString& name(ExecState*);
+ const UString displayName(ExecState*);
+ const UString calculatedDisplayName(ExecState*);
+
+ static Structure* createStructure(JSGlobalData& globalData, JSGlobalObject* globalObject, JSValue proto)
{
- return Structure::create(proto, TypeInfo(ObjectType, ImplementsHasInstance | HasStandardGetOwnPropertySlot));
+ return Structure::create(globalData, globalObject, proto, TypeInfo(ObjectType, StructureFlags), &s_info);
}
protected:
- InternalFunction(PassRefPtr<Structure> structure) : JSObject(structure) { }
- InternalFunction(JSGlobalData*, PassRefPtr<Structure>, const Identifier&);
+ static const unsigned StructureFlags = ImplementsHasInstance | JSObject::StructureFlags;
+
+ 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(JSValuePtr);
+ InternalFunction* asInternalFunction(JSValue);
- inline InternalFunction* asInternalFunction(JSValuePtr value)
+ inline InternalFunction* asInternalFunction(JSValue value)
{
- ASSERT(asObject(value)->inherits(&InternalFunction::info));
+ ASSERT(asObject(value)->inherits(&InternalFunction::s_info));
return static_cast<InternalFunction*>(asObject(value));
}