gh-139109: Replace _CHECK_STACK_SPACE with _CHECK_STACK_SPACE_OPERAND in JIT optiimizer (GH-144394)

This commit is contained in:
Hai Zhu 2026-02-03 01:12:01 +08:00 committed by GitHub
parent 141fd8b894
commit 89e6607e05
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 43 additions and 63 deletions

View file

@ -1068,13 +1068,17 @@ dummy_func(void) {
}
op(_CHECK_STACK_SPACE, (unused, unused, unused[oparg] -- unused, unused, unused[oparg])) {
assert((this_instr + 4)->opcode == _PUSH_FRAME);
PyCodeObject *co = get_code_with_logging((this_instr + 4));
if (co == NULL) {
ctx->done = true;
break;
}
ADD_OP(_CHECK_STACK_SPACE_OPERAND, 0, co->co_framesize);
}
op (_CHECK_STACK_SPACE_OPERAND, (framesize/2 -- )) {
(void)framesize;
/* We should never see _CHECK_STACK_SPACE_OPERANDs.
* They are only created at the end of this pass. */
Py_UNREACHABLE();
}
op(_PUSH_FRAME, (new_frame -- )) {