Get the type and offset for a given local.
(&self, index: usize)
| 570 | |
| 571 | /// Get the type and offset for a given local. |
| 572 | pub fn local(&self, index: usize) -> Option<(FrameStateSlotOffset, FrameValType)> { |
| 573 | let offset = FrameStateSlotOffset(self.local_offsets.get(index)?.get(LittleEndian)); |
| 574 | let ty = FrameValType::try_from(*self.local_types.get(index)?).expect("Invalid type"); |
| 575 | Some((offset, ty)) |
| 576 | } |
| 577 | |
| 578 | /// Get the number of locals in the frame. |
| 579 | pub fn num_locals(&self) -> usize { |
no test coverage detected