void Arguments::visitChildren(JSCell* cell, SlotVisitor& visitor) { Arguments* thisObject = jsCast<Arguments*>(cell); ASSERT_GC_OBJECT_INHERITS(thisObject, info()); JSObject::visitChildren(thisObject, visitor); if (thisObject->m_registerArray) { visitor.copyLater(thisObject, ArgumentsRegisterArrayCopyToken, thisObject->m_registerArray.get(), thisObject->registerArraySizeInBytes()); visitor.appendValues(thisObject->m_registerArray.get(), thisObject->m_numArguments); } if (thisObject->m_slowArgumentData) { visitor.copyLater(thisObject, ArgumentsSlowArgumentDataCopyToken, thisObject->m_slowArgumentData.get(), SlowArgumentData::sizeForNumArguments(thisObject->m_numArguments)); } visitor.append(&thisObject->m_callee); visitor.append(&thisObject->m_lexicalEnvironment); }
void MapData::visitChildren(JSCell* cell, SlotVisitor& visitor) { Base::visitChildren(cell, visitor); MapData* thisObject = jsCast<MapData*>(cell); Entry* entries = thisObject->m_entries; if (!entries) return; size_t size = thisObject->m_size; if (thisObject->m_deletedCount) { for (size_t i = 0; i < size; i++) { if (!entries[i].key) continue; visitor.append(&entries[i].key); visitor.append(&entries[i].value); } } else visitor.appendValues(&entries[0].key, size * (sizeof(Entry) / sizeof(WriteBarrier<Unknown>))); visitor.copyLater(thisObject, MapBackingStoreCopyToken, entries, thisObject->capacityInBytes()); }