Skip to content

Improve handling for various intrinsics #383

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

Merged
merged 7 commits into from
May 14, 2025
Merged

Improve handling for various intrinsics #383

merged 7 commits into from
May 14, 2025

Conversation

cirras
Copy link
Collaborator

@cirras cirras commented May 9, 2025

This PR does a few things.

Improves the way we handle intrinsic routines by:

  • deferring their injection into System until the end of the interface section
  • resolving references to public System types in their parameter lists and return types

Adds support for:

  • AtomicCmpExchange128
  • GetTypeKind
  • OpenString type

Improves signatures of:

  • IsManagedType
  • VarArgStart
  • VarArgGetValue
  • VarArgCopy
  • VarArgEnd

@cirras cirras requested a review from fourls May 9, 2025 05:42
@cirras cirras changed the title Improve various intrinsic signatures Improve handling for various intrinsics May 11, 2025
Copy link
Collaborator

@fourls fourls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code change looks good. I have a few nitpicks :)

@cirras cirras force-pushed the intrinsics_round_47 branch from 5d90f7e to 541e3e5 Compare May 14, 2025 02:09
@cirras cirras requested a review from fourls May 14, 2025 02:10
Previously it only accepted type references.
@cirras cirras force-pushed the intrinsics_round_47 branch from 541e3e5 to ef92971 Compare May 14, 2025 04:15
cirras added 6 commits May 14, 2025 14:58
Some intrinsic routines reference types that are declared in the
`interface` section of `System`, meaning they shouldn't be injected
until the `implementation` section is reached.

However, intrinsic types and constants are referenced within the
`interface` section and should be injected at the beginning.
Now that we defer the injection of intrinsic routines into `System`, we
can resolve public `System` types for intrinsic parameter types and
return types.
@cirras cirras requested a review from fourls May 14, 2025 05:42
@cirras cirras force-pushed the intrinsics_round_47 branch from ef92971 to c19b721 Compare May 14, 2025 05:42
Copy link
Collaborator

@fourls fourls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@fourls fourls merged commit 3c13a45 into master May 14, 2025
4 checks passed
@fourls fourls deleted the intrinsics_round_47 branch May 14, 2025 05:49
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.

2 participants