]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - runtime/InternalFunction.h
JavaScriptCore-1097.13.tar.gz
[apple/javascriptcore.git] / runtime / InternalFunction.h
index 28e260e30130ddd8c0ae796d663337298fe9cfa1..532bd0c8d4b068744c90113272eac83a761a2187 100644 (file)
 #ifndef InternalFunction_h
 #define InternalFunction_h
 
-#include "JSObjectWithGlobalObject.h"
+#include "JSObject.h"
 #include "Identifier.h"
 
 namespace JSC {
 
     class FunctionPrototype;
 
-    class InternalFunction : public JSObjectWithGlobalObject {
+    class InternalFunction : public JSNonFinalObject {
     public:
+        typedef JSNonFinalObject Base;
+
         static JS_EXPORTDATA const ClassInfo s_info;
 
-        const UString& name(ExecState*);
+        JS_EXPORT_PRIVATE const UString& name(ExecState*);
         const UString displayName(ExecState*);
         const UString calculatedDisplayName(ExecState*);
 
-        static Structure* createStructure(JSGlobalData& globalData, JSValue proto) 
+        static Structure* createStructure(JSGlobalData& globalData, JSGlobalObject* globalObject, JSValue proto) 
         { 
-            return Structure::create(globalData, proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); 
+            return Structure::create(globalData, globalObject, proto, TypeInfo(ObjectType, StructureFlags), &s_info); 
         }
 
     protected:
         static const unsigned StructureFlags = ImplementsHasInstance | JSObject::StructureFlags;
 
-        // Only used to allow us to determine the JSFunction vptr
-        InternalFunction(VPtrStealingHackType);
-
-        InternalFunction(JSGlobalData*, JSGlobalObject*, Structure*, const Identifier&);
+        JS_EXPORT_PRIVATE InternalFunction(JSGlobalObject*, Structure*);
 
-    private:
-        virtual CallType getCallData(CallData&) = 0;
+        JS_EXPORT_PRIVATE void finishCreation(JSGlobalData&, const Identifier& name);
 
-        virtual void vtableAnchor();
+        static CallType getCallData(JSCell*, CallData&);
     };
 
     InternalFunction* asInternalFunction(JSValue);