(ft: FrameTable<'a>, pc: u32, fp: *mut usize)
| 831 | // structured result) within the closure borrowed by a nested closure. |
| 832 | #[cfg(feature = "gc")] |
| 833 | pub(crate) fn gc_refs_in_frame<'a>(ft: FrameTable<'a>, pc: u32, fp: *mut usize) -> Vec<*mut u32> { |
| 834 | let fp = fp.cast::<u8>(); |
| 835 | let mut ret = vec![]; |
| 836 | if let Some(frames) = ft.find_program_point(pc, FrameInstPos::Post) { |
| 837 | for (_wasm_pc, frame_desc, stack_shape) in frames { |
| 838 | let (frame_desc_data, slot_to_fp_offset) = ft.frame_descriptor(frame_desc).unwrap(); |
| 839 | let frame_base = unsafe { fp.offset(-isize::try_from(slot_to_fp_offset).unwrap()) }; |
| 840 | let frame_desc = FrameStateSlot::parse(frame_desc_data).unwrap(); |
| 841 | for (offset, ty) in frame_desc.stack_and_locals(stack_shape) { |
| 842 | match ty { |
| 843 | FrameValType::AnyRef | FrameValType::ExnRef | FrameValType::ExternRef => { |
| 844 | let slot = unsafe { |
| 845 | frame_base |
| 846 | .offset(isize::try_from(offset.offset()).unwrap()) |
| 847 | .cast::<u32>() |
| 848 | }; |
| 849 | ret.push(slot); |
| 850 | } |
| 851 | FrameValType::ContRef | FrameValType::FuncRef => {} |
| 852 | FrameValType::I32 |
| 853 | | FrameValType::I64 |
| 854 | | FrameValType::F32 |
| 855 | | FrameValType::F64 |
| 856 | | FrameValType::V128 => {} |
| 857 | } |
| 858 | } |
| 859 | } |
| 860 | } |
| 861 | ret |
| 862 | } |
| 863 | |
| 864 | /// One debug event that occurs when running Wasm code on a store with |
| 865 | /// a debug handler attached. |
no test coverage detected