Gccjit.Functiontype function_kind = | ExportedFunction is defined by the client code and visible by name outside of the JIT.
*)| InternalFunction is defined by the client code, but is invisible outside of the JIT. Analogous to a "static" function.
| ImportedFunction is not defined by the client code; we're merely referring to it. Analogous to using an "extern" function from a header file.
| Always_inlineFunction is only ever inlined into other functions, and is invisible outside of the JIT. Analogous to prefixing with "inline" and adding __attribute__((always_inline)). Inlining will only occur when the optimization level is above 0; when optimization is off, this is essentially the same as FUNCTION_Internal.
Kinds of function.
val create :
context ->
?loc:location ->
?variadic:bool ->
function_kind ->
type_ ->
string ->
param list ->
function_Create a function with the given name and parameters.
Create a reference to a builtin function (sometimes called intrinsic functions).
val dump_dot : function_ -> string -> unitEmit the function in graphviz format to the given path.
Add a new local variable within the function, of the given type and name.
val to_string : function_ -> stringGet a human-readable description of this object.