GH-131498: Remove conditional stack effects (GH-131499)

* Adds some missing #includes
This commit is contained in:
Mark Shannon 2025-03-20 15:39:38 +00:00 committed by GitHub
parent 443c0cd17c
commit 7ebd71ee14
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 129 additions and 272 deletions

View file

@ -546,10 +546,14 @@ dummy_func(void) {
}
}
op (_PUSH_NULL_CONDITIONAL, ( -- null if (oparg & 1))) {
int opcode = (oparg & 1) ? _PUSH_NULL : _NOP;
REPLACE_OP(this_instr, opcode, 0, 0);
null = sym_new_null(ctx);
op (_PUSH_NULL_CONDITIONAL, ( -- null[oparg & 1])) {
if (oparg & 1) {
REPLACE_OP(this_instr, _PUSH_NULL, 0, 0);
null[0] = sym_new_null(ctx);
}
else {
REPLACE_OP(this_instr, _NOP, 0, 0);
}
}
op(_LOAD_ATTR, (owner -- attr, self_or_null[oparg&1])) {
@ -765,7 +769,7 @@ dummy_func(void) {
Py_UNREACHABLE();
}
op(_PUSH_FRAME, (new_frame: _Py_UOpsAbstractFrame * -- unused if (0))) {
op(_PUSH_FRAME, (new_frame: _Py_UOpsAbstractFrame * -- )) {
SYNC_SP();
ctx->frame->stack_pointer = stack_pointer;
ctx->frame = new_frame;