[pypy-svn] r77383 - pypy/branch/jit-str/pypy/jit/codewriter

arigo at codespeak.net arigo at codespeak.net
Sun Sep 26 17:45:47 CEST 2010


Author: arigo
Date: Sun Sep 26 17:45:46 2010
New Revision: 77383

Modified:
   pypy/branch/jit-str/pypy/jit/codewriter/assembler.py
   pypy/branch/jit-str/pypy/jit/codewriter/codewriter.py
Log:
Fix for metainterp/test/test_ztranslation.py.

Actually fixes the fact that the log printer did not know about the extra
helpers introduced by jtransform (the variants of string equality).


Modified: pypy/branch/jit-str/pypy/jit/codewriter/assembler.py
==============================================================================
--- pypy/branch/jit-str/pypy/jit/codewriter/assembler.py	(original)
+++ pypy/branch/jit-str/pypy/jit/codewriter/assembler.py	Sun Sep 26 17:45:46 2010
@@ -232,3 +232,11 @@
                 return
             addr = llmemory.cast_ptr_to_adr(value)
             self.list_of_addr2name.append((addr, name))
+
+    def finished(self):
+        # Helper called at the end of assembling.  Registers the extra
+        # functions shown in _callinfo_for_oopspec.
+        from pypy.jit.codewriter.effectinfo import _callinfo_for_oopspec
+        for _, func in _callinfo_for_oopspec.values():
+            func = heaptracker.int2adr(func)
+            self.see_raw_object(func.ptr)

Modified: pypy/branch/jit-str/pypy/jit/codewriter/codewriter.py
==============================================================================
--- pypy/branch/jit-str/pypy/jit/codewriter/codewriter.py	(original)
+++ pypy/branch/jit-str/pypy/jit/codewriter/codewriter.py	Sun Sep 26 17:45:46 2010
@@ -73,6 +73,7 @@
             count += 1
             if not count % 500:
                 log.info("Produced %d jitcodes" % count)
+        self.assembler.finished()
         heaptracker.finish_registering(self.cpu)
         log.info("there are %d JitCode instances." % count)
 



More information about the Pypy-commit mailing list