[pypy-svn] r37365 - pypy/dist/pypy/jit/timeshifter

pedronis at codespeak.net pedronis at codespeak.net
Thu Jan 25 23:59:22 CET 2007


Author: pedronis
Date: Thu Jan 25 23:59:10 2007
New Revision: 37365

Modified:
   pypy/dist/pypy/jit/timeshifter/rcontainer.py
   pypy/dist/pypy/jit/timeshifter/rtimeshift.py
   pypy/dist/pypy/jit/timeshifter/rvirtualizable.py
Log:
touch_store -> touch_update

accumulate directly gvars and not boxes in make_rti



Modified: pypy/dist/pypy/jit/timeshifter/rcontainer.py
==============================================================================
--- pypy/dist/pypy/jit/timeshifter/rcontainer.py	(original)
+++ pypy/dist/pypy/jit/timeshifter/rcontainer.py	Thu Jan 25 23:59:10 2007
@@ -191,7 +191,7 @@
     _attrs_  =  """redirected_fielddescs
                     base_desc rti_desc access_desc
                     gv_access
-                    touch_store
+                    touch_update
                     gv_access_is_null_ptr access_is_null_token
                     get_rti_ptr set_rti_ptr
                  """.split()
@@ -233,7 +233,7 @@
         self._fill_access('touched',   access_touched)
         self.gv_access = RGenOp.constPrebuiltGlobal(access_untouched)
 
-        self.touch_store = rvirtualizable.define_touch_store(TOPPTR,
+        self.touch_update = rvirtualizable.define_touch_update(TOPPTR,
                                 self.redirected_fielddescs,
                                 access_touched)
 
@@ -609,7 +609,7 @@
         vrti = rvirtualizable.VirtualStructRTI(rgenop, bitmask)
         memo.containers[self] = vrti
 
-        varboxes = memo.framevarboxes
+        vars_gv = memo.framevars_gv
         varindexes = vrti.varindexes
         vrtis = vrti.vrtis
         j = -1
@@ -617,7 +617,7 @@
             if box.genvar:
                 varindexes.append(memo.frameindex)
                 memo.frameindex += 1
-                varboxes.append(box)
+                vars_gv.append(box.genvar)
             else:
                 varindexes.append(j)
                 assert isinstance(box, rvalue.PtrRedBox)
@@ -710,11 +710,11 @@
         assert isinstance(typedesc, VirtualizableStructTypeDesc)        
         rgenop = jitstate.curbuilder.rgenop
         vable_rti = rvirtualizable.VirtualizableRTI(rgenop, 0)
-        vable_rti.touch_store = typedesc.touch_store
+        vable_rti.touch_update = typedesc.touch_update
         memo.containers[self] = vable_rti
         
-        varboxes = memo.framevarboxes
-        varboxes.append(outsidebox)
+        vars_gv = memo.framevars_gv
+        vars_gv.append(gv_outside)
         getset_rti = (memo.frameindex,
                       typedesc.get_rti_ptr,
                       typedesc.set_rti_ptr)
@@ -729,7 +729,7 @@
             if box.genvar:
                 varindexes.append(memo.frameindex)
                 memo.frameindex += 1
-                varboxes.append(box)
+                vars_gv.append(box.genvar)
             else:
                 varindexes.append(j)
                 assert isinstance(box, rvalue.PtrRedBox)

Modified: pypy/dist/pypy/jit/timeshifter/rtimeshift.py
==============================================================================
--- pypy/dist/pypy/jit/timeshifter/rtimeshift.py	(original)
+++ pypy/dist/pypy/jit/timeshifter/rtimeshift.py	Thu Jan 25 23:59:10 2007
@@ -903,7 +903,7 @@
             memo = rvalue.make_vinfo_memo()
             memo.bitcount = 0
             memo.frameindex = 0
-            memo.framevarboxes = []
+            memo.framevars_gv = []
             memo.vable_getset_rtis = []
             vable_rtis = []
             for virtualizable_box in virtualizables:
@@ -912,10 +912,7 @@
                 vable_rtis.append(content.make_rti(self, memo))
             assert memo.bitcount < 32
             gv_base = builder.genop_get_frame_base()
-            framevars_gv = []
-            for varbox in memo.framevarboxes:
-                framevars_gv.append(varbox.genvar)
-            frameinfo = builder.get_frame_info(framevars_gv)
+            frameinfo = builder.get_frame_info(memo.framevars_gv)
             vable_getset_rtis = memo.vable_getset_rtis
             for i in range(len(virtualizables)):
                 vable_rti = vable_rtis[i]

Modified: pypy/dist/pypy/jit/timeshifter/rvirtualizable.py
==============================================================================
--- pypy/dist/pypy/jit/timeshifter/rvirtualizable.py	(original)
+++ pypy/dist/pypy/jit/timeshifter/rvirtualizable.py	Thu Jan 25 23:59:10 2007
@@ -3,10 +3,10 @@
 from pypy.rpython.annlowlevel import cast_instance_to_base_ptr
 from pypy.rlib.unroll import unrolling_iterable
 
-def define_touch_store(TOPPTR, fielddescs, access_touched):
+def define_touch_update(TOPPTR, fielddescs, access_touched):
     fielddescs = unrolling_iterable(fielddescs)
 
-    def touch_store(strucref):
+    def touch_update(strucref):
         struc = lltype.cast_opaque_ptr(TOPPTR, strucref)
         vable_rti = struc.vable_rti
         vable_rti = cast_base_ptr_to_instance(VirtualizableRTI, vable_rti)
@@ -24,7 +24,7 @@
 
         struc.vable_access = access_touched
 
-    return touch_store
+    return touch_update
 
 def define_getset_field_ptrs(fielddesc, j):
 
@@ -53,7 +53,7 @@
     def set_field_untouched(struc, value):
         vable_rti = struc.vable_rti
         vable_rti = cast_base_ptr_to_instance(VirtualizableRTI, vable_rti)
-        vable_rti.touch_store(lltype.cast_opaque_ptr(llmemory.GCREF, struc))
+        vable_rti.touch_update(lltype.cast_opaque_ptr(llmemory.GCREF, struc))
         set_field_touched(struc, value)
 
     def get_field_untouched(struc):
@@ -107,7 +107,7 @@
     _get_forced._annspecialcase_ = "specialize:arg(2)"
 
 class VirtualizableRTI(VirtualRTI):
-    _attrs_ = "frameinfo vable_getset_rtis touch_store".split()
+    _attrs_ = "frameinfo vable_getset_rtis touch_update".split()
             
     def get_global_shape(self):
         return 0



More information about the Pypy-commit mailing list