LibJS: Make array_like_size() non-virtual in IndexedPropertyStorage
Some checks are pending
CI / Lagom (arm64, Sanitizer_CI, false, macOS, macos-15, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macOS, macOS-arm64, macos-15) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, Linux, Linux-x86_64, blacksmith-8vcpu-ubuntu-2404) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run

This commit is contained in:
Aliaksandr Kalenik 2025-06-04 17:52:06 +02:00 committed by Alexander Kalenik
commit 3b68fd0b8e
Notes: github-actions[bot] 2025-06-05 01:44:37 +00:00
2 changed files with 8 additions and 11 deletions

View file

@ -14,8 +14,7 @@ constexpr size_t const SPARSE_ARRAY_HOLE_THRESHOLD = 200;
constexpr size_t const LENGTH_SETTER_GENERIC_STORAGE_THRESHOLD = 4 * MiB;
SimpleIndexedPropertyStorage::SimpleIndexedPropertyStorage(Vector<Value>&& initial_values)
: IndexedPropertyStorage(IsSimpleStorage::Yes)
, m_array_size(initial_values.size())
: IndexedPropertyStorage(IsSimpleStorage::Yes, initial_values.size())
, m_packed_elements(move(initial_values))
{
}
@ -112,9 +111,8 @@ bool SimpleIndexedPropertyStorage::set_array_like_size(size_t new_size)
}
GenericIndexedPropertyStorage::GenericIndexedPropertyStorage(SimpleIndexedPropertyStorage&& storage)
: IndexedPropertyStorage(IsSimpleStorage::No)
: IndexedPropertyStorage(IsSimpleStorage::No, storage.array_like_size())
{
m_array_size = storage.array_like_size();
for (size_t i = 0; i < storage.m_packed_elements.size(); ++i) {
auto value = storage.m_packed_elements[i];
if (!value.is_special_empty_value())