[pypy-svn] r63700 - in pypy/branch/pyjitpl5-simplify/pypy/jit/backend/x86: . test

fijal at codespeak.net fijal at codespeak.net
Mon Apr 6 02:13:24 CEST 2009


Author: fijal
Date: Mon Apr  6 02:13:21 2009
New Revision: 63700

Modified:
   pypy/branch/pyjitpl5-simplify/pypy/jit/backend/x86/assembler.py
   pypy/branch/pyjitpl5-simplify/pypy/jit/backend/x86/test/test_runner.py
Log:
fix logging


Modified: pypy/branch/pyjitpl5-simplify/pypy/jit/backend/x86/assembler.py
==============================================================================
--- pypy/branch/pyjitpl5-simplify/pypy/jit/backend/x86/assembler.py	(original)
+++ pypy/branch/pyjitpl5-simplify/pypy/jit/backend/x86/assembler.py	Mon Apr  6 02:13:21 2009
@@ -124,7 +124,10 @@
             return
         if memo is None:
             memo = {}
-        args = ",".join([repr_of_arg(memo, arg) for arg in inputargs])
+        if inputargs is None:
+            args = ''
+        else:
+            args = ",".join([repr_of_arg(memo, arg) for arg in inputargs])
         os.write(self._log_fd, "LOOP %s\n" % args)
         for op in operations:
             args = ",".join([repr_of_arg(memo, arg) for arg in op.args])
@@ -134,7 +137,7 @@
                                                                  op.result))
             if op.is_guard():
                 os.write(self._log_fd, "BEGIN\n")
-                self.eventually_log_operations(inputargs, operations, memo)
+                self.eventually_log_operations(None, op.suboperations, memo)
                 os.write(self._log_fd, "END\n")
         os.write(self._log_fd, "LOOP END\n")
 

Modified: pypy/branch/pyjitpl5-simplify/pypy/jit/backend/x86/test/test_runner.py
==============================================================================
--- pypy/branch/pyjitpl5-simplify/pypy/jit/backend/x86/test/test_runner.py	(original)
+++ pypy/branch/pyjitpl5-simplify/pypy/jit/backend/x86/test/test_runner.py	Mon Apr  6 02:13:21 2009
@@ -474,7 +474,7 @@
         f = BoxInt()
         ops = [
             ResOperation(rop.OONONNULL, [p], f),
-            ResOperation(rop.GUARD_FALSE, [f], None),
+            ResOperation(rop.GUARD_TRUE, [f], None),
             ResOperation(rop.FAIL, [ConstInt(0)], None),
             ]
         ops[1].suboperations = [ResOperation(rop.FAIL, [ConstInt(1)], None)]
@@ -485,4 +485,4 @@
         loop.inputargs = [p]
         self.cpu.compile_operations(loop)
         op = self.cpu.execute_operations(loop, [p])
-        assert op.args[0].value == 1
+        assert op.args[0].value == 0



More information about the Pypy-commit mailing list