(&self)
| 334 | /// Immutable view of the active stack as `Option<PyStackRef>` slice. |
| 335 | #[inline(always)] |
| 336 | fn stack_as_slice(&self) -> &[Option<PyStackRef>] { |
| 337 | let data = self.data_as_slice(); |
| 338 | let base = self.nlocalsplus as usize; |
| 339 | let ptr = unsafe { (data.as_ptr().add(base)) as *const Option<PyStackRef> }; |
| 340 | unsafe { core::slice::from_raw_parts(ptr, self.stack_top as usize) } |
| 341 | } |
| 342 | |
| 343 | /// Get a reference to a stack slot by index from the bottom. |
| 344 | #[inline(always)] |
no test coverage detected