]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - runtime/InternalFunction.h
JavaScriptCore-1097.13.tar.gz
[apple/javascriptcore.git] / runtime / InternalFunction.h
index d19b82b38aae2332cf86420aa7b5a0308f309918..532bd0c8d4b068744c90113272eac83a761a2187 100644 (file)
@@ -31,35 +31,36 @@ namespace JSC {
 
     class FunctionPrototype;
 
 
     class FunctionPrototype;
 
-    class InternalFunction : public JSObject {
+    class InternalFunction : public JSNonFinalObject {
     public:
     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*);
 
         const UString displayName(ExecState*);
         const UString calculatedDisplayName(ExecState*);
 
-        static PassRefPtr<Structure> 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;
 
         }
 
     protected:
         static const unsigned StructureFlags = ImplementsHasInstance | JSObject::StructureFlags;
 
-        InternalFunction(NonNullPassRefPtr<Structure> structure) : JSObject(structure) { }
-        InternalFunction(JSGlobalData*, NonNullPassRefPtr<Structure>, 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)
     {
     };
 
     InternalFunction* asInternalFunction(JSValue);
 
     inline InternalFunction* asInternalFunction(JSValue value)
     {
-        ASSERT(asObject(value)->inherits(&InternalFunction::info));
+        ASSERT(asObject(value)->inherits(&InternalFunction::s_info));
         return static_cast<InternalFunction*>(asObject(value));
     }
 
         return static_cast<InternalFunction*>(asObject(value));
     }