Commit graph

5 commits

Author SHA1 Message Date
overlookmotel
defaf4bf2b feat(data_structures): add SparseStack::last_mut method (#7528)
Add `SparseStack::last_mut` method, as companion to `SparseStack::last`.
2024-11-28 16:39:34 +00:00
overlookmotel
d135d3ec48 feat(data_structures): add methods to SparseStack (#7305)
Add methods to `SparseStack` to get the filled entries as a slice, and get their length.
2024-11-16 05:36:36 +00:00
overlookmotel
147a5d50fd refactor(data_structures): remove is_empty methods for non-empty stacks (#6219)
Remove `SparseStack::is_empty` method. It's pointless as the stack is never empty.

Add a dummy `NonEmptyStack::is_empty` method that always returns `false`. This is also pointless, but it overrides `slice::is_empty` which is otherwise accessible via `Deref`.
2024-10-01 14:58:35 +00:00
overlookmotel
61805fd3f2 refactor(data_structures): add debug assertion to SparseStack (#6218)
Just add an additional debug assert.
2024-10-01 12:26:38 +00:00
Boshen
c3c3447ac3 feat(data_structures): add oxc_data_structures crate; add stack (#6206) 2024-10-01 10:02:45 +00:00
Renamed from crates/oxc_transformer/src/helpers/stack/sparse.rs (Browse further)