oxc-project / oxc-project/backlog
Introduce stack which recycles the entries
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 7
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Semantic includes a stack structure UnresolvedReferencesStack which stores a bunch of hash maps and recycles them as go up and down the stack.
Generalize this to a NonEmptyRecycleStack structure, which we can also use in many places in transformer.
Additionally, optimize it by using pointers instead of len + capacity, the same way Stack and NonEmptyStack do:
pub struct NonEmptyRecycleStack<T: Default> {
/// Pointer to current entry on stack.
/// Points *to* current entry, not *after* current entry.
cursor: NonNull<T>,
/// Pointer to start of allocation (first entry)
start: NonNull<T>,
/// Pointer to after last filled slot
end_filled: NonNull<T>,
/// Pointer to end of allocation
end: NonNull<T>,
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading crates/oxc_semantic/src/unresolved_stack.rs and the existing Stack and NonEmptyStack implementations referenced in the issue. Then inspect the transformer entry points where a reusable recycling stack could apply. Done means a generalized NonEmptyRecycleStack exists with the pointer-based layout described and can replace the semantic-specific stack pattern.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100