[Python-checkins] python/dist/src/Lib/compiler pycodegen.py,1.61,1.62

niemeyer@users.sourceforge.net niemeyer@users.sourceforge.net
2002年12月16日 05:54:03 -0800


Update of /cvsroot/python/python/dist/src/Lib/compiler
In directory sc8-pr-cvs1:/tmp/cvs-serv20669/Lib/compiler
Modified Files:
	pycodegen.py 
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: pycodegen.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/compiler/pycodegen.py,v
retrieving revision 1.61
retrieving revision 1.62
diff -C2 -d -r1.61 -r1.62
*** pycodegen.py	6 Jun 2002 18:30:10 -0000	1.61
--- pycodegen.py	16 Dec 2002 13:54:01 -0000	1.62
***************
*** 1130,1136 ****
 lineno = lineno2
 self.emit('DUP_TOP')
- self.visit(v)
- self.emit('ROT_TWO')
 self.visit(k)
 self.emit('STORE_SUBSCR')
 
--- 1130,1136 ----
 lineno = lineno2
 self.emit('DUP_TOP')
 self.visit(k)
+ self.visit(v)
+ self.emit('ROT_THREE')
 self.emit('STORE_SUBSCR')
 

AltStyle によって変換されたページ (->オリジナル) /