refactor(linter/plugins, napi/parser): document pointer arithmetic#21872
Merged
graphite-app[bot] merged 1 commit intomainfrom Apr 30, 2026
Conversation
This was referenced Apr 27, 2026
Merged
Member
Author
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. |
This was referenced Apr 27, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors raw-transfer alignment calculations in the NAPI parser and oxlint JS plugin integration to avoid as usize pointer casts by using pointer .addr() APIs.
Changes:
- Update
get_buffer_offsetimplementations to use.addr()instead of casting pointers to integers. - Update external linter buffer alignment logic to use
.addr()for rounding down toBLOCK_ALIGN.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
napi/parser/src/raw_transfer.rs |
Refactors get_buffer_offset pointer arithmetic to use .addr(). |
apps/oxlint/src/js_plugins/parse.rs |
Refactors get_buffer_offset pointer arithmetic to use .addr(). |
apps/oxlint/src/js_plugins/external_linter.rs |
Refactors buffer start computation to use .addr() instead of as usize. |
ff6e93f to
ac3e6e6
Compare
5241b65 to
b9878ee
Compare
ac3e6e6 to
7bc3af5
Compare
b9878ee to
214d596
Compare
214d596 to
b9891f8
Compare
7bc3af5 to
19eacf6
Compare
Contributor
Merge activity
|
…21872) Refactor. Document some quite unintuitive pointer arithmetic, and avoid casting pointers to integers with `as usize`.
19eacf6 to
0ffbe0d
Compare
b9891f8 to
aedc1b8
Compare
Base automatically changed from
om/04-27-feat_allocator_remove_allocator_end_ptr_method
to
main
April 30, 2026 01:34
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Refactor. Document some quite unintuitive pointer arithmetic, and avoid casting pointers to integers with
as usize.