[pypy-commit] pypy jitframe-on-heap: kill code

bivab noreply at buildbot.pypy.org
Fri Feb 8 18:09:06 CET 2013


Author: David Schneider <david.schneider at picle.org>
Branch: jitframe-on-heap
Changeset: r60983:cfec96854f0e
Date: 2013-02-08 17:43 +0100
http://bitbucket.org/pypy/pypy/changeset/cfec96854f0e/

Log:	kill code

diff --git a/rpython/jit/backend/arm/assembler.py b/rpython/jit/backend/arm/assembler.py
--- a/rpython/jit/backend/arm/assembler.py
+++ b/rpython/jit/backend/arm/assembler.py
@@ -1345,36 +1345,11 @@
         # malloc_slowpath in case we called malloc_slowpath, which returns the
         # new value of nursery_free_adr in r1 and the adr of the new object in
         # r0.
-        self.mark_gc_roots(self.write_new_force_index(),
-                           use_copy_area=True)
         self.mc.BL(self.malloc_slowpath, c=c.HI)
 
         self.mc.gen_load_int(r.ip.value, nursery_free_adr)
         self.mc.STR_ri(r.r1.value, r.ip.value)
 
-    def mark_gc_roots(self, force_index, use_copy_area=False):
-        if force_index < 0:
-            return     # not needed
-        gcrootmap = self.cpu.gc_ll_descr.gcrootmap
-        if gcrootmap:
-            mark = self._regalloc.get_mark_gc_roots(gcrootmap, use_copy_area)
-            assert gcrootmap.is_shadow_stack
-            gcrootmap.write_callshape(mark, force_index)
-
-    def write_new_force_index(self):
-        # for shadowstack only: get a new, unused force_index number and
-        # write it to FORCE_INDEX_OFS.  Used to record the call shape
-        # (i.e. where the GC pointers are in the stack) around a CALL
-        # instruction that doesn't already have a force_index.
-        gcrootmap = self.cpu.gc_ll_descr.gcrootmap
-        if gcrootmap and gcrootmap.is_shadow_stack:
-            clt = self.current_clt
-            force_index = clt.reserve_and_record_some_faildescr_index()
-            self._write_fail_index(force_index)
-            return force_index
-        else:
-            return 0
-
     def push_gcmap(self, mc, gcmap, push=False, mov=False, store=False):
         ptr = rffi.cast(lltype.Signed, gcmap)
         if push:
diff --git a/rpython/jit/backend/arm/opassembler.py b/rpython/jit/backend/arm/opassembler.py
--- a/rpython/jit/backend/arm/opassembler.py
+++ b/rpython/jit/backend/arm/opassembler.py
@@ -398,7 +398,6 @@
             assert adr.is_reg()
         if adr.is_reg():
             self.mc.BLX(adr.value)
-        self.mark_gc_roots(force_index)
         self._restore_sp(stack_args, fcond)
 
         # ensure the result is wellformed and stored in the correct location
@@ -1371,23 +1370,6 @@
         with saved_registers(self.mc, regs_to_save, vfp_regs_to_save):
             self._emit_call(NO_FORCE_INDEX, imm(self.reacqgil_addr), [], fcond)
 
-    def write_new_force_index(self):
-        # for shadowstack only: get a new, unused force_index number and
-        # write it to FORCE_INDEX_OFS.  Used to record the call shape
-        # (i.e. where the GC pointers are in the stack) around a CALL
-        # instruction that doesn't already have a force_index.
-        gcrootmap = self.cpu.gc_ll_descr.gcrootmap
-        if gcrootmap and gcrootmap.is_shadow_stack:
-            clt = self.current_clt
-            force_index = clt.reserve_and_record_some_faildescr_index()
-            self._write_fail_index(force_index)
-            return force_index
-        else:
-            return 0
-
-    def _write_fail_index(self, fail_index):
-        self.mc.gen_load_int(r.ip.value, fail_index)
-        self.mc.STR_ri(r.ip.value, r.fp.value)
 
     def emit_op_call_malloc_gc(self, op, arglocs, regalloc, fcond):
         self.emit_op_call(op, arglocs, regalloc, fcond)


More information about the pypy-commit mailing list