(&mut self, depth: u32)
| 694 | } |
| 695 | |
| 696 | fn emit_br_table_pad(&mut self, depth: u32) -> (usize, usize, bool) { |
| 697 | let pad_start = self.instructions.len(); |
| 698 | let frame = if self.is_unreachable() { None } else { self.validator.get_control_frame(depth as usize) }; |
| 699 | let Some(frame) = frame else { |
| 700 | let ip = self.instructions.len(); |
| 701 | self.instructions.push(Instruction::Return); |
| 702 | return (pad_start, ip, true); |
| 703 | }; |
| 704 | |
| 705 | let base = self.stack_base_at_frame(depth as usize); |
| 706 | let (c32, c64, c128) = self.label_keep_counts_for_frame(frame); |
| 707 | self.emit_dropkeep(base, c32, c64, c128); |
| 708 | |
| 709 | let jump_ip = self.instructions.len(); |
| 710 | self.instructions.push(Instruction::Jump(0)); |
| 711 | (pad_start, jump_ip, false) |
| 712 | } |
| 713 | |
| 714 | fn patch_branch_jump_or_return(&mut self, depth: u32, jump_ip: usize) { |
| 715 | let Some(frame) = self.validator.get_control_frame(depth as usize) else { |
no test coverage detected