(&self, frame: &wasmparser::Frame)
| 648 | } |
| 649 | |
| 650 | fn label_keep_counts_for_frame(&self, frame: &wasmparser::Frame) -> (u16, u16, u16) { |
| 651 | match &frame.block_type { |
| 652 | wasmparser::BlockType::Empty => (0, 0, 0), |
| 653 | wasmparser::BlockType::Type(ty) => match frame.kind { |
| 654 | FrameKind::Loop => (0, 0, 0), |
| 655 | _ => Self::label_keep_counts(core::slice::from_ref(ty)), |
| 656 | }, |
| 657 | wasmparser::BlockType::FuncType(idx) => { |
| 658 | let sub_type = self.validator.resources().sub_type_at(*idx); |
| 659 | let func_ty = match sub_type { |
| 660 | Some(st) => st.composite_type.unwrap_func(), |
| 661 | None => return (0, 0, 0), |
| 662 | }; |
| 663 | match frame.kind { |
| 664 | FrameKind::Loop => Self::label_keep_counts(func_ty.params()), |
| 665 | _ => Self::label_keep_counts(func_ty.results()), |
| 666 | } |
| 667 | } |
| 668 | } |
| 669 | } |
| 670 | |
| 671 | fn emit_dropkeep_to_label(&mut self, label_depth: u32) { |
| 672 | if self.is_unreachable() { |
no test coverage detected