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

Method materialize_localsplus

crates/vm/src/frame.rs:777–779  ·  view source on GitHub ↗

Migrate data-stack-backed storage to the heap, preserving all values, and return the data stack base pointer for `DataStack::pop()`. Returns `None` if already heap-backed. # Safety Caller must ensure the frame is not executing and the returned pointer is passed to `VirtualMachine::datastack_pop()`.

(&self)

Source from the content-addressed store, hash-verified

775 /// Caller must ensure the frame is not executing and the returned
776 /// pointer is passed to `VirtualMachine::datastack_pop()`.
777 pub(crate) unsafe fn materialize_localsplus(&self) -> Option<*mut u8> {
778 unsafe { (*self.iframe.get()).localsplus.materialize_to_heap() }
779 }
780
781 /// Clear evaluation stack and state-owned cell/free references.
782 /// For full local/cell cleanup, call `clear_locals_and_stack()`.

Callers 4

release_datastack_frameFunction · 0.80
invoke_with_localsMethod · 0.80
invoke_exact_argsMethod · 0.80
vectorcall_functionFunction · 0.80

Calls 2

materialize_to_heapMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected