| ... | ... | @@ -12304,6 +12304,7 @@ fn analyzeSwitchRuntimeBlock( |
| 12304 | 12304 | extra_index += info.body_len; |
| 12305 | 12305 | |
| 12306 | 12306 | case_block.instructions.shrinkRetainingCapacity(0); |
| 12307 | case_block.error_return_trace_index = child_block.error_return_trace_index; |
| 12307 | 12308 | |
| 12308 | 12309 | const item = case_vals.items[scalar_i]; |
| 12309 | 12310 | // `item` is already guaranteed to be constant known. |
| ... | ... | @@ -12361,6 +12362,7 @@ fn analyzeSwitchRuntimeBlock( |
| 12361 | 12362 | case_val_idx += items_len; |
| 12362 | 12363 | |
| 12363 | 12364 | case_block.instructions.shrinkRetainingCapacity(0); |
| 12365 | case_block.error_return_trace_index = child_block.error_return_trace_index; |
| 12364 | 12366 | |
| 12365 | 12367 | // Generate all possible cases as scalar prongs. |
| 12366 | 12368 | if (info.is_inline) { |
| ... | ... | @@ -12392,6 +12394,7 @@ fn analyzeSwitchRuntimeBlock( |
| 12392 | 12394 | const item_ref = Air.internedToRef(item.toIntern()); |
| 12393 | 12395 | |
| 12394 | 12396 | case_block.instructions.shrinkRetainingCapacity(0); |
| 12397 | case_block.error_return_trace_index = child_block.error_return_trace_index; |
| 12395 | 12398 | |
| 12396 | 12399 | if (emit_bb) sema.emitBackwardBranch(block, .unneeded) catch |err| switch (err) { |
| 12397 | 12400 | error.NeededSourceLocation => { |
| ... | ... | @@ -12431,6 +12434,7 @@ fn analyzeSwitchRuntimeBlock( |
| 12431 | 12434 | cases_len += 1; |
| 12432 | 12435 | |
| 12433 | 12436 | case_block.instructions.shrinkRetainingCapacity(0); |
| 12437 | case_block.error_return_trace_index = child_block.error_return_trace_index; |
| 12434 | 12438 | |
| 12435 | 12439 | const analyze_body = if (union_originally) blk: { |
| 12436 | 12440 | const item_val = sema.resolveConstDefinedValue(block, .unneeded, item, undefined) catch unreachable; |
| ... | ... | @@ -12576,6 +12580,7 @@ fn analyzeSwitchRuntimeBlock( |
| 12576 | 12580 | defer gpa.free(cond_body); |
| 12577 | 12581 | |
| 12578 | 12582 | case_block.instructions.shrinkRetainingCapacity(0); |
| 12583 | case_block.error_return_trace_index = child_block.error_return_trace_index; |
| 12579 | 12584 | |
| 12580 | 12585 | const body = sema.code.bodySlice(extra_index, info.body_len); |
| 12581 | 12586 | extra_index += info.body_len; |
| ... | ... | @@ -12636,6 +12641,7 @@ fn analyzeSwitchRuntimeBlock( |
| 12636 | 12641 | const item_ref = Air.internedToRef(item_val.toIntern()); |
| 12637 | 12642 | |
| 12638 | 12643 | case_block.instructions.shrinkRetainingCapacity(0); |
| 12644 | case_block.error_return_trace_index = child_block.error_return_trace_index; |
| 12639 | 12645 | |
| 12640 | 12646 | const analyze_body = if (union_originally) blk: { |
| 12641 | 12647 | const field_ty = maybe_union_ty.unionFieldType(item_val, mod).?; |
| ... | ... | @@ -12686,6 +12692,7 @@ fn analyzeSwitchRuntimeBlock( |
| 12686 | 12692 | const item_ref = Air.internedToRef(item_val); |
| 12687 | 12693 | |
| 12688 | 12694 | case_block.instructions.shrinkRetainingCapacity(0); |
| 12695 | case_block.error_return_trace_index = child_block.error_return_trace_index; |
| 12689 | 12696 | |
| 12690 | 12697 | if (emit_bb) try sema.emitBackwardBranch(block, special_prong_src); |
| 12691 | 12698 | emit_bb = true; |
| ... | ... | @@ -12716,6 +12723,7 @@ fn analyzeSwitchRuntimeBlock( |
| 12716 | 12723 | const item_ref = Air.internedToRef(cur); |
| 12717 | 12724 | |
| 12718 | 12725 | case_block.instructions.shrinkRetainingCapacity(0); |
| 12726 | case_block.error_return_trace_index = child_block.error_return_trace_index; |
| 12719 | 12727 | |
| 12720 | 12728 | if (emit_bb) try sema.emitBackwardBranch(block, special_prong_src); |
| 12721 | 12729 | emit_bb = true; |
| ... | ... | @@ -12743,6 +12751,7 @@ fn analyzeSwitchRuntimeBlock( |
| 12743 | 12751 | cases_len += 1; |
| 12744 | 12752 | |
| 12745 | 12753 | case_block.instructions.shrinkRetainingCapacity(0); |
| 12754 | case_block.error_return_trace_index = child_block.error_return_trace_index; |
| 12746 | 12755 | |
| 12747 | 12756 | if (emit_bb) try sema.emitBackwardBranch(block, special_prong_src); |
| 12748 | 12757 | emit_bb = true; |
| ... | ... | @@ -12768,6 +12777,7 @@ fn analyzeSwitchRuntimeBlock( |
| 12768 | 12777 | cases_len += 1; |
| 12769 | 12778 | |
| 12770 | 12779 | case_block.instructions.shrinkRetainingCapacity(0); |
| 12780 | case_block.error_return_trace_index = child_block.error_return_trace_index; |
| 12771 | 12781 | |
| 12772 | 12782 | if (emit_bb) try sema.emitBackwardBranch(block, special_prong_src); |
| 12773 | 12783 | emit_bb = true; |
| ... | ... | @@ -12796,6 +12806,7 @@ fn analyzeSwitchRuntimeBlock( |
| 12796 | 12806 | }; |
| 12797 | 12807 | |
| 12798 | 12808 | case_block.instructions.shrinkRetainingCapacity(0); |
| 12809 | case_block.error_return_trace_index = child_block.error_return_trace_index; |
| 12799 | 12810 | |
| 12800 | 12811 | if (mod.backendSupportsFeature(.is_named_enum_value) and |
| 12801 | 12812 | special.body.len != 0 and block.wantSafety() and |