Skip to content

Commit

Permalink
yield doesn't need to use next_instr_offset
Browse files Browse the repository at this point in the history
  • Loading branch information
iritkatriel committed Oct 25, 2023
1 parent 3e0b86d commit d0b2469
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions Python/bytecodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -1047,8 +1047,7 @@ dummy_func(
_PyFrame_StackPush(frame, retval);
/* We don't know which of these is relevant here, so keep them equal */
assert(INLINE_CACHE_ENTRIES_SEND == INLINE_CACHE_ENTRIES_FOR_ITER);
frame->next_instr_offset = 1 + INLINE_CACHE_ENTRIES_SEND;
frame->instr_ptr += frame->next_instr_offset;
frame->instr_ptr += 1 + INLINE_CACHE_ENTRIES_SEND;
goto resume_frame;
}

Expand All @@ -1071,8 +1070,7 @@ dummy_func(
_PyFrame_StackPush(frame, retval);
/* We don't know which of these is relevant here, so keep them equal */
assert(INLINE_CACHE_ENTRIES_SEND == INLINE_CACHE_ENTRIES_FOR_ITER);
frame->next_instr_offset = 1 + INLINE_CACHE_ENTRIES_SEND;
frame->instr_ptr += frame->next_instr_offset;
frame->instr_ptr += 1 + INLINE_CACHE_ENTRIES_SEND;
goto resume_frame;
}

Expand Down
6 changes: 2 additions & 4 deletions Python/generated_cases.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d0b2469

Please sign in to comment.