summaryrefslogtreecommitdiffstats
path: root/Python/executor_cases.c.h
diff options
context:
space:
mode:
Diffstat (limited to 'Python/executor_cases.c.h')
-rw-r--r--Python/executor_cases.c.h39
1 files changed, 15 insertions, 24 deletions
diff --git a/Python/executor_cases.c.h b/Python/executor_cases.c.h
index 938a80f..9bfb13e 100644
--- a/Python/executor_cases.c.h
+++ b/Python/executor_cases.c.h
@@ -6350,20 +6350,12 @@
}
case _MAKE_CALLARGS_A_TUPLE: {
- _PyStackRef kwargs_in;
_PyStackRef callargs;
_PyStackRef func;
- _PyStackRef tuple;
- _PyStackRef kwargs_out;
- kwargs_in = stack_pointer[-1];
callargs = stack_pointer[-2];
func = stack_pointer[-4];
PyObject *callargs_o = PyStackRef_AsPyObjectBorrow(callargs);
- if (PyTuple_CheckExact(callargs_o)) {
- tuple = callargs;
- kwargs_out = kwargs_in;
- }
- else {
+ if (!PyTuple_CheckExact(callargs_o)) {
_PyFrame_SetStackPointer(frame, stack_pointer);
int err = _Py_Check_ArgsIterable(tstate, PyStackRef_AsPyObjectBorrow(func), callargs_o);
stack_pointer = _PyFrame_GetStackPointer(frame);
@@ -6376,17 +6368,14 @@
if (tuple_o == NULL) {
JUMP_TO_ERROR();
}
- kwargs_out = kwargs_in;
- stack_pointer += -2;
- assert(WITHIN_STACK_BOUNDS());
+ _PyStackRef temp = callargs;
+ callargs = PyStackRef_FromPyObjectSteal(tuple_o);
+ stack_pointer[-2] = callargs;
_PyFrame_SetStackPointer(frame, stack_pointer);
- PyStackRef_CLOSE(callargs);
+ PyStackRef_CLOSE(temp);
stack_pointer = _PyFrame_GetStackPointer(frame);
- tuple = PyStackRef_FromPyObjectSteal(tuple_o);
- stack_pointer += 2;
}
- stack_pointer[-2] = tuple;
- stack_pointer[-1] = kwargs_out;
+ stack_pointer[-2] = callargs;
break;
}
@@ -6631,15 +6620,17 @@
}
case _SWAP: {
- _PyStackRef *top;
- _PyStackRef *bottom;
+ _PyStackRef top;
+ _PyStackRef bottom;
oparg = CURRENT_OPARG();
- top = &stack_pointer[-1];
- bottom = &stack_pointer[-2 - (oparg-2)];
- _PyStackRef temp = bottom[0];
- bottom[0] = top[0];
- top[0] = temp;
+ top = stack_pointer[-1];
+ bottom = stack_pointer[-2 - (oparg-2)];
+ _PyStackRef temp = bottom;
+ bottom = top;
+ top = temp;
assert(oparg >= 2);
+ stack_pointer[-2 - (oparg-2)] = bottom;
+ stack_pointer[-1] = top;
break;
}