summaryrefslogtreecommitdiffstats
path: root/Python/bytecodes.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/bytecodes.c')
-rw-r--r--Python/bytecodes.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/Python/bytecodes.c b/Python/bytecodes.c
index 28766d6..002b5a3 100644
--- a/Python/bytecodes.c
+++ b/Python/bytecodes.c
@@ -163,9 +163,15 @@ dummy_func(
if ((oparg & RESUME_OPARG_LOCATION_MASK) < RESUME_AFTER_YIELD_FROM) {
CHECK_EVAL_BREAKER();
}
- #if ENABLE_SPECIALIZATION
- FT_ATOMIC_STORE_UINT8_RELAXED(this_instr->op.code, RESUME_CHECK);
- #endif /* ENABLE_SPECIALIZATION */
+ assert(this_instr->op.code == RESUME ||
+ this_instr->op.code == RESUME_CHECK ||
+ this_instr->op.code == INSTRUMENTED_RESUME ||
+ this_instr->op.code == ENTER_EXECUTOR);
+ if (this_instr->op.code == RESUME) {
+ #if ENABLE_SPECIALIZATION
+ FT_ATOMIC_STORE_UINT8_RELAXED(this_instr->op.code, RESUME_CHECK);
+ #endif /* ENABLE_SPECIALIZATION */
+ }
}
}