-
-
Notifications
You must be signed in to change notification settings - Fork 720
refactor(syntax): use allocator HashMap in ModuleRecord fields #14141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(syntax): use allocator HashMap in ModuleRecord fields #14141
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the ModuleRecord to use the allocator-backed HashMap instead of the standard FxHashMap, aligning with the project's memory allocation strategy.
Key changes:
- Replace FxHashMap with allocator-backed HashMap for module fields
- Update HashMap construction to use allocator-aware initialization
- Add Debug derive to the HashMap wrapper type
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| crates/oxc_syntax/src/module_record.rs | Replace FxHashMap fields with allocator-backed HashMap and update initialization |
| crates/oxc_allocator/src/hash_map.rs | Add Debug trait implementation to HashMap wrapper |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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. |
CodSpeed Instrumentation Performance ReportMerging #14141 will not alter performanceComparing Summary
Footnotes |
ade0d7f to
9045b4c
Compare
|
@camchenry weird how my local https://github.com/oxc-project/oxc/actions/runs/18029568358/job/51303075325?pr=14141 |
7ec9e28 to
510dfc7
Compare
I think it just had got out of sync: #14145 Edit: Ah no I'm wrong. I see you rebased on top of #14145, and it's still different on CI and locally (I can reproduce the same I've rebased again on latest main. Still mismatch between CI and local. |
510dfc7 to
e7812a8
Compare
|
@overlookmotel @Boshen This feels very familiar to some of the issues that I was having getting the system allocator bytes to match between CI and local. I ended up removing the number of bytes allocated by the system allocator because it rarely matched. I don't think we've used the arena allocator for If necessary, we could remove the number of arena bytes allocated as well, I think that should stabilize this task again. |
e7812a8 to
b4a5c25
Compare
Merge activity
|
b4a5c25 to
7e42b0a
Compare
|
@camchenry I asked Claude to look into the differences across platforms. Looks like cause is:
More annoyingly for our allocation-tracking, it's possible that we'll also see the allocation count be different across platforms. A larger-capacity This will be the case regardless of whether the I don't see an easy way to avoid this problem. This still doesn't explain why we see |

No description provided.