Documentation

LeanGccJit.Core.JitType

@[extern lean_gcc_jit_context_get_type]

Access a specific type. See LeanGccJit.Core.TypeEnum for the list of types.

@[extern lean_gcc_jit_type_as_object]

Upcast a JitType to an Object.

@[extern lean_gcc_jit_context_get_int_type]

Access the integer type of the given size.

@[extern lean_gcc_jit_type_get_pointer]

Given type T, get type T*.

@[extern lean_gcc_jit_type_get_const]

Given type T, get type const T.

@[extern lean_gcc_jit_type_get_volatile]

Given type T, get type volatile T.

@[extern lean_gcc_jit_type_get_restrict]

Given type T, get type restrict T.

@[extern lean_gcc_jit_compatible_types]

Return non-zero if the two types are compatible. For instance, if uint64_t and unsigned long are the same size on the target, this will return non-zero.

@[extern lean_gcc_jit_type_get_size]

Return the size of a type, in bytes. It only works on integer types for now.

@[extern lean_gcc_jit_context_new_array_type]

Given non-void type T, get type T[N] (for a constant N).

@[extern lean_gcc_jit_context_new_union_type]

Construct a new union type, with the given name and fields.

@[extern lean_gcc_jit_context_new_function_ptr_type]

Generate a JitType for a function pointer with the given return type and parameters.

Each of param_types must be non-void; return_type may be void.

@[extern lean_gcc_jit_type_get_aligned]

Given non-void type T, get type:

T __attribute__ ((aligned (ALIGNMENT_IN_BYTES)))

The alignment must be a power of two.

@[extern lean_gcc_jit_type_get_vector]

Given type T, get type:

T  __attribute__ ((vector_size (sizeof(T) * num_units))

T must be integral or floating point; num_units must be a power of two.

This can be used to construct a vector type in which operations are applied element-wise. The compiler will automatically use SIMD instructions where possible.

See also Vector Extensions.

@[extern lean_gcc_jit_type_dyncast_array]

Get the element type of an array type or none if it’s not an array.

@[extern lean_gcc_jit_type_is_bool]

Return true if the type is a bool.

@[extern lean_gcc_jit_type_dyncast_function_ptr_type]

Return the function type if it is one or none.

@[extern lean_gcc_jit_function_type_get_return_type]

Given a function type, return its return type.

@[extern lean_gcc_jit_function_type_get_param_count]

Given a function type, return its number of parameters.

@[extern lean_gcc_jit_function_type_get_param_type]

Given a function type, return the type of the specified parameter.

@[extern lean_gcc_jit_type_is_integral]

Return true if the type is an integral.

@[extern lean_gcc_jit_type_is_pointer]

Return the type pointed by the pointer type or none if it’s not a pointer.

@[extern lean_gcc_jit_type_dyncast_vector]

Given a type, return a dynamic cast to a vector type or none.

@[extern lean_gcc_jit_type_is_struct]

Given a type, return a dynamic cast to a struct type or none.

@[extern lean_gcc_jit_vector_type_get_num_units]

Given a vector type, return the number of units it contains.

@[extern lean_gcc_jit_vector_type_get_element_type]

Given a vector type, return the type of its elements.

@[extern lean_gcc_jit_type_unqualified]

Given a type, return the unqualified type, removing const, volatile and alignment qualifiers.