Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 71731d7

Browse files
committed
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.
1 parent 37aa066 commit 71731d7

1 file changed

Lines changed: 0 additions & 35 deletions

File tree

Python/ceval.c

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -553,12 +553,10 @@ eval_frame(PyFrameObject *f)
553553
#define SECOND() (stack_pointer[-2])
554554
#define THIRD() (stack_pointer[-3])
555555
#define FOURTH() (stack_pointer[-4])
556-
#define FIFTH() (stack_pointer[-5])
557556
#define SET_TOP(v) (stack_pointer[-1] = (v))
558557
#define SET_SECOND(v) (stack_pointer[-2] = (v))
559558
#define SET_THIRD(v) (stack_pointer[-3] = (v))
560559
#define SET_FOURTH(v) (stack_pointer[-4] = (v))
561-
#define SET_FIFTH(v) (stack_pointer[-5] = (v))
562560
#define BASIC_STACKADJ(n) (stack_pointer += n)
563561
#define BASIC_PUSH(v) (*stack_pointer++ = (v))
564562
#define BASIC_POP() (*--stack_pointer)
@@ -885,39 +883,6 @@ eval_frame(PyFrameObject *f)
885883
SET_SECOND(w);
886884
SET_THIRD(v);
887885
continue;
888-
case 4:
889-
x = TOP();
890-
Py_INCREF(x);
891-
w = SECOND();
892-
Py_INCREF(w);
893-
v = THIRD();
894-
Py_INCREF(v);
895-
u = FOURTH();
896-
Py_INCREF(u);
897-
STACKADJ(4);
898-
SET_TOP(x);
899-
SET_SECOND(w);
900-
SET_THIRD(v);
901-
SET_FOURTH(u);
902-
continue;
903-
case 5:
904-
x = TOP();
905-
Py_INCREF(x);
906-
w = SECOND();
907-
Py_INCREF(w);
908-
v = THIRD();
909-
Py_INCREF(v);
910-
u = FOURTH();
911-
Py_INCREF(u);
912-
t = FIFTH();
913-
Py_INCREF(t);
914-
STACKADJ(5);
915-
SET_TOP(x);
916-
SET_SECOND(w);
917-
SET_THIRD(v);
918-
SET_FOURTH(u);
919-
SET_FIFTH(t);
920-
continue;
921886
default:
922887
Py_FatalError("invalid argument to DUP_TOPX"
923888
" (bytecode corruption?)");

0 commit comments

Comments
 (0)