--- /dev/null
+Fix possible assertion failures and missing instrumentation events when
+:envvar:`PYTHONUOPS` or :option:`-X uops <-X>` is enabled.
}
inst(RESUME, (--)) {
- #if TIER_ONE
assert(frame == tstate->current_frame);
/* Possibly combine this with eval breaker */
if (_PyFrame_GetCode(frame)->_co_instrumentation_version != tstate->interp->monitoring_version) {
int err = _Py_Instrument(_PyFrame_GetCode(frame), tstate->interp);
ERROR_IF(err, error);
+ #if TIER_ONE
next_instr--;
+ #endif
+ #if TIER_TWO
+ goto deoptimize;
+ #endif
}
- else
- #endif
- if (oparg < 2) {
+ else if (oparg < 2) {
CHECK_EVAL_BREAKER();
}
}
}
case RESUME: {
- #if TIER_ONE
assert(frame == tstate->current_frame);
/* Possibly combine this with eval breaker */
if (_PyFrame_GetCode(frame)->_co_instrumentation_version != tstate->interp->monitoring_version) {
int err = _Py_Instrument(_PyFrame_GetCode(frame), tstate->interp);
if (err) goto error;
+ #if TIER_ONE
next_instr--;
+ #endif
+ #if TIER_TWO
+ goto deoptimize;
+ #endif
}
- else
- #endif
- if (oparg < 2) {
+ else if (oparg < 2) {
CHECK_EVAL_BREAKER();
}
break;
}
TARGET(RESUME) {
- #if TIER_ONE
assert(frame == tstate->current_frame);
/* Possibly combine this with eval breaker */
if (_PyFrame_GetCode(frame)->_co_instrumentation_version != tstate->interp->monitoring_version) {
int err = _Py_Instrument(_PyFrame_GetCode(frame), tstate->interp);
if (err) goto error;
+ #if TIER_ONE
next_instr--;
+ #endif
+ #if TIER_TWO
+ goto deoptimize;
+ #endif
}
- else
- #endif
- if (oparg < 2) {
+ else if (oparg < 2) {
CHECK_EVAL_BREAKER();
}
DISPATCH();