feat(data_structures): add advance_to_end method to SliceIter trait#13947
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
Pull Request Overview
This PR adds an advance_to_end method to the SliceIter trait that efficiently moves the iterator to its end position. This was developed as part of an ESTree walker implementation but provides general utility for iterator manipulation.
- Adds
advance_to_endmethod to theSliceItertrait that callsadvance(self.len()) - Includes comprehensive test coverage for both mutable and immutable iterator variants
- Adds inline optimization and performance documentation with Godbolt link
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
CodSpeed Instrumentation Performance ReportMerging #13947 will not alter performanceComparing Summary
|
Merge activity
|
…it (#13947) Add `advance_to_end` method to `SliceIter` trait. This allows calling `advance_to_end` on any slice iterator. (this stack of 3 PRs is work I did as part of first attempt to build an ESTree walker, which I abandoned, but the APIs are useful for other tasks in `oxc_ast_tools`).
ffa1557 to
29af0b4
Compare
…it (#13947) Add `advance_to_end` method to `SliceIter` trait. This allows calling `advance_to_end` on any slice iterator. (this stack of 3 PRs is work I did as part of first attempt to build an ESTree walker, which I abandoned, but the APIs are useful for other tasks in `oxc_ast_tools`).
29af0b4 to
f8feed1
Compare

Add
advance_to_endmethod toSliceItertrait. This allows callingadvance_to_endon any slice iterator.(this stack of 3 PRs is work I did as part of first attempt to build an ESTree walker, which I abandoned, but the APIs are useful for other tasks in
oxc_ast_tools).