/*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
namespace JSC {
-const ClassInfo PropertyTable::s_info = { "PropertyTable", 0, 0, 0, CREATE_METHOD_TABLE(PropertyTable) };
+const ClassInfo PropertyTable::s_info = { "PropertyTable", 0, 0, CREATE_METHOD_TABLE(PropertyTable) };
PropertyTable* PropertyTable::create(VM& vm, unsigned initialCapacity)
{
memcpy(m_index, other.m_index, dataSize());
iterator end = this->end();
- for (iterator iter = begin(); iter != end; ++iter) {
+ for (iterator iter = begin(); iter != end; ++iter)
iter->key->ref();
- vm.heap.writeBarrier(this, iter->specificValue.get());
- }
// Copy the m_deletedOffsets vector.
Vector<PropertyOffset>* otherDeletedOffsets = other.m_deletedOffsets.get();
if (otherDeletedOffsets)
- m_deletedOffsets = adoptPtr(new Vector<PropertyOffset>(*otherDeletedOffsets));
+ m_deletedOffsets = std::make_unique<Vector<PropertyOffset>>(*otherDeletedOffsets);
}
PropertyTable::PropertyTable(VM& vm, unsigned initialCapacity, const PropertyTable& other)
ASSERT(canInsert());
reinsert(*iter);
iter->key->ref();
- vm.heap.writeBarrier(this, iter->specificValue.get());
}
// Copy the m_deletedOffsets vector.
Vector<PropertyOffset>* otherDeletedOffsets = other.m_deletedOffsets.get();
if (otherDeletedOffsets)
- m_deletedOffsets = adoptPtr(new Vector<PropertyOffset>(*otherDeletedOffsets));
+ m_deletedOffsets = std::make_unique<Vector<PropertyOffset>>(*otherDeletedOffsets);
}
void PropertyTable::destroy(JSCell* cell)
fastFree(m_index);
}
-void PropertyTable::visitChildren(JSCell* cell, SlotVisitor& visitor)
-{
- PropertyTable* thisObject = jsCast<PropertyTable*>(cell);
- ASSERT_GC_OBJECT_INHERITS(thisObject, info());
- ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren());
-
- JSCell::visitChildren(thisObject, visitor);
+} // namespace JSC
- PropertyTable::iterator end = thisObject->end();
- for (PropertyTable::iterator ptr = thisObject->begin(); ptr != end; ++ptr)
- visitor.append(&ptr->specificValue);
-}
-
-}