• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/JavaScriptCore-7537.78.1/runtime/

Lines Matching defs:storage

55     ArrayStorage* storage = butterfly->arrayStorage();
56 storage->setLength(initialLength);
57 storage->setVectorLength(0);
58 storage->m_indexBias = 0;
59 storage->m_sparseMap.clear();
60 storage->m_numValuesInVector = 0;
249 ArrayStorage* storage = ensureArrayStorage(vm);
250 Butterfly* butterfly = storage->butterfly();
255 ASSERT(!addToFront || count > storage->m_indexBias);
264 unsigned length = storage->length();
265 unsigned usedVectorLength = min(storage->vectorLength(), length);
273 ASSERT(storage->vectorLength() <= MAX_STORAGE_VECTOR_LENGTH && (MAX_STORAGE_VECTOR_LENGTH - storage->vectorLength()) >= storage->m_indexBias);
274 unsigned currentCapacity = storage->vectorLength() + storage->m_indexBias;
283 // If the current storage array is sufficiently large (but not too large!) then just keep using it.
305 else if (length < storage->vectorLength()) {
307 postCapacity = min((storage->vectorLength() - length) >> 1, newStorageCapacity - requiredVectorLength);
309 ASSERT(newAllocBase != butterfly->base(structure()) || postCapacity < storage->vectorLength() - length);
319 memmove(newButterfly->arrayStorage()->m_vector + count, storage->m_vector, sizeof(JSValue) * usedVectorLength);
321 } else if ((newAllocBase != butterfly->base(structure())) || (newIndexBias != storage->m_indexBias)) {
323 memmove(newButterfly->arrayStorage()->m_vector, storage->m_vector, sizeof(JSValue) * usedVectorLength);
338 bool JSArray::setLengthWithArrayStorage(ExecState* exec, unsigned newLength, bool throwException, ArrayStorage* storage)
340 unsigned length = storage->length();
343 ASSERT(isLengthWritable() || storage->m_sparseMap);
345 if (SparseArrayValueMap* map = storage->m_sparseMap.get()) {
372 storage->setLength(index + 1);
388 unsigned usedVectorLength = min(length, storage->vectorLength());
390 WriteBarrier<Unknown>& valueSlot = storage->m_vector[i];
393 storage->m_numValuesInVector -= hadValue;
397 storage->setLength(newLength);
499 ArrayStorage* storage = m_butterfly->arrayStorage();
501 unsigned length = storage->length();
509 if (index < storage->vectorLength()) {
510 WriteBarrier<Unknown>& valueSlot = storage->m_vector[index];
512 --storage->m_numValuesInVector;
517 storage->setLength(index);
651 ArrayStorage* storage = m_butterfly->arrayStorage();
654 unsigned length = storage->length();
655 if (length < storage->vectorLength()) {
656 storage->m_vector[length].set(exec->vm(), this, value);
657 storage->setLength(length + 1);
658 ++storage->m_numValuesInVector;
663 if (storage->length() > MAX_ARRAY_INDEX) {
664 methodTable()->putByIndex(this, exec, storage->length(), value, true);
672 putByIndexBeyondVectorLengthWithArrayStorage(exec, storage->length(), value, true, storage);
681 bool JSArray::shiftCountWithArrayStorage(unsigned startIndex, unsigned count, ArrayStorage* storage)
683 unsigned oldLength = storage->length();
688 if (oldLength != storage->m_numValuesInVector || inSparseIndexingMode() || shouldUseSlowPut(structure()->indexingType()))
696 storage->m_numValuesInVector -= count;
697 storage->setLength(length);
699 unsigned vectorLength = storage->vectorLength();
712 storage->setVectorLength(vectorLength);
718 storage->m_vector + count,
719 storage->m_vector,
723 storage = m_butterfly->arrayStorage();
724 storage->m_indexBias += count;
727 storage->m_vector + startIndex,
728 storage->m_vector + startIndex + count,
731 storage->m_vector[i].clear();
831 bool JSArray::unshiftCountWithArrayStorage(ExecState* exec, unsigned startIndex, unsigned count, ArrayStorage* storage)
833 unsigned length = storage->length();
839 if (length != storage->m_numValuesInVector || storage->inSparseMode() || shouldUseSlowPut(structure()->indexingType()))
844 unsigned vectorLength = storage->vectorLength();
846 if (moveFront && storage->m_indexBias >= count) {
847 m_butterfly = storage->butterfly()->unshift(structure(), count);
848 storage = m_butterfly->arrayStorage();
849 storage->m_indexBias -= count;
850 storage->setVectorLength(vectorLength + count);
852 storage = storage->butterfly()->arrayStorage();
854 storage = arrayStorage();
860 WriteBarrier<Unknown>* vector = storage->m_vector;
1162 // If the toString function changed the length of the array or vector storage,
1237 ArrayStorage* storage = m_butterfly->arrayStorage();
1238 ASSERT(!storage->m_sparseMap);
1240 sortCompactedVector<ArrayWithArrayStorage>(exec, storage->vector(), lengthNotIncludingUndefined);
1506 ArrayStorage* storage = m_butterfly->arrayStorage();
1508 vector = storage->m_vector;
1509 vectorEnd = min(storage->length(), storage->vectorLength());
1569 ArrayStorage* storage = m_butterfly->arrayStorage();
1570 vector = storage->m_vector;
1571 vectorEnd = min(length, storage->vectorLength());