infix
A JIT-Powered FFI Library for C
Loading...
Searching...
No Matches
infix.h
Go to the documentation of this file.
1#pragma once
2/*
3G -----4~------------4~------------------
4D ---67-67---------67-67-------4~4-------
5A 4-------4~----4-------4~--4/5~--5~54---
6E ---------------------------------------
7
8 * This source code is dual-licensed under the Artistic License 2.0 or the MIT License.
9 * You may choose to use this code under the terms of either license.
10 *
11 * SPDX-License-Identifier: (Artistic-2.0 OR MIT)
12 *
13 * The documentation blocks within this file are licensed under the
14 * Creative Commons Attribution 4.0 International License (CC BY 4.0).
15 *
16 * SPDX-License-Identifier: CC-BY-4.0
17 */
18
66#define INFIX_MAJOR 0
67#define INFIX_MINOR 1
68#define INFIX_PATCH 0
71// Define the POSIX source macro to ensure function declarations for shm_open,
72// ftruncate, etc., are visible on all POSIX-compliant systems.
73// This must be defined before any system headers are included.
74#ifndef _DEFAULT_SOURCE
75#define _DEFAULT_SOURCE
76#endif
77
78// Define the POSIX source macro to ensure function declarations for posix_memalign
79// are visible. This must be defined before any system headers are included.
80#if !defined(_POSIX_C_SOURCE)
81#define _POSIX_C_SOURCE 200809L
82#endif
83
84#include <stdbool.h>
85#include <stddef.h>
86#include <stdint.h>
87
92typedef struct infix_type_t infix_type;
109
127
149
152
212
220 const char * name;
222 size_t offset;
223};
224
233
// End of type_system group
235
236#include "common/compat_c23.h"
237
249#ifndef infix_malloc
250#define infix_malloc malloc
251#endif
252
259#ifndef infix_calloc
260#define infix_calloc calloc
261#endif
262
269#ifndef infix_realloc
270#define infix_realloc realloc
271#endif
272
279#ifndef infix_free
280#define infix_free free
281#endif
282
289#ifndef infix_memcpy
290#define infix_memcpy memcpy
291#endif
292
299#ifndef infix_memset
300#define infix_memset memset
301#endif
315typedef void (*infix_unbound_cif_func)(void *, void *, void **);
316
335typedef void (*infix_cif_func)(void *, void **);
336
346typedef void (*infix_closure_handler_fn)(infix_context_t * context, void * return_value, void ** args);
347
360
376
382
395
416
430
453
470
488 const char *, infix_arena_t **, infix_type **, infix_function_argument **, size_t *, size_t *, infix_registry_t *);
489
503
520
526
534
549infix_status infix_read_global(infix_library_t *, const char *, const char *, void *);
550
560infix_status infix_write_global(infix_library_t *, const char *, const char *, void *);
561
579infix_forward_create_manual(infix_forward_t **, infix_type *, infix_type **, size_t, size_t, void *);
580
593
607
620 infix_reverse_t **, infix_type *, infix_type **, size_t, size_t, infix_closure_handler_fn, void *);
621
622
628
634
647
654
663
670
680
693
703
713
722
733 infix_type **,
734 const char *,
736
745
755
764
776
782
790c23_nodiscard void * infix_arena_alloc(infix_arena_t *, size_t, size_t);
791
800c23_nodiscard void * infix_arena_calloc(infix_arena_t *, size_t, size_t, size_t);
801
819
851
870 size_t,
871 const char *,
872 const infix_type *,
874 size_t,
875 size_t,
877
890
898
905
912
919
926
933
942
949
956
963
983
990
997
1004
1013
1020c23_nodiscard const char * infix_type_get_arg_name(const infix_type *, size_t);
1021
1046
1087
1100
1124
void * args[]
Definition 202_in_structs.c:75
Provides compatibility shims for C23 features in a C17/C11 project.
#define c23_nodiscard
Definition compat_c23.h:93
infix_error_code_t
Specific error codes providing detailed information about a failure.
Definition infix.h:1055
infix_error_details_t infix_get_last_error(void)
Retrieves detailed information about the last error that occurred on the current thread.
Definition error.c:87
infix_error_category_t
Broad categories for errors that can occur in the library.
Definition infix.h:1039
@ INFIX_CODE_PROTECTION_FAILURE
Failed to change memory protection flags. Check system_error_code.
Definition infix.h:1063
@ INFIX_CODE_SUCCESS
The operation completed successfully.
Definition infix.h:1057
@ INFIX_CODE_LIBRARY_NOT_FOUND
The requested lib could not be found or loaded. Check the message field.
Definition infix.h:1082
@ INFIX_CODE_INVALID_MEMBER_TYPE
An aggregate contained an illegal member type (e.g., {int, void})
Definition infix.h:1079
@ INFIX_CODE_UNRESOLVED_NAMED_TYPE
The type graph that contains an unresolved named reference.
Definition infix.h:1078
@ INFIX_CODE_INTEGER_OVERFLOW
Definition infix.h:1070
@ INFIX_CODE_TYPE_TOO_LARGE
A type was too large to be handled by the ABI.
Definition infix.h:1077
@ INFIX_CODE_UNEXPECTED_TOKEN
Parser ran into an invalid character at a given position.
Definition infix.h:1066
@ INFIX_CODE_MISSING_RETURN_TYPE
A function signature was missing the -> or a return type.
Definition infix.h:1069
@ INFIX_CODE_EMPTY_MEMBER_NAME
A named type was declared with empty angle brackets, such as struct<>.
Definition infix.h:1073
@ INFIX_CODE_EXECUTABLE_MEMORY_FAILURE
Failed to allocate memory for JIT compiler. Check system_error_code.
Definition infix.h:1062
@ INFIX_CODE_UNKNOWN
An unknown or unspecified error occurred. This is a fallback code.
Definition infix.h:1058
@ INFIX_CODE_SYMBOL_NOT_FOUND
The requested symbol could not be found within the lib.
Definition infix.h:1083
@ INFIX_CODE_RECURSION_DEPTH_EXCEEDED
The parser exceeded the max nesting depth (e.g., {{{{...}}}}).
Definition infix.h:1072
@ INFIX_CODE_UNSUPPORTED_ABI
infix doesn't (yet?) have an implementation for the requested ABI.
Definition infix.h:1076
@ INFIX_CODE_UNTERMINATED_AGGREGATE
A {...}, <...>, or [...] was not properly closed.
Definition infix.h:1067
@ INFIX_CODE_LIBRARY_LOAD_FAILED
Definition infix.h:1084
@ INFIX_CODE_INVALID_KEYWORD
Parser found an unknown keyword (e.g., "integer" instead of "int").
Definition infix.h:1068
@ INFIX_CODE_OUT_OF_MEMORY
Failure to allocate memory. Likely due to lack of system resources.
Definition infix.h:1061
@ INFIX_CATEGORY_ABI
An error related to ABI classification or JIT generation.
Definition infix.h:1044
@ INFIX_CATEGORY_ALLOCATION
An error related to memory allocation.
Definition infix.h:1042
@ INFIX_CATEGORY_GENERAL
A general or miscellaneous error.
Definition infix.h:1041
@ INFIX_CATEGORY_PARSER
An error that occurred while parsing a signature string.
Definition infix.h:1043
@ INFIX_CATEGORY_NONE
No error.
Definition infix.h:1040
infix_status infix_write_global(infix_library_t *, const char *, const char *, void *)
Writes a value to a global variable in a loaded library.
Definition loader.c:213
infix_status infix_read_global(infix_library_t *, const char *, const char *, void *)
Reads the value of a global variable from a loaded library.
Definition loader.c:170
c23_nodiscard infix_status infix_reverse_create_callback(infix_reverse_t **, const char *, void *, infix_registry_t *)
Generates a type-safe reverse-call trampoline (callback) from a signature string.
Definition trampoline.c:696
c23_nodiscard infix_status infix_type_from_signature(infix_type **, infix_arena_t **, const char *, infix_registry_t *)
Parses a signature string representing a single data type.
Definition signature.c:1090
c23_nodiscard infix_status infix_forward_create_unbound(infix_forward_t **, const char *, infix_registry_t *)
Generates an unbound forward-call trampoline from a signature string.
Definition trampoline.c:687
c23_nodiscard infix_status infix_forward_create(infix_forward_t **, const char *, void *, infix_registry_t *)
Generates a bound forward-call trampoline from a signature string.
Definition trampoline.c:656
c23_nodiscard infix_status infix_reverse_create_closure(infix_reverse_t **, const char *, infix_closure_handler_fn, void *, infix_registry_t *)
Generates a low-level reverse-call trampoline (closure) from a signature string.
Definition trampoline.c:726
c23_nodiscard infix_status infix_signature_parse(const char *, infix_arena_t **, infix_type **, infix_function_argument **, size_t *, size_t *, infix_registry_t *)
Parses a full function signature string into its constituent infix_type parts.
Definition signature.c:1123
c23_nodiscard size_t infix_type_get_size(const infix_type *)
Retrieves the size of an infix_type in bytes.
Definition types.c:728
c23_nodiscard const infix_type * infix_type_get_arg_type(const infix_type *, size_t)
Retrieves the type of a function argument by its index.
Definition types.c:782
c23_nodiscard size_t infix_type_get_alignment(const infix_type *)
Retrieves the alignment requirement of an infix_type in bytes.
Definition types.c:736
c23_nodiscard size_t infix_forward_get_num_fixed_args(const infix_forward_t *)
Retrieves the number of fixed (non-variadic) arguments for a forward trampoline.
Definition types.c:802
c23_nodiscard const infix_type * infix_forward_get_return_type(const infix_forward_t *)
Retrieves the return type for a forward trampoline.
Definition types.c:809
c23_nodiscard infix_cif_func infix_forward_get_code(infix_forward_t *)
Retrieves the executable code pointer from a bound forward trampoline.
Definition trampoline.c:227
c23_nodiscard void * infix_reverse_get_code(const infix_reverse_t *)
Retrieves the executable code pointer from a reverse trampoline.
Definition trampoline.c:636
c23_nodiscard const infix_type * infix_forward_get_arg_type(const infix_forward_t *, size_t)
Retrieves the type of a specific argument for a forward trampoline.
Definition types.c:816
c23_nodiscard infix_status infix_type_print(char *, size_t, const infix_type *, infix_print_dialect_t)
Serializes an infix_type object graph into a string representation.
Definition signature.c:1370
c23_nodiscard const infix_type * infix_reverse_get_return_type(const infix_reverse_t *)
Retrieves the return type for a reverse trampoline.
Definition types.c:840
c23_nodiscard infix_unbound_cif_func infix_forward_get_unbound_code(infix_forward_t *)
Retrieves the executable code pointer from an unbound forward trampoline.
Definition trampoline.c:217
c23_nodiscard size_t infix_reverse_get_num_args(const infix_reverse_t *)
Retrieves the number of arguments for a reverse trampoline.
Definition types.c:825
c23_nodiscard size_t infix_type_get_member_count(const infix_type *)
Retrieves the number of members in an aggregate type (struct or union).
Definition types.c:745
c23_nodiscard const char * infix_type_get_arg_name(const infix_type *, size_t)
Retrieves the name of a function argument by its index.
Definition types.c:769
c23_nodiscard size_t infix_forward_get_num_args(const infix_forward_t *)
Retrieves the number of arguments for a forward trampoline.
Definition types.c:793
c23_nodiscard infix_type_category infix_type_get_category(const infix_type *)
Retrieves the fundamental category of an infix_type.
Definition types.c:719
c23_nodiscard void * infix_reverse_get_user_data(const infix_reverse_t *)
Retrieves the user_data stored with a reverse trampoline.
Definition trampoline.c:645
c23_nodiscard infix_status infix_function_print(char *, size_t, const char *, const infix_type *, const infix_function_argument *, size_t, size_t, infix_print_dialect_t)
Serializes a full function signature into a string representation.
Definition signature.c:1415
infix_print_dialect_t
Specifies the output format for type-to-string serialization functions.
Definition infix.h:814
c23_nodiscard const infix_type * infix_reverse_get_arg_type(const infix_reverse_t *, size_t)
Retrieves the type of a specific argument for a reverse trampoline.
Definition types.c:847
c23_nodiscard size_t infix_reverse_get_num_fixed_args(const infix_reverse_t *)
Retrieves the number of fixed (non-variadic) arguments for a reverse trampoline.
Definition types.c:834
c23_nodiscard const infix_struct_member * infix_type_get_member(const infix_type *, size_t)
Retrieves a specific member from an aggregate type by its index.
Definition types.c:756
@ INFIX_DIALECT_SIGNATURE
The standard infix signature language format.
Definition infix.h:815
@ INFIX_DIALECT_ITANIUM_MANGLING
Itanium C++ ABI name mangling (used by GCC/Clang). (Not yet implemented)
Definition infix.h:816
@ INFIX_DIALECT_MSVC_MANGLING
Microsoft C++ ABI name mangling. (Not yet implemented)
Definition infix.h:817
void infix_library_close(infix_library_t *)
Closes a dynamic library handle and unloads it.
Definition loader.c:113
c23_nodiscard void * infix_library_get_symbol(infix_library_t *, const char *)
Retrieves the memory address of a symbol (function or global variable).
Definition loader.c:144
c23_nodiscard infix_library_t * infix_library_open(const char *)
Opens a dynamic library and returns a handle to it.
Definition loader.c:65
void infix_reverse_destroy(infix_reverse_t *)
Frees a reverse trampoline, its JIT-compiled stub, and its context.
Definition trampoline.c:622
c23_nodiscard infix_status infix_forward_create_manual(infix_forward_t **, infix_type *, infix_type **, size_t, size_t, void *)
Generates a bound forward-call trampoline for a given function signature.
Definition trampoline.c:370
c23_nodiscard infix_status infix_reverse_create_callback_manual(infix_reverse_t **, infix_type *, infix_type **, size_t, size_t, void *)
Generates a type-safe reverse-call trampoline (callback) from infix_type objects.
Definition trampoline.c:593
c23_nodiscard infix_status infix_reverse_create_closure_manual(infix_reverse_t **, infix_type *, infix_type **, size_t, size_t, infix_closure_handler_fn, void *)
Generates a generic reverse-call trampoline (closure) from infix_type objects.
Definition trampoline.c:607
c23_nodiscard infix_status infix_forward_create_unbound_manual(infix_forward_t **, infix_type *, infix_type **, size_t, size_t)
Generates an unbound forward-call trampoline for a given function signature.
Definition trampoline.c:392
void infix_forward_destroy(infix_forward_t *)
Frees a forward trampoline and its associated executable memory.
Definition trampoline.c:406
void infix_arena_destroy(infix_arena_t *)
Frees an entire memory arena and all objects allocated within it.
Definition arena.c:68
c23_nodiscard void * infix_arena_calloc(infix_arena_t *, size_t, size_t, size_t)
Allocates a zero-initialized block of memory from the arena.
Definition arena.c:129
c23_nodiscard void * infix_arena_alloc(infix_arena_t *, size_t, size_t)
Allocates a block of memory from the arena with a specific alignment.
Definition arena.c:86
c23_nodiscard infix_arena_t * infix_arena_create(size_t)
Creates and initializes a new memory arena.
Definition arena.c:41
void(* infix_closure_handler_fn)(infix_context_t *context, void *return_value, void **args)
The signature for a generic "closure" handler.
Definition infix.h:346
void(* infix_cif_func)(void *, void **)
The signature for a "bound" forward-call trampoline.
Definition infix.h:335
void(* infix_unbound_cif_func)(void *, void *, void **)
The signature for a generic "unbound" forward-call trampoline.
Definition infix.h:315
infix_status
An enumeration of all possible success or failure codes from the public API.
Definition infix.h:351
@ INFIX_ERROR_ALLOCATION_FAILED
A memory allocation request failed.
Definition infix.h:353
@ INFIX_ERROR_LAYOUT_FAILED
Failed to calculate the call frame layout.
Definition infix.h:356
@ INFIX_ERROR_
An unspecified error occurred.
Definition infix.h:358
@ INFIX_ERROR_PROTECTION_FAILED
Failed to change memory permissions (e.g., mprotect or VirtualProtect).
Definition infix.h:357
@ INFIX_ERROR_UNSUPPORTED_ABI
The current platform/ABI is not supported.
Definition infix.h:355
@ INFIX_SUCCESS
The operation completed successfully.
Definition infix.h:352
@ INFIX_ERROR_INVALID_ARGUMENT
An invalid argument was provided to a function.
Definition infix.h:354
void infix_registry_destroy(infix_registry_t *registry)
Frees a type registry and all type definitions and metadata contained within it.
Definition type_registry.c:166
c23_nodiscard infix_status infix_register_types(infix_registry_t *, const char *)
Parses a string of definitions and populates a type registry.
Definition type_registry.c:233
c23_nodiscard infix_registry_t * infix_registry_create(void)
Creates a new, empty type registry.
Definition type_registry.c:131
c23_nodiscard infix_status infix_type_create_packed_struct(infix_arena_t *, infix_type **, size_t, size_t, infix_struct_member *, size_t)
Creates a new infix_type for a packed struct from an arena.
Definition types.c:519
c23_nodiscard infix_type * infix_type_create_void(void)
Creates an infix_type descriptor for the void type.
Definition types.c:153
infix_primitive_type_id
Enumerates the specific primitive C types supported by the FFI system.
Definition infix.h:133
c23_nodiscard infix_status infix_type_create_union(infix_arena_t *, infix_type **, infix_struct_member *, size_t)
Creates a new infix_type for a union from an arena.
Definition types.c:392
c23_nodiscard infix_status infix_type_create_enum(infix_arena_t *, infix_type **, infix_type *)
Creates a new infix_type for an enum from an arena.
Definition types.c:289
c23_nodiscard infix_status infix_type_create_vector(infix_arena_t *, infix_type **, infix_type *, size_t)
Creates a new infix_type for a SIMD vector from an arena.
Definition types.c:354
c23_nodiscard infix_type * infix_type_create_pointer(void)
Creates an infix_type descriptor for a generic void* pointer.
Definition types.c:145
c23_nodiscard infix_status infix_type_create_complex(infix_arena_t *, infix_type **, infix_type *)
Creates a new infix_type for a _Complex number from an arena.
Definition types.c:324
infix_type_category
Enumerates the fundamental categories of types supported by the FFI system.
Definition infix.h:114
c23_nodiscard infix_status infix_type_create_array(infix_arena_t *, infix_type **, infix_type *, size_t)
Creates a new infix_type for a fixed-size array from an arena.
Definition types.c:254
c23_nodiscard infix_status infix_type_create_pointer_to(infix_arena_t *, infix_type **, infix_type *)
Creates an infix_type for a pointer to a specific type from an arena.
Definition types.c:230
infix_aggregate_category_t
Distinguishes between struct and union for named references.
Definition infix.h:151
c23_nodiscard infix_status infix_type_create_struct(infix_arena_t *, infix_type **, infix_struct_member *, size_t)
Creates a new infix_type for a struct from an arena.
Definition types.c:445
infix_reverse_t infix_context_t
A clear alias for infix_reverse_t, intended for use in callback handler signatures.
Definition infix.h:102
c23_nodiscard infix_status infix_type_create_named_reference(infix_arena_t *, infix_type **, const char *, infix_aggregate_category_t)
Creates a new infix_type for a named reference from an arena.
Definition types.c:563
c23_nodiscard infix_type * infix_type_create_primitive(infix_primitive_type_id)
Creates an infix_type descriptor for a primitive C type.
Definition types.c:97
infix_struct_member infix_type_create_member(const char *, infix_type *, size_t)
A factory function to create an infix_struct_member.
Definition types.c:161
@ INFIX_PRIMITIVE_UINT16
unsigned short, uint16_t
Definition infix.h:137
@ INFIX_PRIMITIVE_UINT32
unsigned int, uint32_t
Definition infix.h:139
@ INFIX_PRIMITIVE_LONG_DOUBLE
long double
Definition infix.h:147
@ INFIX_PRIMITIVE_FLOAT
float
Definition infix.h:145
@ INFIX_PRIMITIVE_DOUBLE
double
Definition infix.h:146
@ INFIX_PRIMITIVE_SINT16
signed short, int16_t
Definition infix.h:138
@ INFIX_PRIMITIVE_SINT64
signed long long, int64_t
Definition infix.h:142
@ INFIX_PRIMITIVE_SINT32
signed int, int32_t
Definition infix.h:140
@ INFIX_PRIMITIVE_UINT8
unsigned char, uint8_t
Definition infix.h:135
@ INFIX_PRIMITIVE_UINT128
__uint128_t (GCC/Clang specific)
Definition infix.h:143
@ INFIX_PRIMITIVE_BOOL
bool or _Bool
Definition infix.h:134
@ INFIX_PRIMITIVE_UINT64
unsigned long long, uint64_t
Definition infix.h:141
@ INFIX_PRIMITIVE_SINT128
__int128_t (GCC/Clang specific)
Definition infix.h:144
@ INFIX_PRIMITIVE_SINT8
signed char, int8_t
Definition infix.h:136
@ INFIX_TYPE_UNION
A user-defined union (union).
Definition infix.h:118
@ INFIX_TYPE_PRIMITIVE
A built-in type like int, float, double.
Definition infix.h:115
@ INFIX_TYPE_COMPLEX
A _Complex number type.
Definition infix.h:122
@ INFIX_TYPE_ARRAY
A fixed-size array.
Definition infix.h:119
@ INFIX_TYPE_VECTOR
A SIMD vector type.
Definition infix.h:123
@ INFIX_TYPE_VOID
The void type, used for function returns with no value.
Definition infix.h:125
@ INFIX_TYPE_POINTER
A generic void* pointer type.
Definition infix.h:116
@ INFIX_TYPE_NAMED_REFERENCE
A reference to a named type (e.g., struct<Node>).
Definition infix.h:124
@ INFIX_TYPE_REVERSE_TRAMPOLINE
A callback wrapper.
Definition infix.h:120
@ INFIX_TYPE_ENUM
A C-style enumeration, with an underlying integer type.
Definition infix.h:121
@ INFIX_TYPE_STRUCT
A user-defined structure (struct).
Definition infix.h:117
@ INFIX_AGGREGATE_STRUCT
Definition infix.h:151
@ INFIX_AGGREGATE_UNION
Definition infix.h:151
Definition infix_internals.h:130
A structure holding detailed information about the last error that occurred on the current thread.
Definition infix.h:1093
size_t position
For parser errors, the 0-based index in the input string where the error occurred.
Definition infix.h:1096
infix_error_category_t category
The general category of the error.
Definition infix.h:1094
long system_error_code
For OS-level errors (errno, GetLastError())
Definition infix.h:1097
infix_error_code_t code
The specific error code.
Definition infix.h:1095
Definition infix_internals.h:72
Describes a single argument to a function, pairing an optional name with its type.
Definition infix.h:229
infix_type * type
An infix_type describing the argument's type.
Definition infix.h:231
const char * name
The name of the argument (for reflection). Can be nullptr if anonymous.
Definition infix.h:230
Definition loader.c:49
Definition infix_internals.h:158
Definition infix_internals.h:102
Describes a single member of an aggregate type (struct or union).
Definition infix.h:219
const char * name
The name of the member (for debugging/reflection).
Definition infix.h:220
infix_type * type
An infix_type describing the member's type.
Definition infix.h:221
size_t offset
The byte offset of the member from the start of the aggregate.
Definition infix.h:222
The central structure for describing any data type in the FFI system.
Definition infix.h:161
struct infix_type_t::@0::@1 pointer_info
For INFIX_TYPE_POINTER.
union infix_type_t::@0 meta
Type-specific metadata.
struct infix_type_t::@0::@7 vector_info
For INFIX_TYPE_VECTOR.
struct infix_type_t::@0::@4 func_ptr_info
For INFIX_TYPE_REVERSE_TRAMPOLINE.
size_t num_elements
The number of elements in the array.
Definition infix.h:183
size_t size
The total size of the type in bytes, per sizeof.
Definition infix.h:163
size_t alignment
The alignment requirement of the type in bytes, per _Alignof.
Definition infix.h:164
infix_struct_member * members
Array of members for the aggregate.
Definition infix.h:177
struct infix_type_t::@0::@6 complex_info
For INFIX_TYPE_COMPLEX.
const char * name
Optional name of the aggregate.
Definition infix.h:176
infix_function_argument * args
Array of function arguments (name and type).
Definition infix.h:188
infix_aggregate_category_t aggregate_category
Definition infix.h:208
infix_type_category category
The fundamental category of the type.
Definition infix.h:162
struct infix_type_t::@0::@2 aggregate_info
For INFIX_TYPE_STRUCT and INFIX_TYPE_UNION.
struct infix_type_t::@0::@3 array_info
For INFIX_TYPE_ARRAY.
struct infix_type_t * pointee_type
The type this pointer points to.
Definition infix.h:172
struct infix_type_t * element_type
The type of elements in the array.
Definition infix.h:182
struct infix_type_t * return_type
Reverse trampoline return value.
Definition infix.h:187
struct infix_type_t::@0::@5 enum_info
For INFIX_TYPE_ENUM.
struct infix_type_t * base_type
The floating point type of the real and imaginary parts.
Definition infix.h:198
size_t num_members
Number of members in the aggregate.
Definition infix.h:178
struct infix_type_t * underlying_type
The integer type this enum is based on.
Definition infix.h:194
struct infix_type_t::@0::@8 named_reference
For INFIX_TYPE_NAMED_REFERENCE. This is an internal placeholder for a named type like @Point.
size_t num_fixed_args
The number of non-variadic arguments.
Definition infix.h:190
infix_primitive_type_id primitive_id
For INFIX_TYPE_PRIMITIVE.
Definition infix.h:169
size_t num_args
The total number of fixed and variadic arguments.
Definition infix.h:189
bool is_arena_allocated
If true, this type was allocated from an arena and should not be individually freed.
Definition infix.h:165