GH-117062: Make _JUMP_TO_TOP a general absolute jump (GH-120854)

This commit is contained in:
Brandt Bucher 2024-06-24 08:35:10 -07:00 committed by GitHub
parent ce1064e4c9
commit a47abdb45d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 7 additions and 12 deletions

View file

@ -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;
}