As discussed on python-dev, removed from DUP_TOPX support for the

parameter being either four or five.  Currently, compile.c does not
generate calls with a parameter higher than three.

May have to be reverted if the second alpha or beta shakes out some
other tool generating this op code with a parameter of four or five.
This commit is contained in:
Raymond Hettinger 2003-01-10 16:45:17 +00:00
parent 37aa066164
commit 71731d7f70
1 changed files with 0 additions and 35 deletions

View File

@ -553,12 +553,10 @@ eval_frame(PyFrameObject *f)
#define SECOND() (stack_pointer[-2])
#define THIRD() (stack_pointer[-3])
#define FOURTH() (stack_pointer[-4])
#define FIFTH() (stack_pointer[-5])
#define SET_TOP(v) (stack_pointer[-1] = (v))
#define SET_SECOND(v) (stack_pointer[-2] = (v))
#define SET_THIRD(v) (stack_pointer[-3] = (v))
#define SET_FOURTH(v) (stack_pointer[-4] = (v))
#define SET_FIFTH(v) (stack_pointer[-5] = (v))
#define BASIC_STACKADJ(n) (stack_pointer += n)
#define BASIC_PUSH(v) (*stack_pointer++ = (v))
#define BASIC_POP() (*--stack_pointer)
@ -885,39 +883,6 @@ eval_frame(PyFrameObject *f)
SET_SECOND(w);
SET_THIRD(v);
continue;
case 4:
x = TOP();
Py_INCREF(x);
w = SECOND();
Py_INCREF(w);
v = THIRD();
Py_INCREF(v);
u = FOURTH();
Py_INCREF(u);
STACKADJ(4);
SET_TOP(x);
SET_SECOND(w);
SET_THIRD(v);
SET_FOURTH(u);
continue;
case 5:
x = TOP();
Py_INCREF(x);
w = SECOND();
Py_INCREF(w);
v = THIRD();
Py_INCREF(v);
u = FOURTH();
Py_INCREF(u);
t = FIFTH();
Py_INCREF(t);
STACKADJ(5);
SET_TOP(x);
SET_SECOND(w);
SET_THIRD(v);
SET_FOURTH(u);
SET_FIFTH(t);
continue;
default:
Py_FatalError("invalid argument to DUP_TOPX"
" (bytecode corruption?)");