Skip to content

Commit d855944

Browse files
committed
gh-133171: Re-enable JUMP_BACKWARD to free-threading build
1 parent c744b57 commit d855944

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

Python/bytecodes.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2935,9 +2935,10 @@ dummy_func(
29352935
};
29362936

29372937
tier1 op(_SPECIALIZE_JUMP_BACKWARD, (--)) {
2938-
#if ENABLE_SPECIALIZATION
2938+
#if ENABLE_SPECIALIZATION_FT
29392939
if (this_instr->op.code == JUMP_BACKWARD) {
2940-
this_instr->op.code = tstate->interp->jit ? JUMP_BACKWARD_JIT : JUMP_BACKWARD_NO_JIT;
2940+
uint8_t desired = tstate->interp->jit ? JUMP_BACKWARD_JIT : JUMP_BACKWARD_NO_JIT;
2941+
FT_ATOMIC_STORE_UINT8_RELAXED(this_instr->op.code, desired);
29412942
// Need to re-dispatch so the warmup counter isn't off by one:
29422943
next_instr = this_instr;
29432944
DISPATCH_SAME_OPARG();

Python/generated_cases.c.h

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

0 commit comments

Comments
 (0)