Changeset 86974 in webkit
- Timestamp:
- May 20, 2011 12:06:29 PM (13 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r86972 r86974 1 2011-05-20 Zoltan Herczeg <zherczeg@inf.u-szeged.hu> 2 3 Reviewed by Oliver Hunt. 4 5 Zombies should "live" forever 6 https://bugs.webkit.org/show_bug.cgi?id=61170 7 8 Reusing zombie cells could still hide garbage 9 collected cell related bugs. 10 11 * JavaScriptCore.pro: 12 * heap/MarkedBlock.cpp: 13 (JSC::MarkedBlock::clearMarks): 14 * heap/MarkedBlock.h: 15 * heap/MarkedSpace.cpp: 16 (JSC::MarkedSpace::destroy): 17 * runtime/JSCell.h: 18 (JSC::JSCell::JSValue::isZombie): 19 * runtime/JSZombie.h: 20 (JSC::JSZombie::~JSZombie): 21 * runtime/WriteBarrier.h: 22 (JSC::WriteBarrierBase::setWithoutWriteBarrier): 23 1 24 2011-05-20 Brady Eidson <beidson@apple.com> 2 25 -
trunk/Source/JavaScriptCore/JavaScriptCore.pro
r85855 r86974 63 63 assembler/ARMv7Assembler.cpp \ 64 64 assembler/MacroAssemblerARM.cpp \ 65 assembler/MacroAssemblerSH4.h \66 65 assembler/MacroAssemblerSH4.cpp \ 67 assembler/SH4Assembler.h \68 66 bytecode/CodeBlock.cpp \ 69 67 bytecode/JumpTable.cpp \ … … 168 166 runtime/JSVariableObject.cpp \ 169 167 runtime/JSWrapperObject.cpp \ 168 runtime/JSZombie.cpp \ 170 169 runtime/LiteralParser.cpp \ 171 170 runtime/Lookup.cpp \ -
trunk/Source/JavaScriptCore/heap/MarkedBlock.cpp
r86499 r86974 87 87 } 88 88 89 #if ENABLE(JSC_ZOMBIES) 90 void MarkedBlock::clearMarks() 91 { 92 /* Keep our precious zombies! */ 93 for (size_t i = firstAtom(); i < m_endAtom; i += m_atomsPerCell) { 94 if (m_marks.get(i)) 95 continue; 96 97 JSCell* cell = reinterpret_cast<JSCell*>(&atoms()[i]); 98 if (!cell->isZombie()) 99 m_marks.clear(i); 100 } 101 } 102 #endif 103 89 104 } // namespace JSC -
trunk/Source/JavaScriptCore/heap/MarkedBlock.h
r85533 r86974 155 155 } 156 156 157 #if !ENABLE(JSC_ZOMBIES) 157 158 inline void MarkedBlock::clearMarks() 158 159 { 159 160 m_marks.clearAll(); 160 161 } 162 #endif 161 163 162 164 inline size_t MarkedBlock::markCount() -
trunk/Source/JavaScriptCore/heap/MarkedSpace.cpp
r86499 r86974 47 47 void MarkedSpace::destroy() 48 48 { 49 /* Keep our precious zombies! */ 50 #if !ENABLE(JSC_ZOMBIES) 49 51 clearMarks(); 50 52 shrink(); 51 53 ASSERT(!size()); 54 #endif 52 55 } 53 56 -
trunk/Source/JavaScriptCore/runtime/JSCell.h
r86499 r86974 356 356 return MarkedSpace::heap(c); 357 357 } 358 358 359 359 #if ENABLE(JSC_ZOMBIES) 360 360 inline bool JSValue::isZombie() const 361 361 { 362 return isCell() && asCell() > (JSCell*)0x1ffffffffL && asCell()->isZombie();362 return isCell() && asCell()->isZombie(); 363 363 } 364 364 #endif -
trunk/Source/JavaScriptCore/runtime/JSZombie.h
r84556 r86974 42 42 } 43 43 44 ~JSZombie() 45 { 46 /* Zombie cells should never been reused. */ 47 ASSERT_NOT_REACHED(); 48 } 49 44 50 virtual bool isZombie() const { return true; } 45 51 -
trunk/Source/JavaScriptCore/runtime/WriteBarrier.h
r86499 r86974 130 130 this->m_cell = reinterpret_cast<JSCell*>(value); 131 131 #if ENABLE(JSC_ZOMBIES) 132 ASSERT(!m_cell || !isZombie(m_cell));132 ASSERT(!m_cell || value == reinterpret_cast<T*>(1) || !isZombie(m_cell)); 133 133 #endif 134 134 }
Note: See TracChangeset
for help on using the changeset viewer.