summaryrefslogtreecommitdiffstats
path: root/Python/bytecodes.c
diff options
context:
space:
mode:
authorKen Jin <kenjin@python.org>2025-12-13 14:38:10 (GMT)
committerGitHub <noreply@github.com>2025-12-13 14:38:10 (GMT)
commite02a35c36535330bb86b4067104f537aa6da00e4 (patch)
tree23ee4d6781201953e5c57246e4143e18e0518d5e /Python/bytecodes.c
parentc98182be8d47a69b9a43c08f58bac7a70c109cc9 (diff)
downloadcpython-e02a35c36535330bb86b4067104f537aa6da00e4.zip
cpython-e02a35c36535330bb86b4067104f537aa6da00e4.tar.gz
cpython-e02a35c36535330bb86b4067104f537aa6da00e4.tar.bz2
gh-134584: Cleanups for GH-135860 (GH-142604)
Diffstat (limited to 'Python/bytecodes.c')
-rw-r--r--Python/bytecodes.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/Python/bytecodes.c b/Python/bytecodes.c
index 3e7b7d5..d96a194 100644
--- a/Python/bytecodes.c
+++ b/Python/bytecodes.c
@@ -4068,15 +4068,17 @@ dummy_func(
DEOPT_IF(callable_o != (PyObject *)&PyTuple_Type);
}
- op(_CALL_TUPLE_1, (callable, null, arg -- res)) {
+ op(_CALL_TUPLE_1, (callable, null, arg -- res, a)) {
PyObject *arg_o = PyStackRef_AsPyObjectBorrow(arg);
assert(oparg == 1);
STAT_INC(CALL, hit);
PyObject *res_o = PySequence_Tuple(arg_o);
- PyStackRef_CLOSE(arg);
+ if (res_o == NULL) {
+ ERROR_NO_POP();
+ }
+ a = arg;
INPUTS_DEAD();
- ERROR_IF(res_o == NULL);
res = PyStackRef_FromPyObjectSteal(res_o);
}
@@ -4086,6 +4088,7 @@ dummy_func(
_GUARD_NOS_NULL +
_GUARD_CALLABLE_TUPLE_1 +
_CALL_TUPLE_1 +
+ POP_TOP +
_CHECK_PERIODIC_AT_END;
op(_CHECK_AND_ALLOCATE_OBJECT, (type_version/2, callable, self_or_null, unused[oparg] -- callable, self_or_null, unused[oparg])) {