Func represents a function in the JIT context. It is either created inside the context or imported.
See documentation of LeanGccJit.Core.Func,
or the C API reference.
Create a gcc_jit_function with the given name and parameters.
LeanGccJit.Core.FunctionKind specifies the kind of function created.
Get the Func for the built-in function with the given name. For example:
let bMemcpy ← ctx.getBuiltinFunction "__builtin_memcpy"
Upcasting from Func to Object.
Get the Param of the given index (0-based).
Emit the Func in graphviz format to the given path.
Get the address of a function as an RValue, of function pointer type.
Note #
You can generate calls that use a function pointer via LeanGccJit.Core.Context.newCallThroughPtr,
which requires a LeanGccJit.Core.RValue containing the address of the function.
Func.getAddress is one way to obtain such a LeanGccJit.Core.RValue.
Get the return type of the Func.
Get the number of parameters of the Func.