Author: Maciej Fijalkowski <[email protected]>
Branch: jitframe-on-heap
Changeset: r60662:1af1c9069875
Date: 2013-01-29 12:44 +0200
http://bitbucket.org/pypy/pypy/changeset/1af1c9069875/

Log:    kill the hack to update frame_info and instead make it official to
        have size as an argument to realloc frame

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
@@ -924,14 +924,6 @@
 
     def update_frame_depth(self, frame_depth):
         self.current_clt.frame_info.jfi_frame_depth = frame_depth
-        new_jumping_to = []
-        for wref in self.current_clt.jumping_to:
-            clt = wref()
-            if clt is not None:
-                clt.frame_info.jfi_frame_depth = max(frame_depth,
-                    clt.frame_info.jfi_frame_depth)
-                new_jumping_to.append(weakref.ref(clt))
-        self.current_clt.jumping_to = new_jumping_to
 
     def write_pending_failure_recoveries(self):
         for tok in self.pending_guards:
diff --git a/rpython/jit/backend/llsupport/llmodel.py 
b/rpython/jit/backend/llsupport/llmodel.py
--- a/rpython/jit/backend/llsupport/llmodel.py
+++ b/rpython/jit/backend/llsupport/llmodel.py
@@ -57,7 +57,11 @@
 
         def realloc_frame(frame, size):
             frame = lltype.cast_opaque_ptr(jitframe.JITFRAMEPTR, frame)
-            assert size <= frame.jf_frame_info.jfi_frame_depth
+            if size > frame.jf_frame_info.jfi_frame_depth:
+                # update the frame_info size, which is for whatever reason
+                # not up to date
+                base_ofs = self.get_baseofs_of_frame_field()
+                frame.jf_frame_info.set_frame_depth(base_ofs, size)
             new_frame = jitframe.JITFRAME.allocate(frame.jf_frame_info)
             i = 0
             while i < len(frame.jf_frame):
diff --git a/rpython/jit/backend/model.py b/rpython/jit/backend/model.py
--- a/rpython/jit/backend/model.py
+++ b/rpython/jit/backend/model.py
@@ -295,7 +295,6 @@
         self.cpu = cpu
         self.number = number
         self.bridges_count = 0
-        self.jumping_to = [] # a list of weakrefs who jump here
         # This growing list gives the 'descr_number' of all fail descrs
         # that belong to this loop or to a bridge attached to it.
         # Filled by the frontend calling record_faildescr_index().
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
@@ -668,14 +668,6 @@
     def update_frame_depth(self, frame_depth):
         baseofs = self.cpu.get_baseofs_of_frame_field()
         self.current_clt.frame_info.set_frame_depth(baseofs, frame_depth)
-        new_jumping_to = []
-        for wref in self.current_clt.jumping_to:
-            clt = wref()
-            if clt is not None:
-                clt.frame_info.set_frame_depth(baseofs, max(frame_depth,
-                    clt.frame_info.jfi_frame_depth))
-                new_jumping_to.append(weakref.ref(clt))
-        self.current_clt.jumping_to = new_jumping_to
 
     def _check_frame_depth(self, mc, gcmap):
         """ check if the frame is of enough depth to follow this bridge.
@@ -2468,10 +2460,6 @@
             curpos = self.mc.get_relative_pos() + 5
             self.mc.JMP_l(target - curpos)
         else:
-            clt = self.current_clt
-            assert clt is not None
-            target_token._x86_clt.jumping_to.append(
-                weakref.ref(clt))
             self.mc.JMP(imm(target))
 
     def malloc_cond(self, nursery_free_adr, nursery_top_adr, size, gcmap):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to