Filip Pizlo, from bug 75181: "Also, it would be good if: ... - The data needed to allocate in the current block was kept in BumpSpace, or in something like a BumpAllocator class. I.e. if you want to allocate stuff (so you're either a GC thread or you're the application) then you have an instance of BumpAllocator that is easily reachable (say by offsetting into JSGlobalData, if you're the application), and then all of the fields (i.e. m_offset) needed to allocate are inside of BumpAllocator. Right now you're taking an extra load to get to the BumpBlock::m_offset. The BumpBlock::m_offset field can then be updated after you switch from one block to another. ... The point is that it will (a) simplify the inline asm code that the JIT will use for allocation and (b) speed things up a fair bit as we start relying on this allocator more." Couldn't have said it better myself. This change will also make the overall design between MarkedSpace and CopySpace more consistent.
Created attachment 127726 [details] Patch
I also moved a bunch of stuff from the headers for CopiedSpace to the cpp file to reduce code bloat/compile times.
Comment on attachment 127726 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=127726&action=review You need to add the new files to the many a varied project files that exist, otherwise we may end up with build issues in future when they miss changes to dependencies. Also add copyright to the new files. r=me with those fixes, and after adding copyright info to the new files. > Source/JavaScriptCore/heap/CopiedAllocator.h:1 > +#ifndef CopiedAllocator_h You need a copyright header here
Committed r108267: <http://trac.webkit.org/changeset/108267>