[pypy-svn] r75532 - in pypy/branch/fast-forward/pypy/interpreter/astcompiler: . test

benjamin at codespeak.net benjamin at codespeak.net
Wed Jun 23 19:26:55 CEST 2010


Author: benjamin
Date: Wed Jun 23 19:26:54 2010
New Revision: 75532

Modified:
   pypy/branch/fast-forward/pypy/interpreter/astcompiler/codegen.py
   pypy/branch/fast-forward/pypy/interpreter/astcompiler/test/test_compiler.py
Log:
must indicate that this is absolute

Modified: pypy/branch/fast-forward/pypy/interpreter/astcompiler/codegen.py
==============================================================================
--- pypy/branch/fast-forward/pypy/interpreter/astcompiler/codegen.py	(original)
+++ pypy/branch/fast-forward/pypy/interpreter/astcompiler/codegen.py	Wed Jun 23 19:26:54 2010
@@ -851,7 +851,7 @@
             self.emit_op(ops.ROT_THREE)
             op_kind = compare_operations(comp.ops[i - 1])
             self.emit_op_arg(ops.COMPARE_OP, op_kind)
-            self.emit_jump(ops.JUMP_IF_FALSE_OR_POP, cleanup)
+            self.emit_jump(ops.JUMP_IF_FALSE_OR_POP, cleanup, True)
             if i < (ops_count - 1):
                 comp.comparators[i].walkabout(self)
         comp.comparators[-1].walkabout(self)

Modified: pypy/branch/fast-forward/pypy/interpreter/astcompiler/test/test_compiler.py
==============================================================================
--- pypy/branch/fast-forward/pypy/interpreter/astcompiler/test/test_compiler.py	(original)
+++ pypy/branch/fast-forward/pypy/interpreter/astcompiler/test/test_compiler.py	Wed Jun 23 19:26:54 2010
@@ -130,6 +130,9 @@
             expected = eval("0 %s 11" % operator)
             yield self.simple_test, "x = 0 %s 11" % operator, "x", expected
 
+    def test_compare(self):
+        yield self.st, "x = 2; y = 5; y; h = 1 < x >= 3 < x", "h", False
+
     def test_augmented_assignment(self):
         for operator in ['+', '-', '*', '**', '/', '&', '|', '^', '//',
                          '<<', '>>']:



More information about the Pypy-commit mailing list