Skip to content

Commit

Permalink
Adjust stack length for _PUSH_FRAME_INLINEABLE
Browse files Browse the repository at this point in the history
 Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
  • Loading branch information
gvanrossum committed Mar 6, 2024
1 parent 64bb30b commit 396223a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Python/optimizer_bytecodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ dummy_func(void) {
ctx->curr_frame_depth++;
stack_pointer = new_frame->stack_pointer;
// First 32 bits set to locals_len, last 32 bits set to stack_len.
uint64_t operand = (((uint64_t)(new_frame->locals_len)) << 32) | (new_frame->stack_len);
uint64_t operand = (((uint64_t)(new_frame->locals_len)) << 32) | (new_frame->stack_len + (frame->stack_len - STACK_LEVEL()));
REPLACE_OP(this_instr, _PUSH_FRAME_INLINEABLE, oparg, operand);
if (!new_frame->is_inlineable) {
REPLACE_OP(this_instr, _PUSH_FRAME, oparg, 0);
Expand Down

0 comments on commit 396223a

Please sign in to comment.