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

The central structure for describing any data type in the FFI system. More...

#include <infix.h>

Collaboration diagram for infix_type_t:
[legend]

Public Attributes

infix_type_category category
 The fundamental category of the type.
 
size_t size
 The total size of the type in bytes, per sizeof.
 
size_t alignment
 The alignment requirement of the type in bytes, per _Alignof.
 
bool is_arena_allocated
 If true, this type was allocated from an arena and should not be individually freed.
 
union { 
 
   infix_primitive_type_id   primitive_id 
 For INFIX_TYPE_PRIMITIVE. More...
 
   struct { 
 
      struct infix_type_t *   pointee_type 
 The type this pointer points to. More...
 
   }   pointer_info 
 For INFIX_TYPE_POINTER. More...
 
   struct { 
 
      const char *   name 
 Optional name of the aggregate. More...
 
      infix_struct_member *   members 
 Array of members for the aggregate. More...
 
      size_t   num_members 
 Number of members in the aggregate. More...
 
   }   aggregate_info 
 For INFIX_TYPE_STRUCT and INFIX_TYPE_UNION. More...
 
   struct { 
 
      struct infix_type_t *   element_type 
 The type of elements in the array. More...
 
      size_t   num_elements 
 The number of elements in the array. More...
 
   }   array_info 
 For INFIX_TYPE_ARRAY. More...
 
   struct { 
 
      struct infix_type_t *   return_type 
 Reverse trampoline return value. More...
 
      infix_function_argument *   args 
 Array of function arguments (name and type). More...
 
      size_t   num_args 
 The total number of fixed and variadic arguments. More...
 
      size_t   num_fixed_args 
 The number of non-variadic arguments. More...
 
   }   func_ptr_info 
 For INFIX_TYPE_REVERSE_TRAMPOLINE. More...
 
   struct { 
 
      struct infix_type_t *   underlying_type 
 The integer type this enum is based on. More...
 
   }   enum_info 
 For INFIX_TYPE_ENUM. More...
 
   struct { 
 
      struct infix_type_t *   base_type 
 The floating point type of the real and imaginary parts. More...
 
   }   complex_info 
 For INFIX_TYPE_COMPLEX. More...
 
   struct { 
 
      struct infix_type_t *   element_type 
 The type of the elements in the vector. More...
 
      size_t   num_elements 
 The number of elements in the vector. More...
 
   }   vector_info 
 For INFIX_TYPE_VECTOR. More...
 
   struct { 
 
      const char *   name 
 
      infix_aggregate_category_t   aggregate_category 
 
   }   named_reference 
 For INFIX_TYPE_NAMED_REFERENCE. This is an internal placeholder for a named type like @Point. More...
 
meta 
 Type-specific metadata.
 

Detailed Description

The central structure for describing any data type in the FFI system.

This structure provides the FFI code generator with the necessary metadata (size, alignment, category, and contents) to correctly handle arguments and return values according to the target ABI.

Member Data Documentation

◆ aggregate_category

infix_aggregate_category_t infix_type_t::aggregate_category

◆ [struct]

struct { ... } infix_type_t::aggregate_info

For INFIX_TYPE_STRUCT and INFIX_TYPE_UNION.

◆ alignment

size_t infix_type_t::alignment

The alignment requirement of the type in bytes, per _Alignof.

◆ args

infix_function_argument* infix_type_t::args

Array of function arguments (name and type).

◆ [struct]

struct { ... } infix_type_t::array_info

For INFIX_TYPE_ARRAY.

◆ base_type

struct infix_type_t* infix_type_t::base_type

The floating point type of the real and imaginary parts.

◆ category

infix_type_category infix_type_t::category

The fundamental category of the type.

◆ [struct]

struct { ... } infix_type_t::complex_info

For INFIX_TYPE_COMPLEX.

◆ element_type

struct infix_type_t* infix_type_t::element_type

The type of elements in the array.

The type of the elements in the vector.

◆ [struct]

struct { ... } infix_type_t::enum_info

For INFIX_TYPE_ENUM.

◆ [struct]

struct { ... } infix_type_t::func_ptr_info

For INFIX_TYPE_REVERSE_TRAMPOLINE.

◆ is_arena_allocated

bool infix_type_t::is_arena_allocated

If true, this type was allocated from an arena and should not be individually freed.

◆ members

infix_struct_member* infix_type_t::members

Array of members for the aggregate.

◆ [union]

union { ... } infix_type_t::meta

Type-specific metadata.

◆ name

const char* infix_type_t::name

Optional name of the aggregate.

◆ [struct]

struct { ... } infix_type_t::named_reference

For INFIX_TYPE_NAMED_REFERENCE. This is an internal placeholder for a named type like @Point.

◆ num_args

size_t infix_type_t::num_args

The total number of fixed and variadic arguments.

◆ num_elements

size_t infix_type_t::num_elements

The number of elements in the array.

The number of elements in the vector.

◆ num_fixed_args

size_t infix_type_t::num_fixed_args

The number of non-variadic arguments.

◆ num_members

size_t infix_type_t::num_members

Number of members in the aggregate.

◆ pointee_type

struct infix_type_t* infix_type_t::pointee_type

The type this pointer points to.

◆ [struct]

struct { ... } infix_type_t::pointer_info

For INFIX_TYPE_POINTER.

◆ primitive_id

infix_primitive_type_id infix_type_t::primitive_id

For INFIX_TYPE_PRIMITIVE.

◆ return_type

struct infix_type_t* infix_type_t::return_type

Reverse trampoline return value.

◆ size

size_t infix_type_t::size

The total size of the type in bytes, per sizeof.

◆ underlying_type

struct infix_type_t* infix_type_t::underlying_type

The integer type this enum is based on.

◆ [struct]

struct { ... } infix_type_t::vector_info

For INFIX_TYPE_VECTOR.


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