Skip to content
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

Implement handling of function pointers #129

Open
wants to merge 1 commit into
base: wip/ara/name-mangling
Choose a base branch
from

Conversation

iamrecursion
Copy link
Collaborator

Summary

Function pointers are now handled according to the memory model documentation, ensuring that we can generate code that will allow us to call through opaque function pointers correctly.

Note that this commit only encompasses the compiler-side part of this work, with more work to be done in the linker to handle generation of the meta-dispatch functions for each function type.

Closes #100

Details

Check that it seems sane please!

Checklist

  • Code is formatted by Rustfmt or scarb fmt.
  • Documentation has been updated if necessary.

@iamrecursion iamrecursion added the enhancement New feature or request label Jan 15, 2025
@iamrecursion iamrecursion self-assigned this Jan 15, 2025
@iamrecursion iamrecursion linked an issue Jan 15, 2025 that may be closed by this pull request
3 tasks
@iamrecursion iamrecursion force-pushed the wip/ara/function-pointer-impl branch 4 times, most recently from 6f0716d to 3114d7b Compare January 15, 2025 18:36
@iamrecursion iamrecursion marked this pull request as ready for review January 15, 2025 18:40
@iamrecursion iamrecursion requested a review from a team as a code owner January 15, 2025 18:40
Function pointers are now handled according to the memory model
documentation, ensuring that we can generate code that will allow us to
call through opaque function pointers correctly.

Note that this commit only encompasses the compiler-side part of this
work, with more work to be done in the linker to handle generation of
the meta-dispatch functions for each function type.

It also makes some minor changes to the mangler to allow it to handle
reserved names in a more sensible way.

Closes #100
@iamrecursion iamrecursion force-pushed the wip/ara/function-pointer-impl branch from 3114d7b to bd7a5b4 Compare January 15, 2025 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[TASK] Handle calling through function pointers
1 participant