Skip to content

Commit 46fcb48

Browse files
committed
Add SparseElement indexed storage variant
Introduce a new `SparseElement` variant to `IndexedProperties` that stores simple values (data descriptors with all flags true) in a hash map without full property descriptors. This optimizes memory usage for sparse arrays.
1 parent 085fbd3 commit 46fcb48

File tree

4 files changed

+188
-119
lines changed

4 files changed

+188
-119
lines changed

cli/src/debug/object.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ fn indexed_elements_type(_: &JsValue, args: &[JsValue], _: &mut Context) -> JsRe
3939
IndexProperties::DenseI32(_) => "DenseI32",
4040
IndexProperties::DenseF64(_) => "DenseF64",
4141
IndexProperties::DenseElement(_) => "DenseElement",
42-
IndexProperties::Sparse(_) => "SparseElement",
42+
IndexProperties::SparseElement(_) => "SparseElement",
43+
IndexProperties::SparseProperty(_) => "SparseProperty",
4344
};
4445
Ok(js_string!(typ).into())
4546
}

0 commit comments

Comments
 (0)