diff Python/ceval.c @ 27201:dc6fb8a6af3d legacy-trunk

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.
author Raymond Hettinger <python@rcn.com>
date Fri, 10 Jan 2003 16:45:17 +0000
parents 92812f6cd63b
children 3afbd55fb18f
line wrap: on
line diff
--- a/Python/ceval.c	Fri Jan 10 15:31:15 2003 +0000
+++ b/Python/ceval.c	Fri Jan 10 16:45:17 2003 +0000
@@ -553,12 +553,10 @@
 #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 @@
 				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?)");