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

Method pop

crates/vm/src/datastack.rs:132–141  ·  view source on GitHub ↗
(&mut self, base: *mut u8)

Source from the content-addressed store, hash-verified

130 /// and all allocations made after it must already have been popped.
131 #[inline(always)]
132 pub unsafe fn pop(&mut self, base: *mut u8) {
133 debug_assert!(!base.is_null());
134 if self.is_in_current_chunk(base) {
135 // Common case: base is within the current chunk.
136 self.top = base;
137 } else {
138 // base is in a previous chunk — free the current chunk.
139 unsafe { self.pop_slow(base) };
140 }
141 }
142
143 /// Check if `ptr` falls within the current chunk's data area.
144 /// Both bounds are checked to handle non-monotonic allocation addresses

Callers 12

releaseMethod · 0.45
_execFunction · 0.45
_load_unlockedFunction · 0.45
_fix_up_moduleMethod · 0.45
load_moduleMethod · 0.45
_find_and_load_unlockedFunction · 0.45
search_upFunction · 0.45
basic_push_popFunction · 0.45
cross_chunk_push_popFunction · 0.45
alignmentFunction · 0.45
collect_innerMethod · 0.45

Calls 2

is_in_current_chunkMethod · 0.80
pop_slowMethod · 0.80

Tested by 3

basic_push_popFunction · 0.36
cross_chunk_push_popFunction · 0.36
alignmentFunction · 0.36