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

Support function pointers as callees #488

Open
jberthold opened this issue Mar 13, 2025 · 0 comments
Open

Support function pointers as callees #488

jberthold opened this issue Mar 13, 2025 · 0 comments

Comments

@jberthold
Copy link
Member

Function pointers are used by some stdlib functions (example: max calls max_by with a function pointer of FnOnce type) and executed using the call_once function. Examples of such function pointers show that the called function is present in the items but not necessarily in the functions array in the Stable MIR JSON.

  • The callee name needs to be present in the functions array (a change in stable-mir-json is required)
  • The Call terminator needs to support determining the func from an argument (currently it only supports operandConstant)
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

No branches or pull requests

1 participant