Skip to content

Metal: extend address-space inference to integer pointer arguments#819

Merged
maleadt merged 2 commits into
mainfrom
tb/as_inttoptr
Jun 2, 2026
Merged

Metal: extend address-space inference to integer pointer arguments#819
maleadt merged 2 commits into
mainfrom
tb/as_inttoptr

Conversation

@maleadt
Copy link
Copy Markdown
Member

@maleadt maleadt commented Jun 2, 2026

Makes #816 work on Julia 1.11.

maleadt and others added 2 commits June 2, 2026 11:55
With typed pointers a Ptr argument crosses a call boundary as an integer
(ptrtoint/inttoptr) rather than a generic pointer, so the narrowing pass
skipped it; handle that shape too so the deduced exception-name string loads
from the constant space on Julia <= 1.11 as it already does on 1.12.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Cover the typed-pointer shape (a Ptr argument crossing as an integer via
ptrtoint/inttoptr): assert the parameter narrows to the constant space and
callers pass the bare global, plus a negative case where the integer has a
non-pointer use and must be left alone.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@maleadt maleadt merged commit 8ec5103 into main Jun 2, 2026
36 of 37 checks passed
@maleadt maleadt deleted the tb/as_inttoptr branch June 2, 2026 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant