| ... | ... | @@ -2456,20 +2456,15 @@ const Writer = struct { |
| 2456 | 2456 | const inst_data = self.code.instructions.items(.data)[@intFromEnum(inst)].save_err_ret_index; |
| 2457 | 2457 | |
| 2458 | 2458 | try self.writeInstRef(stream, inst_data.operand); |
| 2459 | |
| 2459 | 2460 | try stream.writeAll(")"); |
| 2460 | 2461 | } |
| 2461 | 2462 | |
| 2462 | 2463 | fn writeRestoreErrRetIndex(self: *Writer, stream: anytype, inst: Zir.Inst.Index) !void { |
| 2463 | 2464 | const inst_data = self.code.instructions.items(.data)[@intFromEnum(inst)].restore_err_ret_index; |
| 2464 | 2465 | |
| 2465 | | if (inst_data.block != .none) { |
| 2466 | | try self.writeInstRef(stream, inst_data.block); |
| 2467 | | } |
| 2468 | | |
| 2469 | | if (inst_data.operand != .none) { |
| 2470 | | if (inst_data.block != .none) try stream.writeAll(", "); |
| 2471 | | try self.writeInstRef(stream, inst_data.operand); |
| 2472 | | } |
| 2466 | try self.writeInstRef(stream, inst_data.block); |
| 2467 | try self.writeInstRef(stream, inst_data.operand); |
| 2473 | 2468 | |
| 2474 | 2469 | try stream.writeAll(")"); |
| 2475 | 2470 | } |
| ... | ... | @@ -2615,7 +2610,9 @@ const Writer = struct { |
| 2615 | 2610 | } |
| 2616 | 2611 | |
| 2617 | 2612 | fn writeInstRef(self: *Writer, stream: anytype, ref: Zir.Inst.Ref) !void { |
| 2618 | | if (ref.toIndex()) |i| { |
| 2613 | if (ref == .none) { |
| 2614 | return stream.writeAll(".none"); |
| 2615 | } else if (ref.toIndex()) |i| { |
| 2619 | 2616 | return self.writeInstIndex(stream, i); |
| 2620 | 2617 | } else { |
| 2621 | 2618 | const val: InternPool.Index = @enumFromInt(@intFromEnum(ref)); |