diff options
author | Guido van Rossum <guido@python.org> | 2023-07-07 18:41:42 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-07 18:41:42 (GMT) |
commit | 80b9b3a51757ebb1e3547afc349a229706eadfde (patch) | |
tree | 398fee5ecbce9afc23160b08086fe6d9717a73aa /Python | |
parent | a8554588bad5ca9e890830281b8d70ecbf6f8e23 (diff) | |
download | cpython-80b9b3a51757ebb1e3547afc349a229706eadfde.zip cpython-80b9b3a51757ebb1e3547afc349a229706eadfde.tar.gz cpython-80b9b3a51757ebb1e3547afc349a229706eadfde.tar.bz2 |
gh-104584: Replace ENTER_EXECUTOR with the original in trace projection (#106526)
Diffstat (limited to 'Python')
-rw-r--r-- | Python/optimizer.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Python/optimizer.c b/Python/optimizer.c index 2870f2f..1d731ed 100644 --- a/Python/optimizer.c +++ b/Python/optimizer.c @@ -419,6 +419,12 @@ translate_bytecode_to_trace( opcode = instr->op.code; oparg = (oparg << 8) | instr->op.arg; } + if (opcode == ENTER_EXECUTOR) { + _PyExecutorObject *executor = (_PyExecutorObject *)code->co_executors->executors[oparg&255]; + opcode = executor->vm_data.opcode; + DPRINTF(2, " * ENTER_EXECUTOR -> %s\n", _PyOpcode_OpName[opcode]); + oparg = (oparg & 0xffffff00) | executor->vm_data.oparg; + } switch (opcode) { default: { |