[pypy-svn] r78395 - pypy/trunk/pypy/module/pypyjit/test

arigo at codespeak.net arigo at codespeak.net
Thu Oct 28 12:39:15 CEST 2010


Author: arigo
Date: Thu Oct 28 12:39:13 2010
New Revision: 78395

Modified:
   pypy/trunk/pypy/module/pypyjit/test/test_pypy_c.py
Log:
Fix and document this test.

Modified: pypy/trunk/pypy/module/pypyjit/test/test_pypy_c.py
==============================================================================
--- pypy/trunk/pypy/module/pypyjit/test/test_pypy_c.py	(original)
+++ pypy/trunk/pypy/module/pypyjit/test/test_pypy_c.py	Thu Oct 28 12:39:13 2010
@@ -294,7 +294,11 @@
 
         ops = self.get_by_bytecode("LOAD_ATTR")
         assert len(ops) == 2
-        assert ops[0].get_opnames() == ["getfield_gc", "getarrayitem_gc",
+        # With mapdict, we get fast access to (so far) the 5 first
+        # attributes, which means it is done with only the following
+        # operations.  (For the other attributes there is additionally
+        # a getarrayitem_gc.)
+        assert ops[0].get_opnames() == ["getfield_gc",
                                         "guard_nonnull_class"]
         assert not ops[1] # second LOAD_ATTR folded away
 



More information about the Pypy-commit mailing list