| ... | @@ -1,5 +1,7 @@ | ... | @@ -1,5 +1,7 @@ |
| 1 | //! Zig Intermediate Representation. Astgen.zig converts AST nodes to these | 1 | //! Zig Intermediate Representation. |
| 2 | //! untyped IR instructions. Next, Sema.zig processes these into AIR. | 2 | //! |
| | 3 | //! Astgen.zig converts AST nodes to these untyped IR instructions. Next, |
| | 4 | //! Sema.zig processes these into AIR. |
| 3 | //! The minimum amount of information needed to represent a list of ZIR instructions. | 5 | //! The minimum amount of information needed to represent a list of ZIR instructions. |
| 4 | //! Once this structure is completed, it can be used to generate AIR, followed by | 6 | //! Once this structure is completed, it can be used to generate AIR, followed by |
| 5 | //! machine code, without any memory access into the AST tree token list, node list, | 7 | //! machine code, without any memory access into the AST tree token list, node list, |
| ... | @@ -4024,8 +4026,8 @@ pub fn getAssociatedSrcHash(zir: Zir, inst: Zir.Inst.Index) ?std.zig.SrcHash { | ... | @@ -4024,8 +4026,8 @@ pub fn getAssociatedSrcHash(zir: Zir, inst: Zir.Inst.Index) ?std.zig.SrcHash { |
| 4024 | const data = zir.instructions.items(.data); | 4026 | const data = zir.instructions.items(.data); |
| 4025 | switch (tag[@intFromEnum(inst)]) { | 4027 | switch (tag[@intFromEnum(inst)]) { |
| 4026 | .declaration => { | 4028 | .declaration => { |
| 4027 | const pl_node = data[@intFromEnum(inst)].pl_node; | 4029 | const declaration = data[@intFromEnum(inst)].declaration; |
| 4028 | const extra = zir.extraData(Inst.Declaration, pl_node.payload_index); | 4030 | const extra = zir.extraData(Inst.Declaration, declaration.payload_index); |
| 4029 | return @bitCast([4]u32{ | 4031 | return @bitCast([4]u32{ |
| 4030 | extra.data.src_hash_0, | 4032 | extra.data.src_hash_0, |
| 4031 | extra.data.src_hash_1, | 4033 | extra.data.src_hash_1, |