#ifdef DXPAIRS
int lastopcode = 0;
#endif
- PyObject **stack_pointer; /* Next free slot in value stack */
+ register PyObject **stack_pointer; /* Next free slot in value stack */
register unsigned char *next_instr;
- register int opcode=0; /* Current opcode */
- register int oparg=0; /* Current opcode argument, if any */
+ register int opcode; /* Current opcode */
+ register int oparg; /* Current opcode argument, if any */
register enum why_code why; /* Reason for block stack unwind */
register int err; /* Error status -- nonzero if error */
register PyObject *x; /* Result object -- NULL if error */
/* Extract opcode and argument */
opcode = NEXTOP();
+ oparg = 0; /* allows oparg to be stored in a register because
+ it doesn't have to be remembered across a full loop */
if (HAS_ARG(opcode))
oparg = NEXTARG();
dispatch_opcode:
continue;
case CALL_FUNCTION:
+ {
+ PyObject **sp;
PCALL(PCALL_ALL);
+ sp = stack_pointer;
#ifdef WITH_TSC
- x = call_function(&stack_pointer, oparg, &intr0, &intr1);
+ x = call_function(&sp, oparg, &intr0, &intr1);
#else
- x = call_function(&stack_pointer, oparg);
+ x = call_function(&sp, oparg);
#endif
+ stack_pointer = sp;
PUSH(x);
if (x != NULL)
continue;
break;
+ }
case CALL_FUNCTION_VAR:
case CALL_FUNCTION_KW:
int nk = (oparg>>8) & 0xff;
int flags = (opcode - CALL_FUNCTION) & 3;
int n = na + 2 * nk;
- PyObject **pfunc, *func;
+ PyObject **pfunc, *func, **sp;
PCALL(PCALL_ALL);
if (flags & CALL_FLAG_VAR)
n++;
n++;
} else
Py_INCREF(func);
+ sp = stack_pointer;
#ifdef WITH_TSC
rdtscll(intr0);
#endif
- x = ext_do_call(func, &stack_pointer, flags, na, nk);
+ x = ext_do_call(func, &sp, flags, na, nk);
#ifdef WITH_TSC
rdtscll(intr1);
#endif
+ stack_pointer = sp;
Py_DECREF(func);
while (stack_pointer > pfunc) {