LOAD_CONST_IMMORTAL
doesn't survive being instrumented and de-instrumented.
#128685
Labels
type-bug
An unexpected behavior, bug, or error
Bug report
Bug description:
When instrumenting, instructions are first de-optimized to their base instruction.
When instrumentation is removed we assume that specialization will restore the specialized instruction.
However, that doesn't happen for
LOAD_CONST_IMMORTAL
becauseLOAD_CONST_IMMORTAL
isn't a specialization form ofLOAD_CONST
, but a quickened form of it.The fix should be simple. Instead of quickening
LOAD_CONST
toLOAD_CONST_IMMORTAL
, we add aLOAD_CONST_MORTAL
and haveLOAD_CONST
specialize (rather than quicken) to eitherLOAD_CONST_MORTAL
orLOAD_CONST_IMMORTAL
.CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
The text was updated successfully, but these errors were encountered: