While working on GC issues recently I found it useful to implement zombies in JSC. With a few assertions added it nailed the gc bugs i was hunting fairly quickly so i figure in the interests of saving people time in future it should get placed in trunk.
Created attachment 44209 [details] Patch
style-queue ran check-webkit-style on attachment 44209 [details] without any errors.
Comment on attachment 44209 [details] Patch > -#define COLLECT_ON_EVERY_ALLOCATION 0 > +#define COLLECT_ON_EVERY_ALLOCATION 1 Yeah, I don't think you mean that. I'm only guessing. > - imp->~JSCell(); > +#if ENABLE(JSC_ZOMBIES) > + if (!imp->isZombie()) { > + const ClassInfo* info = imp->classInfo(); > +#endif > + imp->~JSCell(); > +#if ENABLE(JSC_ZOMBIES) > + new (imp) JSZombie(info, JSZombie::leakedZombieStructure()); > + heap.numZombies++; > + } > +#endif Personally I think this might be a little nicer as: #if ENABLE(JSC_ZOMBIES) if (!imp->isZombie()) { const ClassInfo* info = imp->classInfo(); imp->~JSCell(); new (imp) JSZombie(info, JSZombie::leakedZombieStructure()); heap.numZombies++; } #else imp->~JSCell(); #endif BRRrrrraaaiiiiiinnnnzzzzzzzzzzzzzzzzzzzzz+
Committed r51624
MMmoorrre BRRrrrraaaiiiiiinnnnzzzzzzzzzzzzzzzzzzzzz.
LOL