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 because LOAD_CONST_IMMORTAL isn't a specialization form of LOAD_CONST, but a quickened form of it.
The fix should be simple. Instead of quickening LOAD_CONST to LOAD_CONST_IMMORTAL, we add a LOAD_CONST_MORTAL and have LOAD_CONST specialize (rather than quicken) to either LOAD_CONST_MORTAL or LOAD_CONST_IMMORTAL.
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Linked PRs
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_IMMORTALbecauseLOAD_CONST_IMMORTALisn't a specialization form ofLOAD_CONST, but a quickened form of it.The fix should be simple. Instead of quickening
LOAD_CONSTtoLOAD_CONST_IMMORTAL, we add aLOAD_CONST_MORTALand haveLOAD_CONSTspecialize (rather than quicken) to eitherLOAD_CONST_MORTALorLOAD_CONST_IMMORTAL.CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Linked PRs