ArrayStorageInlines.h [plain text]
#pragma once
#include "ArrayStorage.h"
#include "StructureInlines.h"
namespace JSC {
inline unsigned ArrayStorage::availableVectorLength(unsigned indexBias, Structure* structure, unsigned vectorLength)
{
return availableVectorLength(indexBias, structure->outOfLineCapacity(), vectorLength);
}
inline unsigned ArrayStorage::availableVectorLength(size_t propertyCapacity, unsigned vectorLength)
{
return availableVectorLength(m_indexBias, propertyCapacity, vectorLength);
}
inline unsigned ArrayStorage::availableVectorLength(Structure* structure, unsigned vectorLength)
{
return availableVectorLength(structure->outOfLineCapacity(), vectorLength);
}
inline unsigned ArrayStorage::optimalVectorLength(unsigned indexBias, size_t propertyCapacity, unsigned vectorLength)
{
vectorLength = std::max(BASE_ARRAY_STORAGE_VECTOR_LEN, vectorLength);
return availableVectorLength(indexBias, propertyCapacity, vectorLength);
}
inline unsigned ArrayStorage::optimalVectorLength(unsigned indexBias, Structure* structure, unsigned vectorLength)
{
return optimalVectorLength(indexBias, structure->outOfLineCapacity(), vectorLength);
}
inline unsigned ArrayStorage::optimalVectorLength(size_t propertyCapacity, unsigned vectorLength)
{
return optimalVectorLength(m_indexBias, propertyCapacity, vectorLength);
}
inline unsigned ArrayStorage::optimalVectorLength(Structure* structure, unsigned vectorLength)
{
return optimalVectorLength(structure->outOfLineCapacity(), vectorLength);
}
inline size_t ArrayStorage::totalSize(Structure* structure) const
{
return totalSize(structure->outOfLineCapacity());
}
}