gh-148871: make LOAD_COMMON_CONSTANT use immortal stackref borrows (GH-149625)

This commit is contained in:
Neko Asakura
2026-05-28 19:27:37 +08:00
committed by GitHub
parent 2531cd337b
commit 39bd44fc70
12 changed files with 96 additions and 43 deletions
+1 -1
View File
@@ -1974,7 +1974,7 @@ dummy_func(
inst(LOAD_COMMON_CONSTANT, ( -- value)) {
// Keep in sync with _common_constants in opcode.py
assert(oparg < NUM_COMMON_CONSTANTS);
value = PyStackRef_FromPyObjectNew(tstate->interp->common_consts[oparg]);
value = PyStackRef_DupImmortal(tstate->interp->common_consts[oparg]);
}
inst(LOAD_BUILD_CLASS, ( -- bc)) {