+ }
+
+ CopyWorklistItem(JSCell* cell, CopyToken token)
+ : m_value(bitwise_cast<uintptr_t>(cell) | static_cast<uintptr_t>(token))
+ {
+ ASSERT(!(bitwise_cast<uintptr_t>(cell) & static_cast<uintptr_t>(mask)));
+ ASSERT(static_cast<uintptr_t>(token) <= mask);
+ }
+
+ JSCell* cell() const { return bitwise_cast<JSCell*>(m_value & ~static_cast<uintptr_t>(mask)); }
+ CopyToken token() const { return static_cast<CopyToken>(m_value & mask); }
+
+private:
+ static const unsigned requiredAlignment = 8;
+ static const unsigned mask = requiredAlignment - 1;
+
+ uintptr_t m_value;
+};
+
+class CopyWorkListSegment : public DoublyLinkedListNode<CopyWorkListSegment> {
+ friend class WTF::DoublyLinkedListNode<CopyWorkListSegment>;
+public:
+ static CopyWorkListSegment* create()
+ {
+ return new (NotNull, fastMalloc(blockSize)) CopyWorkListSegment();
+ }
+
+ static void destroy(CopyWorkListSegment* segment)
+ {
+ segment->~CopyWorkListSegment();
+ fastFree(segment);