mirjit.types

mirjit.types — MIR core types, enums, and value structs.

Hand-written D bindings to mir.h (https://github.com/vnmakarov/mir). Enum values are generated from the configured header and verified against a C probe; struct ABI sizes are asserted in unittests below.

Container structs (MIR_func, MIR_item, MIR_module, MIR_insn, …) are treated as opaque handles: the public API hands them back as pointers and provides accessors, so their internal (macro-heavy) layout is not replicated here.

Members

Aliases

MIR_error_func_t
alias MIR_error_func_t = void function(MIR_error_type_t, const(char)*, ...) nothrow

Error handler: void (MIR_error_type_t, const char *fmt, ...).

MIR_error_type_t
alias MIR_error_type_t = int

MIR_error_type_t

MIR_insn_code_t
alias MIR_insn_code_t = int

MIR_insn_code_t

MIR_item_type_t
alias MIR_item_type_t = int

MIR_item_type_t

MIR_op_mode_t
alias MIR_op_mode_t = int

MIR_op_mode_t

MIR_type_t
alias MIR_type_t = int

MIR_type_t

Structs

MIR_code_reloc_t
struct MIR_code_reloc_t

Code relocation entry.

MIR_item
struct MIR_item
Undocumented in source.
MIR_mem_t
struct MIR_mem_t

Memory operand: type[base + index*scale + disp].

MIR_module
struct MIR_module

MIR_module is a public header struct; we expose its layout (verified by unittest) so the module list (e.g. modules created by c2mir) can be walked.

MIR_module_list
struct MIR_module_list

DLIST(MIR_module_t) returned by MIR_get_module_list.

MIR_op_t
struct MIR_op_t

An instruction operand (tagged union).

MIR_str_t
struct MIR_str_t

Counted string.

MIR_var_t
struct MIR_var_t

Function parameter: type + name (+ size for block types).

_MIR_arg_desc_t
struct _MIR_arg_desc_t

Argument descriptor used by the foreign-call helper.

Unions

MIR_imm_t
union MIR_imm_t

Immediate value union.

MIR_val_t
union MIR_val_t

Interpreter value union.