Skip to content

Commit df12899

Browse files
committed
Skip NOT_TAKEN in POP_JUMP_...
1 parent 1a2b0b8 commit df12899

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Python/bytecodes.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2672,7 +2672,7 @@ dummy_func(
26722672
#if ENABLE_SPECIALIZATION
26732673
this_instr[1].cache = (this_instr[1].cache << 1) | flag;
26742674
#endif
2675-
JUMPBY(oparg * flag);
2675+
JUMPBY(flag ? oparg : next_instr->op.code == NOT_TAKEN);
26762676
}
26772677

26782678
replaced op(_POP_JUMP_IF_TRUE, (cond -- )) {
@@ -2681,7 +2681,7 @@ dummy_func(
26812681
#if ENABLE_SPECIALIZATION
26822682
this_instr[1].cache = (this_instr[1].cache << 1) | flag;
26832683
#endif
2684-
JUMPBY(oparg * flag);
2684+
JUMPBY(flag ? oparg : next_instr->op.code == NOT_TAKEN);
26852685
}
26862686

26872687
op(_IS_NONE, (value -- b)) {

Python/generated_cases.c.h

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)