Author: Maciej Fijalkowski <[email protected]>
Branch: jitframe-on-heap
Changeset: r60473:0aeca905ae04
Date: 2013-01-25 19:47 +0200
http://bitbucket.org/pypy/pypy/changeset/0aeca905ae04/

Log:    if the gcmap is 0, just don't trace it. Also 0 it in finish

diff --git a/rpython/jit/backend/llsupport/jitframe.py 
b/rpython/jit/backend/llsupport/jitframe.py
--- a/rpython/jit/backend/llsupport/jitframe.py
+++ b/rpython/jit/backend/llsupport/jitframe.py
@@ -106,6 +106,8 @@
         no = fld >> (3 + 6)
         MAX = 64
     gcmap = (obj_addr + getofs('jf_gcmap')).address[0]
+    if not gcmap:
+        return llmemory.NULL
     gcmap_lgt = (gcmap + GCMAPLENGTHOFS).signed[0]
     while no < gcmap_lgt:
         cur = (gcmap + GCMAPBASEOFS + UNSIGN_SIZE * no).unsigned[0]
diff --git a/rpython/jit/backend/x86/assembler.py 
b/rpython/jit/backend/x86/assembler.py
--- a/rpython/jit/backend/x86/assembler.py
+++ b/rpython/jit/backend/x86/assembler.py
@@ -2019,7 +2019,13 @@
         base_ofs = self.cpu.get_baseofs_of_frame_field()
         self.mov(fail_descr_loc, RawStackLoc(ofs))
         gcmap = self.gcmap_for_finish
-        self.push_gcmap(self.mc, gcmap, store=True)
+        if op.getarg(0).type == REF:
+            self.push_gcmap(self.mc, gcmap, store=True)
+        else:
+            # note that the 0 here is redundant, but I would rather
+            # keep that one and kill all the others
+            ofs = self.cpu.get_ofs_of_frame_field('jf_gcmap')
+            self.mc.MOV_bi(ofs, 0)
         self.mc.LEA_rb(eax.value, -base_ofs)
         # exit function
         self._call_footer()
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to