diff --exclude=CVS -c -r bed_0/python/dist/src/Doc/lib/libdis.tex bed_1/python/dist/src/Doc/lib/libdis.tex *** bed_0/python/dist/src/Doc/lib/libdis.tex Sat May 10 04:51:26 2003 --- bed_1/python/dist/src/Doc/lib/libdis.tex Tue Mar 23 20:24:22 2004 *************** *** 135,145 **** to position three. \end{opcodedesc} - \begin{opcodedesc}{ROT_FOUR}{} - Lifts second, third and forth stack item one position up, moves top down to - position four. - \end{opcodedesc} - \begin{opcodedesc}{DUP_TOP}{} Duplicates the reference on top of the stack. \end{opcodedesc} --- 135,140 ---- *************** *** 498,504 **** \begin{opcodedesc}{BUILD_TUPLE}{count} Creates a tuple consuming \var{count} items from the stack, and pushes ! the resulting tuple onto the stack. \end{opcodedesc} \begin{opcodedesc}{BUILD_LIST}{count} --- 493,500 ---- \begin{opcodedesc}{BUILD_TUPLE}{count} Creates a tuple consuming \var{count} items from the stack, and pushes ! the resulting tuple onto the stack. The top item on the stack will ! become the last item in the tuple. \end{opcodedesc} \begin{opcodedesc}{BUILD_LIST}{count} diff --exclude=CVS -c -r bed_0/python/dist/src/Include/opcode.h bed_1/python/dist/src/Include/opcode.h *** bed_0/python/dist/src/Include/opcode.h Sun Mar 7 02:31:05 2004 --- bed_1/python/dist/src/Include/opcode.h Tue Mar 23 20:25:41 2004 *************** *** 12,18 **** #define ROT_TWO 2 #define ROT_THREE 3 #define DUP_TOP 4 - #define ROT_FOUR 5 #define UNARY_POSITIVE 10 #define UNARY_NEGATIVE 11 --- 12,17 ---- diff --exclude=CVS -c -r bed_0/python/dist/src/Lib/compiler/pycodegen.py bed_1/python/dist/src/Lib/compiler/pycodegen.py *** bed_0/python/dist/src/Lib/compiler/pycodegen.py Sun Mar 21 10:18:50 2004 --- bed_1/python/dist/src/Lib/compiler/pycodegen.py Sun Apr 4 17:35:54 2004 *************** *** 898,904 **** if slice == 0: self.emit('ROT_TWO') elif slice == 3: ! self.emit('ROT_FOUR') else: self.emit('ROT_THREE') self.emit('STORE_SLICE+%d' % slice) --- 898,914 ---- if slice == 0: self.emit('ROT_TWO') elif slice == 3: ! # NOTE: This tricky bit of swapping is equivalent ! # to a single ROT_FOUR. It is used here only ! # because there is no ROT_FOUR opcode. ! self.emit('ROT_THREE') ! self.emit('BUILD_TUPLE', 2) ! self.emit('ROT_THREE') ! self.emit('ROT_THREE') ! self.emit('ROT_TWO') ! self.emit('UNPACK_SEQUENCE', 2) ! self.emit('ROT_TWO') ! # END of a ROT_FOUR else: self.emit('ROT_THREE') self.emit('STORE_SLICE+%d' % slice) diff --exclude=CVS -c -r bed_0/python/dist/src/Lib/opcode.py bed_1/python/dist/src/Lib/opcode.py *** bed_0/python/dist/src/Lib/opcode.py Sun Mar 7 02:31:05 2004 --- bed_1/python/dist/src/Lib/opcode.py Tue Mar 23 20:27:21 2004 *************** *** 47,53 **** def_op('ROT_TWO', 2) def_op('ROT_THREE', 3) def_op('DUP_TOP', 4) - def_op('ROT_FOUR', 5) def_op('UNARY_POSITIVE', 10) def_op('UNARY_NEGATIVE', 11) --- 47,52 ---- diff --exclude=CVS -c -r bed_0/python/dist/src/Misc/NEWS bed_1/python/dist/src/Misc/NEWS *** bed_0/python/dist/src/Misc/NEWS Thu Apr 15 20:55:20 2004 --- bed_1/python/dist/src/Misc/NEWS Thu Apr 15 20:57:42 2004 *************** *** 12,17 **** --- 12,20 ---- Core and builtins ----------------- + - Removed ROT_FOUR opcode. It was previously used only for augmented + assignments to a slice. + - Enabled the profiling of C extension functions (and builtins) - check new documentation and modified profiler and bdb modules for more details diff --exclude=CVS -c -r bed_0/python/dist/src/Python/ceval.c bed_1/python/dist/src/Python/ceval.c *** bed_0/python/dist/src/Python/ceval.c Thu Apr 15 20:55:30 2004 --- bed_1/python/dist/src/Python/ceval.c Thu Apr 15 21:17:34 2004 *************** *** 666,676 **** #define TOP() (stack_pointer[-1]) #define SECOND() (stack_pointer[-2]) #define THIRD() (stack_pointer[-3]) - #define FOURTH() (stack_pointer[-4]) #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 BASIC_STACKADJ(n) (stack_pointer += n) #define BASIC_PUSH(v) (*stack_pointer++ = (v)) #define BASIC_POP() (*--stack_pointer) --- 666,674 ---- *************** *** 942,958 **** SET_TOP(w); SET_SECOND(x); SET_THIRD(v); - goto fast_next_opcode; - - case ROT_FOUR: - u = TOP(); - v = SECOND(); - w = THIRD(); - x = FOURTH(); - SET_TOP(v); - SET_SECOND(w); - SET_THIRD(x); - SET_FOURTH(u); goto fast_next_opcode; case DUP_TOP: --- 940,945 ---- Only in bed_1/python/dist/src/Python: ceval.c~ diff --exclude=CVS -c -r bed_0/python/dist/src/Python/compile.c bed_1/python/dist/src/Python/compile.c *** bed_0/python/dist/src/Python/compile.c Mon Mar 22 12:52:53 2004 --- bed_1/python/dist/src/Python/compile.c Thu Apr 15 21:03:49 2004 *************** *** 1847,1853 **** com_node(c, augn); com_addbyte(c, opcode); com_pop(c, 1); ! com_addbyte(c, ROT_FOUR); com_addbyte(c, STORE_SLICE+3); com_pop(c, 4); } --- 1847,1865 ---- com_node(c, augn); com_addbyte(c, opcode); com_pop(c, 1); ! /* We want a ROT_FOUR, but since this is the ONLY place ! where one is needed there's no such opcode. So we fake it ! by stuffing two items temporarily into a tuple while we ! juggle. */ ! /* Begin a ROT_FOUR... */ ! com_addbyte(c, ROT_THREE); ! com_addoparg(c, BUILD_TUPLE, 2); ! com_addbyte(c, ROT_THREE); ! com_addbyte(c, ROT_THREE); ! com_addbyte(c, ROT_TWO); ! com_addoparg(c, UNPACK_SEQUENCE, 2); ! com_addbyte(c, ROT_TWO); ! /* ...End a ROT_FOUR */ com_addbyte(c, STORE_SLICE+3); com_pop(c, 4); }