| ... | @@ -6016,17 +6016,17 @@ fn switchExpr( | ... | @@ -6016,17 +6016,17 @@ fn switchExpr( |
| 6016 | break :blk &case_scope.base; | 6016 | break :blk &case_scope.base; |
| 6017 | } | 6017 | } |
| 6018 | const capture = if (case_node == special_node) capture: { | 6018 | const capture = if (case_node == special_node) capture: { |
| 6019 | const capture_tag: Zir.Inst.Tag = if (is_ptr) | 6019 | const capture_tag: Zir.Inst.Tag = if (is_ptr) |
| 6020 | .switch_capture_else_ref | 6020 | .switch_capture_else_ref |
| 6021 | else | 6021 | else |
| 6022 | .switch_capture_else; | 6022 | .switch_capture_else; |
| 6023 | break :capture try case_scope.add(.{ | 6023 | break :capture try case_scope.add(.{ |
| 6024 | .tag = capture_tag, | 6024 | .tag = capture_tag, |
| 6025 | .data = .{ .switch_capture = .{ | 6025 | .data = .{ .switch_capture = .{ |
| 6026 | .switch_inst = switch_block, | 6026 | .switch_inst = switch_block, |
| 6027 | .prong_index = undefined, | 6027 | .prong_index = undefined, |
| 6028 | } }, | 6028 | } }, |
| 6029 | }); | 6029 | }); |
| 6030 | } else capture: { | 6030 | } else capture: { |
| 6031 | const is_multi_case_bits: u2 = @boolToInt(is_multi_case); | 6031 | const is_multi_case_bits: u2 = @boolToInt(is_multi_case); |
| 6032 | const is_ptr_bits: u2 = @boolToInt(is_ptr); | 6032 | const is_ptr_bits: u2 = @boolToInt(is_ptr); |
| ... | @@ -6160,8 +6160,7 @@ fn switchExpr( | ... | @@ -6160,8 +6160,7 @@ fn switchExpr( |
| 6160 | const zir_datas = astgen.instructions.items(.data); | 6160 | const zir_datas = astgen.instructions.items(.data); |
| 6161 | zir_datas[switch_block].pl_node.payload_index = @intCast(u32, payload_index); | 6161 | zir_datas[switch_block].pl_node.payload_index = @intCast(u32, payload_index); |
| 6162 | // Documentation for this: `Zir.Inst.SwitchBlock` and `Zir.Inst.SwitchBlockMulti`. | 6162 | // Documentation for this: `Zir.Inst.SwitchBlock` and `Zir.Inst.SwitchBlockMulti`. |
| 6163 | try astgen.extra.ensureUnusedCapacity(gpa, | 6163 | try astgen.extra.ensureUnusedCapacity(gpa, @as(usize, 2) + // operand, scalar_cases_len |
| 6164 | @as(usize, 2) + // operand, scalar_cases_len | | |
| 6165 | @boolToInt(multi_cases_len != 0) + | 6164 | @boolToInt(multi_cases_len != 0) + |
| 6166 | special_case_payload.items.len + | 6165 | special_case_payload.items.len + |
| 6167 | scalar_cases_payload.items.len + | 6166 | scalar_cases_payload.items.len + |