Previous: Writing Functions, Up: C Interfacing [Index]
The function calling interface as described by struct x1f4_function_type
is not plain. A would be caller needs to observe the flags describing the
calling convention and they are not few.
See struct x1f4_function_type.
See Function Flags.
See Operator And Function Flags.
The simplest functions to call require only the (function specific) execution context, the address where to store the evaluation result and the input vector.
See Per Function Execution Context.
The function arguments need to match their types and reference class exactly.
Variadic functions and functions allowing typeless parameters will need to know the types of their unspecified parameters. A (parameter type) qualified function definition needs to linked into the function extended execution context by the caller.
See Extended Execution Context.
Some functions will expect the procedural execution context linked into the same extended execution context. The former is linked, the latter just needs to reach the functions reading it.
Some functions (other than variadic and typeless arguments ones) will expect their function definition linked into the same extended context. Callers will need to link the first and forward the second.
Some functions accessing the extended execution context are marked by the
X1f4_E4_USED_LINK
flag, some are not.
The extended execution context is an object, not a value. Function callers passing it forward will get a hold on it. If they are called functions themselves, they will reuse the extended execution context that was made available to them.
Callers of functions observing the step by step function execution protocol will observe the protocol themselves (for procedural programs step by step execution).
Previous: Writing Functions, Up: C Interfacing [Index]