GH-131798: Narrow types more aggressively in the JIT (GH-134373)

This commit is contained in:
Brandt Bucher 2025-05-20 18:09:51 -04:00 committed by GitHub
parent e1c0c451a2
commit 2f0570caf4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 180 additions and 88 deletions

View file

@ -539,6 +539,24 @@
break;
}
case _POP_TWO: {
_PyStackRef tos;
_PyStackRef nos;
tos = stack_pointer[-1];
nos = stack_pointer[-2];
stack_pointer += -1;
assert(WITHIN_STACK_BOUNDS());
_PyFrame_SetStackPointer(frame, stack_pointer);
PyStackRef_CLOSE(tos);
stack_pointer = _PyFrame_GetStackPointer(frame);
stack_pointer += -1;
assert(WITHIN_STACK_BOUNDS());
_PyFrame_SetStackPointer(frame, stack_pointer);
PyStackRef_CLOSE(nos);
stack_pointer = _PyFrame_GetStackPointer(frame);
break;
}
case _PUSH_NULL: {
_PyStackRef res;
res = PyStackRef_NULL;