infix
A JIT-Powered FFI Library for C
Loading...
Searching...
No Matches
infix_reverse_t Struct Reference

Internal definition of a reverse trampoline (callback/closure) handle. More...

#include <infix_internals.h>

Collaboration diagram for infix_reverse_t:
[legend]

Public Attributes

infix_arena_tarena
 
infix_executable_t exec
 
infix_protected_t protected_ctx
 
infix_typereturn_type
 
infix_type ** arg_types
 
size_t num_args
 
size_t num_fixed_args
 
bool is_variadic
 
void * user_callback_fn
 
void * user_data
 
infix_internal_dispatch_callback_fn internal_dispatcher
 
infix_forward_tcached_forward_trampoline
 

Detailed Description

Internal definition of a reverse trampoline (callback/closure) handle.

This is the concrete implementation of the opaque infix_reverse_t pointer. The entire struct is allocated in a page-aligned memory region that is made read-only after initialization to prevent memory corruption vulnerabilities. Like the forward trampoline, it is self-contained and owns deep copies of all its type metadata.

Member Data Documentation

◆ arena

infix_arena_t* infix_reverse_t::arena

Private arena for type metadata.

◆ arg_types

infix_type** infix_reverse_t::arg_types

Deep copy of the function's argument types.

◆ cached_forward_trampoline

infix_forward_t* infix_reverse_t::cached_forward_trampoline

For type-safe callbacks, a pre-generated trampoline to call the C handler.

◆ exec

infix_executable_t infix_reverse_t::exec

Executable memory for the JIT stub.

◆ internal_dispatcher

infix_internal_dispatch_callback_fn infix_reverse_t::internal_dispatcher

Pointer to the universal C dispatcher implementation.

◆ is_variadic

bool infix_reverse_t::is_variadic

true if the signature contains variadic arguments.

◆ num_args

size_t infix_reverse_t::num_args

Total number of arguments.

◆ num_fixed_args

size_t infix_reverse_t::num_fixed_args

Number of non-variadic arguments.

◆ protected_ctx

infix_protected_t infix_reverse_t::protected_ctx

The read-only memory region holding this struct.

◆ return_type

infix_type* infix_reverse_t::return_type

Deep copy of the function's return type.

◆ user_callback_fn

void* infix_reverse_t::user_callback_fn

The user-provided handler function pointer (type-safe or generic).

◆ user_data

void* infix_reverse_t::user_data

The user-provided context pointer for closures.


The documentation for this struct was generated from the following file: