Skip to content

Commit f7907ce

Browse files
committed
Fix CallAllocAndEnterInit to use LocalsPlus stack API
1 parent d3216fe commit f7907ce

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

crates/vm/src/frame.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4328,9 +4328,8 @@ impl ExecutingFrame<'_> {
43284328
let cached_version = self.code.instructions.read_cache_u32(cache_base + 1);
43294329
let nargs: u32 = arg.into();
43304330
let callable = self.nth_value(nargs + 1);
4331-
let stack = &self.state.stack;
4332-
let stack_len = stack.len();
4333-
let self_or_null_is_some = stack[stack_len - nargs as usize - 1].is_some();
4331+
let stack_len = self.localsplus.stack_len();
4332+
let self_or_null_is_some = self.localsplus.stack_index(stack_len - nargs as usize - 1).is_some();
43344333
if !self_or_null_is_some
43354334
&& cached_version != 0
43364335
&& let Some(cls) = callable.downcast_ref::<PyType>()

0 commit comments

Comments
 (0)