structstd.zig.Zir.Inst.FuncFancy[src]

Trailing: if (has_cc_ref and !has_cc_body) {

  1. cc: Ref, } if (has_cc_body) {
  2. cc_body_len: u32
  3. cc_body: u32 // for each cc_body_len } if (has_ret_ty_ref and !has_ret_ty_body) {
  4. ret_ty: Ref, } if (has_ret_ty_body) {
  5. ret_ty_body_len: u32
  6. ret_ty_body: u32 // for each ret_ty_body_len }
  7. noalias_bits: u32 // if has_any_noalias
    • each bit starting with LSB corresponds to parameter indexes
  8. body: Index // for each body_len
  9. src_locs: Func.SrcLocs // if body_len != 0
  10. proto_hash: std.zig.SrcHash // if body_len != 0; hash of function prototype

Fields

param_block: Index

Points to the block that contains the param instructions for this function. If this is a declaration, it refers to the declaration's value body.

body_len: u32
bits: Bits

Source Code

Source code
pub const FuncFancy = struct {
    /// Points to the block that contains the param instructions for this function.
    /// If this is a `declaration`, it refers to the declaration's value body.
    param_block: Index,
    body_len: u32,
    bits: Bits,

    /// If both has_cc_ref and has_cc_body are false, it means auto calling convention.
    /// If both has_ret_ty_ref and has_ret_ty_body are false, it means void return type.
    pub const Bits = packed struct(u32) {
        is_var_args: bool,
        is_inferred_error: bool,
        is_noinline: bool,
        has_cc_ref: bool,
        has_cc_body: bool,
        has_ret_ty_ref: bool,
        has_ret_ty_body: bool,
        has_any_noalias: bool,
        ret_ty_is_generic: bool,
        _: u23 = undefined,
    };
}