diff options
Diffstat (limited to 'Source/JavaScriptCore/runtime/StructureChain.h')
-rw-r--r-- | Source/JavaScriptCore/runtime/StructureChain.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/Source/JavaScriptCore/runtime/StructureChain.h b/Source/JavaScriptCore/runtime/StructureChain.h index 88592dc..b984be6 100644 --- a/Source/JavaScriptCore/runtime/StructureChain.h +++ b/Source/JavaScriptCore/runtime/StructureChain.h @@ -27,6 +27,7 @@ #define StructureChain_h #include "JSCell.h" +#include "Structure.h" #include <wtf/OwnArrayPtr.h> #include <wtf/PassRefPtr.h> @@ -41,14 +42,17 @@ namespace JSC { friend class JIT; public: - static StructureChain* create(JSGlobalData& globalData, Structure* head) { return new (&globalData) StructureChain(globalData.structureChainStructure, head); } - RefPtr<Structure>* head() { return m_vector.get(); } + static StructureChain* create(JSGlobalData& globalData, Structure* head) { return new (&globalData) StructureChain(globalData, globalData.structureChainStructure.get(), head); } + WriteBarrier<Structure>* head() { return m_vector.get(); } + void markChildren(MarkStack&); - static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype) { return Structure::create(globalData, prototype, TypeInfo(CompoundType, OverridesMarkChildren), 0, 0); } - private: - StructureChain(NonNullPassRefPtr<Structure>, Structure* head); + static Structure* createStructure(JSGlobalData& globalData, JSValue prototype) { return Structure::create(globalData, prototype, TypeInfo(CompoundType, OverridesMarkChildren), 0, &s_info); } - OwnArrayPtr<RefPtr<Structure> > m_vector; + private: + StructureChain(JSGlobalData&, Structure*, Structure* head); + ~StructureChain(); + OwnArrayPtr<WriteBarrier<Structure> > m_vector; + static ClassInfo s_info; }; } // namespace JSC |