struct Func [src]

Trailing: if (ret_ty.body_len == 1) { return_type: Ref } if (ret_ty.body_len > 1) { return_type: Index // for each ret_ty.body_len } body: Index // for each body_len src_locs: SrcLocs // if body_len != 0 proto_hash: std.zig.SrcHash // if body_len != 0; hash of function prototype

Fields

ret_ty: RetTy
param_block: IndexPoints 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

Members

Source

pub const Func = struct { ret_ty: RetTy, /// 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, pub const RetTy = packed struct(u32) { /// 0 means `void`. /// 1 means the type is a simple `Ref`. /// Otherwise, the length of a trailing body. body_len: u31, /// Whether the return type is generic, i.e. refers to one or more previous parameters. is_generic: bool, }; pub const SrcLocs = struct { /// Line index in the source file relative to the parent decl. lbrace_line: u32, /// Line index in the source file relative to the parent decl. rbrace_line: u32, /// lbrace_column is least significant bits u16 /// rbrace_column is most significant bits u16 columns: u32, }; }