Skip to content

Conversation

vtjnash
Copy link
Member

@vtjnash vtjnash commented Oct 1, 2025

Previously, add_ptr and sub_ptr intrinsics were incorrectly inferred as potentially throwing because they fell through to the general primitive type check, which was incorrect after #53687 changed them. This adds explicit handling in intrinsic_exct to return Union{} (nothrow) when given correct argument types (Ptr and UInt), similar to #57398.

Fixes #57557

Written by Claude

Previously, add_ptr and sub_ptr intrinsics were incorrectly inferred as
potentially throwing because they fell through to the general primitive
type check, which was incorrect after #53687 changed them. This adds
explicit handling in intrinsic_exct to return Union{} (nothrow) when
given correct argument types (Ptr and UInt), similar to #57398.

Fixes #57557
@vtjnash vtjnash requested a review from aviatesk October 1, 2025 13:48
@vtjnash vtjnash added the backport 1.12 Change should be backported to release-1.12 label Oct 1, 2025
@aviatesk aviatesk merged commit c841b5f into master Oct 2, 2025
10 checks passed
@aviatesk aviatesk deleted the jn/57557 branch October 2, 2025 07:27
@aviatesk aviatesk mentioned this pull request Oct 2, 2025
31 tasks
@aviatesk aviatesk removed the backport 1.12 Change should be backported to release-1.12 label Oct 2, 2025
aviatesk pushed a commit that referenced this pull request Oct 2, 2025
Previously, add_ptr and sub_ptr intrinsics were incorrectly inferred as
potentially throwing because they fell through to the general primitive
type check, which was incorrect after #53687 changed them. This adds
explicit handling in intrinsic_exct to return Union{} (nothrow) when
given correct argument types (Ptr and UInt), similar to #57398.

Fixes #57557

Written by Claude
@oscardssmith oscardssmith added performance Must go faster compiler:effects effect analysis labels Oct 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:effects effect analysis performance Must go faster
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add_ptr has bad :nothrow effects
3 participants