Skip to content

Commit

Permalink
tweak assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
iritkatriel committed Oct 13, 2023
1 parent 62ca8ce commit 3fa0423
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Python/bytecodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@ dummy_func(
gen->gi_exc_state.previous_item = tstate->exc_info;
tstate->exc_info = &gen->gi_exc_state;
SKIP_OVER(INLINE_CACHE_ENTRIES_SEND);
assert(NEXT_INSTR_OFFSET_FOR_YIELD == next_instr - frame->instr_ptr);
assert(1 + INLINE_CACHE_ENTRIES_SEND == next_instr - frame->instr_ptr);
frame->next_instr_offset = 1 + INLINE_CACHE_ENTRIES_SEND + oparg;
DISPATCH_INLINED(gen_frame);
}
Expand Down Expand Up @@ -1019,7 +1019,7 @@ dummy_func(
gen->gi_exc_state.previous_item = tstate->exc_info;
tstate->exc_info = &gen->gi_exc_state;
SKIP_OVER(INLINE_CACHE_ENTRIES_SEND);
assert(NEXT_INSTR_OFFSET_FOR_YIELD == next_instr - frame->instr_ptr);
assert(1 + INLINE_CACHE_ENTRIES_SEND == next_instr - frame->instr_ptr);
frame->next_instr_offset = 1 + INLINE_CACHE_ENTRIES_SEND + oparg;
DISPATCH_INLINED(gen_frame);
}
Expand Down Expand Up @@ -2680,7 +2680,7 @@ dummy_func(
SKIP_OVER(INLINE_CACHE_ENTRIES_FOR_ITER);
assert(next_instr[oparg].op.code == END_FOR ||
next_instr[oparg].op.code == INSTRUMENTED_END_FOR);
assert(NEXT_INSTR_OFFSET_FOR_YIELD == next_instr - frame->instr_ptr);
assert(1 + INLINE_CACHE_ENTRIES_FOR_ITER == next_instr - frame->instr_ptr);
frame->next_instr_offset = 1 + INLINE_CACHE_ENTRIES_FOR_ITER + oparg;
DISPATCH_INLINED(gen_frame);
}
Expand Down
6 changes: 3 additions & 3 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 3fa0423

Please sign in to comment.