]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - runtime/InternalFunction.h
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / runtime / InternalFunction.h
index e216c2f82eb373326314f354c21f6b254bdc85b2..8b0d09f13f6879130f127c4a03f597e9baa332fe 100644 (file)
 
 namespace JSC {
 
-    class FunctionPrototype;
+class FunctionPrototype;
 
-    class InternalFunction : public JSDestructibleObject {
-    public:
-        typedef JSDestructibleObject Base;
+class InternalFunction : public JSDestructibleObject {
+public:
+    typedef JSDestructibleObject Base;
+    static const unsigned StructureFlags = Base::StructureFlags | ImplementsHasInstance | TypeOfShouldCallGetCallData;
 
-        DECLARE_EXPORT_INFO;
+    DECLARE_EXPORT_INFO;
 
-        JS_EXPORT_PRIVATE const String& name(ExecState*);
-        const String displayName(ExecState*);
-        const String calculatedDisplayName(ExecState*);
+    JS_EXPORT_PRIVATE const String& name(ExecState*);
+    const String displayName(ExecState*);
+    const String calculatedDisplayName(ExecState*);
 
-        static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue proto) 
-        { 
-            return Structure::create(vm, globalObject, proto, TypeInfo(ObjectType, StructureFlags), info()); 
-        }
-
-    protected:
-        static const unsigned StructureFlags = ImplementsHasInstance | JSObject::StructureFlags;
+    static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue proto) 
+    { 
+        return Structure::create(vm, globalObject, proto, TypeInfo(ObjectType, StructureFlags), info()); 
+    }
 
-        JS_EXPORT_PRIVATE InternalFunction(VM&, Structure*);
+protected:
+    JS_EXPORT_PRIVATE InternalFunction(VM&, Structure*);
 
-        JS_EXPORT_PRIVATE void finishCreation(VM&, const String& name);
+    JS_EXPORT_PRIVATE void finishCreation(VM&, const String& name);
 
-        static CallType getCallData(JSCell*, CallData&);
-    };
+    static CallType getCallData(JSCell*, CallData&);
+};
 
-    InternalFunction* asInternalFunction(JSValue);
+InternalFunction* asInternalFunction(JSValue);
 
-    inline InternalFunction* asInternalFunction(JSValue value)
-    {
-        ASSERT(asObject(value)->inherits(InternalFunction::info()));
-        return static_cast<InternalFunction*>(asObject(value));
-    }
+inline InternalFunction* asInternalFunction(JSValue value)
+{
+    ASSERT(asObject(value)->inherits(InternalFunction::info()));
+    return static_cast<InternalFunction*>(asObject(value));
+}
 
 } // namespace JSC