feat(allocator): add bitset utils#17042
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds utility methods to the BitSet data structure, enabling bitwise operations and bit manipulation. The changes enhance the bitset's functionality with operations commonly needed in allocator implementations.
Key changes:
- Added
unset_bitmethod to clear individual bits - Added
unionmethod to perform bitwise OR operations between bitsets - Renamed test function from
uniontoclone_inand added comprehensive tests for the new methods
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Boshen
left a comment
There was a problem hiding this comment.
This looks AI generated, please follow https://github.com/oxc-project/oxc/blob/main/CONTRIBUTING.md#ai-usage-policy
AI disclosure added! |
|
Given that there's no call sites for these methods, and is AI generated, I'm in favor of closing. |
This is not just "ai generated". I use Deepwiki and Copilot when I’m working on the OXC project. This is from another PR and was reviewed by @overlookmotel |
Thank you for the context. |
CodSpeed Performance ReportMerging #17042 will not alter performanceComparing Summary
Footnotes
|
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: zhaoting zhou <zhaotingzhou@esri.com>
5019f29 to
1140d45
Compare
### 🚀 Features - d209c21 allocator: Add cap to FixedSizeAllocatorPool and block when exhausted (#17023) (Cameron) - fb2af91 allocator: Add bitset utils (#17042) (zhaoting zhou) - c16082c tasks/compat_data: Integrate `node-compat-table` (#16831) (Boshen) - 5586823 span: Extract TS declaration file check to its own function (#17037) (camchenry) - 3d2b492 minifier: Fold iife arrow functions in call expressions (#16477) (Armano) - 67e9f9e codegen: Keep comments on the export specifiers (#16943) (夕舞八弦) - cb515fa parser: Improve error message for `yield` as identifier usage (#16950) (sapphi-red) - dcc856b parser: Add help for `new_dynamic_import` error (#16949) (sapphi-red) - c3c79f8 parser: Improve import attribute value error message (#16948) (sapphi-red) - 291b57b ast_tools: Generate TS declaration files for deserializer and walk files (#16912) (camc314) - 74eae13 minifier: Remove unused import specifiers (#16797) (camc314) ### 🐛 Bug Fixes - fb9e193 linter: OOM problems with custom plugins (#17082) (overlookmotel) - e59132b parser/napi: Fix lazy deser (#17069) (overlookmotel) - a92faf0 ast_tools: Support `u128` in `assert_layouts` generator (#17050) (overlookmotel) - 47b4c2f minifier/docs: Correct hyperlink path in OPTIMIZATIONS.md (#16986) (GRK) - 3002649 transformer/typescript: Remove unused import equals declaration (#16776) (Dunqing) - 5a2af88 regular_expression: Correct named capture group reference error (#16952) (sapphi-red) ### ⚡ Performance - b657bb6 allocator: Reduce time `Mutex` lock is held in `FixedSizeAllocatorPool::get` (#17079) (overlookmotel) - 1f3b19b ast: `#[ast]` macro use `#[repr(transparent)]` for single-field structs (#17052) (overlookmotel) - 225f229 parser: Use SmallVec for duplicate default export detection (#16801) (camc314) ### 📚 Documentation - a9c419f traverse: Update safety comments (#16944) (overlookmotel) Co-authored-by: overlookmotel <557937+overlookmotel@users.noreply.github.com>
This PR adds new utility methods
unset_bitandunionto the BitSetNote
I used Deepwiki and Copilot.
Well, plus ChatGPT to polish my comment in the code if it's a long one