MCPcopy Index your code
hub / github.com/RustPython/RustPython / fastlocals

Method fastlocals

crates/vm/src/frame.rs:266–270  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

264 /// Immutable access to fastlocals as `Option<PyObjectRef>` slice.
265 #[inline(always)]
266 fn fastlocals(&self) -> &[Option<PyObjectRef>] {
267 let data = self.data_as_slice();
268 let ptr = data.as_ptr() as *const Option<PyObjectRef>;
269 unsafe { core::slice::from_raw_parts(ptr, self.nlocalsplus as usize) }
270 }
271
272 /// Mutable access to fastlocals as `Option<PyObjectRef>` slice.
273 #[inline(always)]

Callers 7

traverseMethod · 0.80
get_cell_contentsMethod · 0.80
localsMethod · 0.80
cell_refMethod · 0.80
execute_instructionMethod · 0.80
initMethod · 0.80

Calls 3

data_as_sliceMethod · 0.80
as_ptrMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected