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

@ -921,11 +921,15 @@
}
case _PUSH_NULL_CONDITIONAL: {
JitOptSymbol *null = NULL;
int opcode = (oparg & 1) ? _PUSH_NULL : _NOP;
REPLACE_OP(this_instr, opcode, 0, 0);
null = sym_new_null(ctx);
if (oparg & 1) stack_pointer[0] = null;
JitOptSymbol **null;
null = &stack_pointer[0];
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);
}
stack_pointer += (oparg & 1);
assert(WITHIN_STACK_BOUNDS());
break;