gh-100239: Propagate type info through _BINARY_OP_EXTEND in tier 2 (GH-148146)

This commit is contained in:
Pieter Eendebak 2026-04-06 14:52:42 +02:00 committed by GitHub
parent 476fadc9ae
commit efda60e2ec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 67 additions and 18 deletions

View file

@ -1168,8 +1168,16 @@
right = stack_pointer[-1];
left = stack_pointer[-2];
PyObject *descr = (PyObject *)this_instr->operand0;
(void)descr;
res = sym_new_not_null(ctx);
_PyBinaryOpSpecializationDescr *d = (_PyBinaryOpSpecializationDescr *)descr;
if (d != NULL && d->result_type != NULL) {
res = sym_new_type(ctx, d->result_type);
if (d->result_unique) {
res = PyJitRef_MakeUnique(res);
}
}
else {
res = sym_new_not_null(ctx);
}
l = left;
r = right;
CHECK_STACK_BOUNDS(1);