Skip to content

Commit 396223a

Browse files
committed
Adjust stack length for _PUSH_FRAME_INLINEABLE
Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
1 parent 64bb30b commit 396223a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/optimizer_bytecodes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ dummy_func(void) {
562562
ctx->curr_frame_depth++;
563563
stack_pointer = new_frame->stack_pointer;
564564
// First 32 bits set to locals_len, last 32 bits set to stack_len.
565-
uint64_t operand = (((uint64_t)(new_frame->locals_len)) << 32) | (new_frame->stack_len);
565+
uint64_t operand = (((uint64_t)(new_frame->locals_len)) << 32) | (new_frame->stack_len + (frame->stack_len - STACK_LEVEL()));
566566
REPLACE_OP(this_instr, _PUSH_FRAME_INLINEABLE, oparg, operand);
567567
if (!new_frame->is_inlineable) {
568568
REPLACE_OP(this_instr, _PUSH_FRAME, oparg, 0);

0 commit comments

Comments
 (0)