fx.reflection: function: update invocation to support new value-types

This commit is contained in:
2026-05-17 17:11:02 +01:00
parent f1258489d1
commit 61182e0153
4 changed files with 196 additions and 23 deletions
@@ -5,6 +5,11 @@
#include <fx/value.h>
#include <stdint.h>
#define CALLVM_INVOKE_PROTOTYPE(suffix) \
fx_value callvm_invoke_##suffix( \
struct callvm *vm, \
fx_function_impl impl)
#define MAX_FIXED_ARGS ((unsigned int)-1)
#define MAX_DOUBLE_ARGS 8
#define MAX_INT_ARGS 8
@@ -26,11 +31,13 @@ struct callvm {
uintptr_t *vm_arg_excess;
};
typedef fx_value (*callvm_invoke_impl)(struct callvm *, fx_function_impl);
extern void callvm_reset(struct callvm *vm, unsigned int max_fixed_args);
extern void callvm_push(struct callvm *vm, const fx_value *value);
extern fx_value callvm_invoke(
struct callvm *vm,
fx_function_impl impl,
fx_value_type return_type);
fx_type_id return_type);
#endif