lib/std/lang/gen/types.rad 594 B raw
1
//! Target-independent code generation types.
2
//!
3
//! Defines common records used by all code generation backends.
4
5
/// Function address entry for printing.
6
export record FuncAddr: Copy {
7
    /// Function name.
8
    name: *[u8],
9
    /// Instruction index where this function starts.
10
    index: u32,
11
}
12
13
/// Debug entry mapping an instruction to a source location.
14
export record DebugEntry: Copy {
15
    /// Byte offset of the instruction from the start of the program.
16
    pc: u32,
17
    /// Module identifier.
18
    moduleId: u16,
19
    /// Byte offset into the module's source file.
20
    offset: u32,
21
}