Skip to content

Support function pointers as callees #488

@jberthold

Description

@jberthold

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)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions