Foreign_Block :: struct {
module_name: [] u8;
funcs: [] Foreign_Block.Foreign_Function;
}
Stack_Frame :: struct {
info: &Stack_Node;
current_line: u32;
}
Stack_Node :: struct {
file: [] u8;
line: u32;
func_name: [] u8;
func_type: type_expr;
}
Stack_Trace :: struct {
prev: &Stack_Trace;
data: &Stack_Node;
current_line: u32;
}
Tagged_Global :: struct {
data: rawptr;
type: type_expr;
tags: [] any;
pack: package_id;
}
Tagged_Procedure :: struct {
func: () -> void;
type: type_expr;
tags: [] any;
pack: package_id;
}
Type_Info :: struct {
kind: Type_Info.Kind;
size: u32;
alignment: u32;
}
Type_Info.as_array :: (t: &Type_Info) -> &Type_Info_Array
Type_Info.as_basic :: (t: &Type_Info) -> &Type_Info_Basic
Type_Info.as_compound :: (t: &Type_Info) -> &Type_Info_Compound
Type_Info.as_distinct :: (t: &Type_Info) -> &Type_Info_Distinct
Type_Info.as_dynamic_array :: (t: &Type_Info) -> &Type_Info_Dynamic_Array
Type_Info.as_enum :: (t: &Type_Info) -> &Type_Info_Enum
Type_Info.as_function :: (t: &Type_Info) -> &Type_Info_Function
Type_Info.as_multi_pointer :: (t: &Type_Info) -> &Type_Info_Multi_Pointer
Type_Info.as_pointer :: (t: &Type_Info) -> &Type_Info_Pointer
Type_Info.as_poly_struct :: (t: &Type_Info) -> &Type_Info_Polymorphic_Struct
Type_Info.as_poly_union :: (t: &Type_Info) -> &Type_Info_Polymorphic_Union
Type_Info.as_slice :: (t: &Type_Info) -> &Type_Info_Slice
Type_Info.as_struct :: (t: &Type_Info) -> &Type_Info_Struct
Type_Info.as_union :: (t: &Type_Info) -> &Type_Info_Union
Type_Info.as_variadic_argument :: (t: &Type_Info) -> &Type_Info_Variadic_Argument
Type_Info_Array :: struct {
base: Type_Info;
of: type_expr;
count: u32;
}
Type_Info_Basic :: struct {
base: Type_Info;
basic_kind: Type_Info_Basic.Kind;
}
Type_Info_Compound :: struct {
base: Type_Info;
components: [] type_expr;
}
Type_Info_Distinct :: struct {
base: Type_Info;
base_type: type_expr;
name: [] u8;
}
Type_Info_Dynamic_Array :: struct {
base: Type_Info;
of: type_expr;
}
Type_Info_Enum :: struct {
base: Type_Info;
backing_type: type_expr;
name: [] u8;
members: [] Type_Info_Enum.Member;
is_flags: bool;
}
Type_Info_Function :: struct {
base: Type_Info;
return_type: type_expr;
parameter_types: [] type_expr;
is_variadic: bool;
}
Type_Info_Multi_Pointer :: struct {
base: Type_Info;
to: type_expr;
}
Type_Info_Pointer :: struct {
base: Type_Info;
to: type_expr;
}
Type_Info_Polymorphic_Struct :: struct {
base: Type_Info;
name: [] u8;
tags: [] any;
}
Type_Info_Polymorphic_Union :: struct {
base: Type_Info;
name: [] u8;
tags: [] any;
}
Type_Info_Slice :: struct {
base: Type_Info;
of: type_expr;
}
Type_Info_Struct :: struct {
base: Type_Info;
constructed_from: type_expr;
name: [] u8;
members: [] Type_Info_Struct.Member;
parameters: [] any;
tags: [] any;
methods: [] Type_Info_Struct.Method;
}
Type_Info_Union :: struct {
base: Type_Info;
constructed_from: type_expr;
tag_enum: type_expr;
name: [] u8;
variants: [] Type_Info_Union.Variant;
parameters: [] any;
tags: [] any;
methods: [] Type_Info_Union.Method;
}
Type_Info_Variadic_Argument :: struct {
base: Type_Info;
of: type_expr;
}
foreign_block :: #distinct u32
enum_name :: (value: $Backing_Type) -> str
enum_value :: ($E: type_expr, name: str) -> E
enum_values :: (E: type_expr) -> [] Type_Info_Enum.Member
for_all_types :: macro (body: Code) -> void
get_foreign_block :: (f: foreign_block) -> &Foreign_Block
get_globals_with_tag :: ($tag_type: type_expr) -> [] GGWT_Result(tag_type)
get_procedures_with_tag :: ($tag_type: type_expr) -> [] GPWT_Result(tag_type)
get_stack_trace :: () -> [..] Stack_Frame
get_struct_by_name :: (name: [] u8) -> type_expr
get_struct_member :: (S: type_expr, member_name: [] u8) -> &Type_Info_Struct.Member
get_struct_method :: (type: type_expr, method_name: [] u8) -> &any
get_type_info :: (t: type_expr) -> &Type_Info
is_pointer :: (t: type_expr) -> bool
offset_of :: (T: type_expr, member_name: [] u8) -> u32
populate_struct_vtable :: (table: &$Table_Type, struct_type: type_expr, safe) -> void
size_of :: (t: type_expr) -> u32
struct_constructed_from :: (struct_type: type_expr, base_type: type_expr) -> bool
struct_inherits :: (struct_type: type_expr, base_type: type_expr) -> bool
union_constructed_from :: (union_type: type_expr, base_type: type_expr) -> bool
write_type_name :: (writer: &Writer, t: type_expr) -> void