Struct
is used to construct customized composite types.
See also:
@[extern lean_gcc_jit_context_new_struct_type]
opaque
LeanGccJit.Core.Context.newStructType
(ctx : LeanGccJit.Core.Context)
(location : Option LeanGccJit.Core.Location)
(name : String)
(fields : Array LeanGccJit.Core.Field)
:
Construct a new struct type, with the given name and fields.
@[extern lean_gcc_jit_context_new_opaque_struct]
opaque
LeanGccJit.Core.Context.newOpaqueStruct
(ctx : LeanGccJit.Core.Context)
(location : Option LeanGccJit.Core.Location)
(name : String)
:
Construct a new struct type, with the given name, but without specifying the fields.
The fields can be omitted (in which case the size of the struct is not known),
or later specified using LeanGccJit.Core.Struct.setFields
.
@[extern lean_gcc_jit_struct_as_type]
Upcast from Struct
to JitType
.
@[extern lean_gcc_jit_struct_set_fields]
opaque
LeanGccJit.Core.Struct.setFields
(s : LeanGccJit.Core.Struct)
(location : Option LeanGccJit.Core.Location)
(fields : Array LeanGccJit.Core.Field)
:
Populate the fields of a formerly-opaque struct type.
This can only be called once on a given struct type.
@[extern lean_gcc_jit_struct_get_field]
Get a struct field by index.
@[extern lean_gcc_jit_struct_get_field_count]
Get the number of fields in the struct.