GH-131798: Turn _LOAD_SMALL_INT into _LOAD_CONST_INLINE_BORROW in the JIT (GH-134406)

This commit is contained in:
Nadeshiko Manju
2025-05-22 21:54:57 +08:00
committed by GitHub
parent 3effede97c
commit 8c5e5557c6
4 changed files with 21 additions and 2 deletions

View File

@@ -528,7 +528,10 @@ dummy_func(void) {
}
op(_LOAD_SMALL_INT, (-- value)) {
PyObject *val = PyLong_FromLong(this_instr->oparg);
PyObject *val = PyLong_FromLong(oparg);
assert(val);
assert(_Py_IsImmortal(val));
REPLACE_OP(this_instr, _LOAD_CONST_INLINE_BORROW, 0, (uintptr_t)val);
value = sym_new_const(ctx, val);
}