[pypy-svn] r70359 - pypy/branch/virtual-forcing/pypy/module/pypyjit/test

arigo at codespeak.net arigo at codespeak.net
Wed Dec 30 16:10:29 CET 2009


Author: arigo
Date: Wed Dec 30 16:10:28 2009
New Revision: 70359

Modified:
   pypy/branch/virtual-forcing/pypy/module/pypyjit/test/test_pypy_c.py
Log:
Fix the test.  A bit fragile, but a setfield_gc ends up
here (it's delayed from a bit earlier).


Modified: pypy/branch/virtual-forcing/pypy/module/pypyjit/test/test_pypy_c.py
==============================================================================
--- pypy/branch/virtual-forcing/pypy/module/pypyjit/test/test_pypy_c.py	(original)
+++ pypy/branch/virtual-forcing/pypy/module/pypyjit/test/test_pypy_c.py	Wed Dec 30 16:10:28 2009
@@ -113,8 +113,8 @@
         assert result
         assert result.splitlines()[-1].strip() == 'OK :-)'
         self.parse_loops(logfilepath)
+        self.print_loops()
         if self.total_ops > expected_max_ops:
-            self.print_loops()
             assert 0, "too many operations: got %d, expected maximum %d" % (
                 self.total_ops, expected_max_ops)
 
@@ -267,7 +267,9 @@
         ops = self.get_by_bytecode("LOAD_ATTR")
         assert len(ops) == 2
         assert ops[0].get_opnames() == ["getfield_gc", "getarrayitem_gc",
+                                        "setfield_gc",  #  (*)
                                         "guard_nonnull_class"]
+        # (*) delayed write of the frames depth
         assert not ops[1] # second LOAD_ATTR folded away
 
     def test_default_and_kw(self):



More information about the Pypy-commit mailing list