From: <pj...@us...> - 2008-10-12 20:10:17
|
Revision: 5380 http://jython.svn.sourceforge.net/jython/?rev=5380&view=rev Author: pjenvey Date: 2008-10-12 20:10:04 +0000 (Sun, 12 Oct 2008) Log Message: ----------- fix bad bytecode generated for: a[[b for b, c in d]] = e the store was losing track of the value (e) here because the list comp/tuple unpack combo overwrote where e's location was held Modified Paths: -------------- trunk/jython/src/org/python/compiler/CodeCompiler.java Modified: trunk/jython/src/org/python/compiler/CodeCompiler.java =================================================================== --- trunk/jython/src/org/python/compiler/CodeCompiler.java 2008-10-12 16:28:15 UTC (rev 5379) +++ trunk/jython/src/org/python/compiler/CodeCompiler.java 2008-10-12 20:10:04 UTC (rev 5380) @@ -1604,6 +1604,7 @@ return Slice(node, (Slice) node.slice); } + int value = temporary; expr_contextType ctx = node.ctx; if (node.ctx == expr_contextType.AugStore && augmode == expr_contextType.Store) { restoreAugTmps(node, 2); @@ -1627,7 +1628,7 @@ return null; case Param: case Store: - code.aload(temporary); + code.aload(value); code.invokevirtual("org/python/core/PyObject", "__setitem__", "(" + $pyObj + $pyObj + ")V"); return null; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |