]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - debugger/DebuggerActivation.h
JavaScriptCore-7600.1.4.13.1.tar.gz
[apple/javascriptcore.git] / debugger / DebuggerActivation.h
index 574986a0fd662f681f3a06eb4be20e7dc0aff3a9..e90383eaaf8f617716ea00684212461fa205ff89 100644 (file)
 
 namespace JSC {
 
-    class JSActivation;
+class DebuggerActivation : public JSNonFinalObject {
+public:
+    typedef JSNonFinalObject Base;
 
-    class DebuggerActivation : public JSNonFinalObject {
-    public:
-        DebuggerActivation(JSGlobalData&, JSObject*);
+    static DebuggerActivation* create(VM& vm, JSObject* object)
+    {
+        DebuggerActivation* activation = new (NotNull, allocateCell<DebuggerActivation>(vm.heap)) DebuggerActivation(vm);
+        activation->finishCreation(vm, object);
+        return activation;
+    }
 
-        virtual void visitChildren(SlotVisitor&);
-        virtual UString className() const;
-        virtual bool getOwnPropertySlot(ExecState*, const Identifier& propertyName, PropertySlot&);
-        virtual void put(ExecState*, const Identifier& propertyName, JSValue, PutPropertySlot&);
-        virtual void putWithAttributes(ExecState*, const Identifier& propertyName, JSValue, unsigned attributes);
-        virtual bool deleteProperty(ExecState*, const Identifier& propertyName);
-        virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&, EnumerationMode mode = ExcludeDontEnumProperties);
-        virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
-        virtual void defineGetter(ExecState*, const Identifier& propertyName, JSObject* getterFunction, unsigned attributes);
-        virtual void defineSetter(ExecState*, const Identifier& propertyName, JSObject* setterFunction, unsigned attributes);
-        virtual JSValue lookupGetter(ExecState*, const Identifier& propertyName);
-        virtual JSValue lookupSetter(ExecState*, const Identifier& propertyName);
+    static void visitChildren(JSCell*, SlotVisitor&);
+    static String className(const JSObject*);
+    static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
+    static void put(JSCell*, ExecState*, PropertyName, JSValue, PutPropertySlot&);
+    static bool deleteProperty(JSCell*, ExecState*, PropertyName);
+    static void getOwnPropertyNames(JSObject*, ExecState*, PropertyNameArray&, EnumerationMode);
+    static bool defineOwnProperty(JSObject*, ExecState*, PropertyName, const PropertyDescriptor&, bool shouldThrow);
 
-        static Structure* createStructure(JSGlobalData& globalData, JSValue prototype) 
-        {
-            return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); 
-        }
+    DECLARE_EXPORT_INFO;
 
-    protected:
-        static const unsigned StructureFlags = OverridesGetOwnPropertySlot | OverridesVisitChildren | JSObject::StructureFlags;
+    static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype) 
+    {
+        return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info()); 
+    }
 
-    private:
-        WriteBarrier<JSActivation> m_activation;
-    };
+protected:
+    static const unsigned StructureFlags = OverridesGetOwnPropertySlot | OverridesVisitChildren | JSObject::StructureFlags;
+
+    JS_EXPORT_PRIVATE void finishCreation(VM&, JSObject* activation);
+
+private:
+    JS_EXPORT_PRIVATE DebuggerActivation(VM&);
+    WriteBarrier<JSActivation> m_activation;
+};
 
 } // namespace JSC