Improve internal API for fetching original instruction, replacing _Py_GetBaseOpcode
#122390
Labels
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
The function
_Py_GetBaseOpcode
returns the original opcode for an instruction, even if that instruction has been instrumented.However it doesn't work for
ENTER_EXECUTOR
and doesn't allow for theop.arg
to have been changed.We should add a new
_Py_GetBaseInstruction
which handlesENTER_EXECUTOR
as well, and is efficient enough to use in the few places where it is used outside of an assert, such as inis_resume
which is used ingen_close
.The new API will be either
or
depending on which is the most convenient for the current use cases.
Linked PRs
_Py_GetbaseOpcode
with_Py_GetBaseCodeUnit
#122942The text was updated successfully, but these errors were encountered: