Changeset 93835 in webkit for trunk/Source/JavaScriptCore/runtime/StructureChain.h
- Timestamp:
- Aug 25, 2011, 4:30:14 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/StructureChain.h
r92706 r93835 28 28 29 29 #include "JSCell.h" 30 #include "JSObject.h" 30 31 #include "Structure.h" 31 32 … … 45 46 typedef JSCell Base; 46 47 47 static StructureChain* create(JSGlobalData& globalData, Structure* head) { return new (allocateCell<StructureChain>(globalData.heap)) StructureChain(globalData, globalData.structureChainStructure.get(), head); } 48 static StructureChain* create(JSGlobalData& globalData, Structure* head) 49 { 50 return new (allocateCell<StructureChain>(globalData.heap)) StructureChain(globalData, globalData.structureChainStructure.get(), head); 51 } 48 52 WriteBarrier<Structure>* head() { return m_vector.get(); } 49 53 void visitChildren(SlotVisitor&); … … 52 56 53 57 static ClassInfo s_info; 58 59 protected: 60 void finishCreation(JSGlobalData& globalData, Structure* head) 61 { 62 Base::finishCreation(globalData); 63 size_t size = 0; 64 for (Structure* current = head; current; current = current->storedPrototype().isNull() ? 0 : asObject(current->storedPrototype())->structure()) 65 ++size; 66 67 m_vector = adoptArrayPtr(new WriteBarrier<Structure>[size + 1]); 68 69 size_t i = 0; 70 for (Structure* current = head; current; current = current->storedPrototype().isNull() ? 0 : asObject(current->storedPrototype())->structure()) 71 m_vector[i++].set(globalData, this, current); 72 } 54 73 55 74 private:
Note:
See TracChangeset
for help on using the changeset viewer.