[Python-checkins] python/dist/src/Python compile.c,2.266,2.267

niemeyer@users.sourceforge.net niemeyer@users.sourceforge.net
Mon, 16 Dec 2002 05:54:04 -0800


Update of /cvsroot/python/python/dist/src/Python
In directory sc8-pr-cvs1:/tmp/cvs-serv20669/Python

Modified Files:
	compile.c 
Log Message:
Fixing bug

[#448679] Left to right

* Python/compile.c
  (com_dictmaker): Reordered evaluation of dictionaries to follow strict
  LTR evaluation.

* Lib/compiler/pycodegen.py
  (CodeGenerator.visitDict): Reordered evaluation of dictionaries to
  follow strict LTR evaluation.

* Doc/ref/ref5.tex
  Documented the general LTR evaluation order idea.

* Misc/NEWS
  Documented change in evaluation order of dictionaries.


Index: compile.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v
retrieving revision 2.266
retrieving revision 2.267
diff -C2 -d -r2.266 -r2.267
*** compile.c	11 Dec 2002 14:04:58 -0000	2.266
--- compile.c	16 Dec 2002 13:54:02 -0000	2.267
***************
*** 1530,1536 ****
  		com_addbyte(c, DUP_TOP);
  		com_push(c, 1);
- 		com_node(c, CHILD(n, i+2)); /* value */
- 		com_addbyte(c, ROT_TWO);
  		com_node(c, CHILD(n, i)); /* key */
  		com_addbyte(c, STORE_SUBSCR);
  		com_pop(c, 3);
--- 1530,1536 ----
  		com_addbyte(c, DUP_TOP);
  		com_push(c, 1);
  		com_node(c, CHILD(n, i)); /* key */
+ 		com_node(c, CHILD(n, i+2)); /* value */
+ 		com_addbyte(c, ROT_THREE);
  		com_addbyte(c, STORE_SUBSCR);
  		com_pop(c, 3);