| ... | @@ -5328,8 +5328,6 @@ fn zirStoreNode(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!v | ... | @@ -5328,8 +5328,6 @@ fn zirStoreNode(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!v |
| 5328 | const tracy = trace(@src()); | 5328 | const tracy = trace(@src()); |
| 5329 | defer tracy.end(); | 5329 | defer tracy.end(); |
| 5330 | | 5330 | |
| 5331 | const pt = sema.pt; | | |
| 5332 | const zcu = pt.zcu; | | |
| 5333 | const zir_tags = sema.code.instructions.items(.tag); | 5331 | const zir_tags = sema.code.instructions.items(.tag); |
| 5334 | const zir_datas = sema.code.instructions.items(.data); | 5332 | const zir_datas = sema.code.instructions.items(.data); |
| 5335 | const inst_data = zir_datas[@intFromEnum(inst)].pl_node; | 5333 | const inst_data = zir_datas[@intFromEnum(inst)].pl_node; |
| ... | @@ -5343,16 +5341,6 @@ fn zirStoreNode(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!v | ... | @@ -5343,16 +5341,6 @@ fn zirStoreNode(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!v |
| 5343 | else | 5341 | else |
| 5344 | false; | 5342 | false; |
| 5345 | | 5343 | |
| 5346 | // Check for the possibility of this pattern: | | |
| 5347 | // %a = ret_ptr | | |
| 5348 | // %b = store(%a, %c) | | |
| 5349 | // Where %c is an error union or error set. In such case we need to add | | |
| 5350 | // to the current function's inferred error set, if any. | | |
| 5351 | if (is_ret and sema.fn_ret_ty_ies != null) switch (sema.typeOf(operand).zigTypeTag(zcu)) { | | |
| 5352 | .error_union, .error_set => try sema.addToInferredErrorSet(operand), | | |
| 5353 | else => {}, | | |
| 5354 | }; | | |
| 5355 | | | |
| 5356 | const ptr_src = block.src(.{ .node_offset_store_ptr = inst_data.src_node }); | 5344 | const ptr_src = block.src(.{ .node_offset_store_ptr = inst_data.src_node }); |
| 5357 | const operand_src = block.src(.{ .node_offset_store_operand = inst_data.src_node }); | 5345 | const operand_src = block.src(.{ .node_offset_store_operand = inst_data.src_node }); |
| 5358 | const air_tag: Air.Inst.Tag = if (is_ret) | 5346 | const air_tag: Air.Inst.Tag = if (is_ret) |