diff options
author | Brandt Bucher <brandtbucher@microsoft.com> | 2024-06-24 15:35:10 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-24 15:35:10 (GMT) |
commit | a47abdb45d4f1c3195c324812c33b6ef1d9147da (patch) | |
tree | f0629d55ee374ee0ab7a5bfe621a9515c24722a0 /Python/optimizer.c | |
parent | ce1064e4c9bcfd673323ad690e60f86e1ab907bb (diff) | |
download | cpython-a47abdb45d4f1c3195c324812c33b6ef1d9147da.zip cpython-a47abdb45d4f1c3195c324812c33b6ef1d9147da.tar.gz cpython-a47abdb45d4f1c3195c324812c33b6ef1d9147da.tar.bz2 |
GH-117062: Make _JUMP_TO_TOP a general absolute jump (GH-120854)
Diffstat (limited to 'Python/optimizer.c')
-rw-r--r-- | Python/optimizer.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Python/optimizer.c b/Python/optimizer.c index c9b187d..0d7118c 100644 --- a/Python/optimizer.c +++ b/Python/optimizer.c @@ -1059,6 +1059,11 @@ prepare_for_execution(_PyUOpInstruction *buffer, int length) buffer[i].jump_target = 0; } } + if (opcode == _JUMP_TO_TOP) { + assert(buffer[0].opcode == _START_EXECUTOR); + buffer[i].format = UOP_FORMAT_JUMP; + buffer[i].jump_target = 1; + } } return next_spare; } |