diff --git a/crates/oxc_data_structures/src/stack/sparse.rs b/crates/oxc_data_structures/src/stack/sparse.rs index 31aacff7a2a31..2befb87dfa9ee 100644 --- a/crates/oxc_data_structures/src/stack/sparse.rs +++ b/crates/oxc_data_structures/src/stack/sparse.rs @@ -37,7 +37,11 @@ use super::{NonEmptyStack, Stack}; /// [`pop`]: SparseStack::pop /// [`NonEmptyStack>`]: NonEmptyStack pub struct SparseStack { + /// Stack of `bool`s, indicating if entries have a value or not. + /// * `true` = has value. + /// * `false` = no value. has_values: NonEmptyStack, + /// The actual values for entries which have one values: Stack, } diff --git a/crates/oxc_data_structures/src/stack/standard.rs b/crates/oxc_data_structures/src/stack/standard.rs index 3449173095e50..b1dd0f402e99e 100644 --- a/crates/oxc_data_structures/src/stack/standard.rs +++ b/crates/oxc_data_structures/src/stack/standard.rs @@ -43,11 +43,11 @@ use super::{StackCapacity, StackCommon}; /// [`NonEmptyStack::new`]: super::NonEmptyStack::new /// [`std`'s slice iterators]: std::slice::Iter pub struct Stack { - // Pointer to *after* last entry on stack. + /// Pointer to *after* last entry on stack cursor: NonNull, - // Pointer to start of allocation containing stack + /// Pointer to start of allocation containing stack start: NonNull, - // Pointer to end of allocation containing stack + /// Pointer to end of allocation containing stack end: NonNull, }