struct StructDecl [src]

Trailing: captures_len: u32 // if has_captures_len fields_len: u32, // if has_fields_len decls_len: u32, // if has_decls_len capture: Capture // for every captures_len capture_name: NullTerminatedString // for every captures_len backing_int_body_len: u32, // if has_backing_int backing_int_ref: Ref, // if has_backing_int and backing_int_body_len is 0 backing_int_body_inst: Inst, // if has_backing_int and backing_int_body_len is > 0 decl: Index, // for every decls_len; points to a declaration instruction flags: u32 // for every 8 fields sets of 4 bits: 0b000X: whether corresponding field has an align expression 0b00X0: whether corresponding field has a default expression 0b0X00: whether corresponding field is comptime 0bX000: whether corresponding field has a type expression fields: { // for every fields_len field_name: u32, field_type: Ref, // if corresponding bit is not set. none means anytype. field_type_body_len: u32, // if corresponding bit is set align_body_len: u32, // if corresponding bit is set init_body_len: u32, // if corresponding bit is set } bodies: { // for every fields_len field_type_body_inst: Inst, // for each field_type_body_len align_body_inst: Inst, // for each align_body_len init_body_inst: Inst, // for each init_body_len }

Fields

fields_hash_0: u32
fields_hash_1: u32
fields_hash_2: u32
fields_hash_3: u32
src_line: u32
src_node: Ast.Node.IndexThis node provides a new absolute baseline node for all instructions within this struct.

Members

Source

pub const StructDecl = struct { // These fields should be concatenated and reinterpreted as a `std.zig.SrcHash`. // This hash contains the source of all fields, and any specified attributes (`extern`, backing type, etc). fields_hash_0: u32, fields_hash_1: u32, fields_hash_2: u32, fields_hash_3: u32, src_line: u32, /// This node provides a new absolute baseline node for all instructions within this struct. src_node: Ast.Node.Index, pub const Small = packed struct { has_captures_len: bool, has_fields_len: bool, has_decls_len: bool, has_backing_int: bool, known_non_opv: bool, known_comptime_only: bool, name_strategy: NameStrategy, layout: std.builtin.Type.ContainerLayout, any_default_inits: bool, any_comptime_fields: bool, any_aligned_fields: bool, _: u3 = undefined, }; }