[pypy-commit] pypy inline-dict-ops: fix annotations for zrpy tests

fijal noreply at buildbot.pypy.org
Fri Oct 21 07:38:15 CEST 2011


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: inline-dict-ops
Changeset: r48296:d0bcf756f012
Date: 2011-10-21 07:38 +0200
http://bitbucket.org/pypy/pypy/changeset/d0bcf756f012/

Log:	fix annotations for zrpy tests

diff --git a/pypy/jit/codewriter/assembler.py b/pypy/jit/codewriter/assembler.py
--- a/pypy/jit/codewriter/assembler.py
+++ b/pypy/jit/codewriter/assembler.py
@@ -246,9 +246,13 @@
             addr = llmemory.cast_ptr_to_adr(value)
             self.list_of_addr2name.append((addr, name))
 
-    def finished(self, callinfocollection):
+    def finished(self, callinfocollection, cpu):
         # Helper called at the end of assembling.  Registers the extra
         # functions shown in _callinfo_for_oopspec.
         for func in callinfocollection.all_function_addresses_as_int():
             func = heaptracker.int2adr(func)
             self.see_raw_object(func.ptr)
+        # register at least one interiorfielddescr
+        if hasattr(cpu, 'interiorfielddescrof'):
+            _T = lltype.GcArray(lltype.Struct('x', ('field', lltype.Signed)))
+            self.descrs.append(cpu.interiorfielddescrof(_T, 'field'))
diff --git a/pypy/jit/codewriter/codewriter.py b/pypy/jit/codewriter/codewriter.py
--- a/pypy/jit/codewriter/codewriter.py
+++ b/pypy/jit/codewriter/codewriter.py
@@ -73,7 +73,7 @@
             count += 1
             if not count % 500:
                 log.info("Produced %d jitcodes" % count)
-        self.assembler.finished(self.callcontrol.callinfocollection)
+        self.assembler.finished(self.callcontrol.callinfocollection, self.cpu)
         heaptracker.finish_registering(self.cpu)
         log.info("there are %d JitCode instances." % count)
 


More information about the pypy-commit mailing list