Author: Maciej Fijalkowski <[email protected]>
Branch: jitframe-on-heap
Changeset: r60679:8b7fabbcacbd
Date: 2013-01-29 15:56 +0200
http://bitbucket.org/pypy/pypy/changeset/8b7fabbcacbd/

Log:    fix this test

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
@@ -596,9 +596,6 @@
                     (descr_number, rawstart, rawstart + codeendpos))
         debug_stop("jit-backend-addr")
         self.patch_pending_failure_recoveries(rawstart)
-        if not we_are_translated():
-            # for the benefit of tests
-            faildescr._x86_bridge_frame_depth = frame_depth
         # patch the jump from original guard
         self.patch_jump_for_descr(faildescr, rawstart)
         ops_offset = self.mc.ops_offset
diff --git a/rpython/jit/backend/x86/test/test_recompilation.py 
b/rpython/jit/backend/x86/test/test_recompilation.py
--- a/rpython/jit/backend/x86/test/test_recompilation.py
+++ b/rpython/jit/backend/x86/test/test_recompilation.py
@@ -33,7 +33,7 @@
         jump(i1, descr=targettoken)
         '''
         loop = self.interpret(ops, [0])
-        previous = loop._jitcelltoken.compiled_loop_token.frame_depth
+        previous = 
loop._jitcelltoken.compiled_loop_token.frame_info.jfi_frame_depth
         assert self.getint(0) == 20
         ops = '''
         [i1]
@@ -43,14 +43,15 @@
         i6 = int_add(i5, 1)
         i7 = int_add(i5, i4)
         force_spill(i5)
+        force_spill(i6)
+        force_spill(i7)
         i8 = int_add(i7, 1)
         i9 = int_add(i8, 1)
         guard_false(i3, descr=fdescr2) [i3, i4, i5, i6, i7, i8, i9]
         finish()
         '''
-        bridge = self.attach_bridge(ops, loop, -2)
-        descr = loop.operations[3].getdescr()
-        new = descr._x86_bridge_frame_depth
+        self.attach_bridge(ops, loop, -2)
+        new = loop._jitcelltoken.compiled_loop_token.frame_info.jfi_frame_depth
         # the force_spill() forces the stack to grow
         assert new > previous
         fail = self.run(loop, 0)
@@ -103,20 +104,32 @@
         [i97, i3]
         i10 = int_mul(i3, 2)
         i8 = int_add(i3, 1)
+        i15 = int_add(i3, 1)
+        i16 = int_add(i3, 1)
+        i17 = int_add(i3, 1)
+        i18 = int_add(i3, 1)
         i6 = int_add(i8, i10)
         i7 = int_add(i3, i6)
         force_spill(i6)
         force_spill(i7)
         force_spill(i8)
+        force_spill(i10)
         i12 = int_add(i7, i8)
         i11 = int_add(i12, i6)
+        force_spill(i11)
+        force_spill(i12)
+        force_spill(i15)
+        force_spill(i16)
+        force_spill(i17)
+        force_spill(i18)
+        guard_true(i18) [i3, i12, i11, i10, i6, i7, i18, i17, i16]
         jump(i3, i12, i11, i10, i6, i7, descr=targettoken)
         '''
-        loop_frame_depth = loop._jitcelltoken.compiled_loop_token.frame_depth
+        loop_frame_depth = 
loop._jitcelltoken.compiled_loop_token.frame_info.jfi_frame_depth
         bridge = self.attach_bridge(ops, loop, 6)
-        guard_op = loop.operations[6]
         # the force_spill() forces the stack to grow
-        assert guard_op.getdescr()._x86_bridge_frame_depth > loop_frame_depth
+        bridge_frame_depth = 
loop._jitcelltoken.compiled_loop_token.frame_info.jfi_frame_depth
+        assert bridge_frame_depth > loop_frame_depth
         self.run(loop, 0, 0, 0, 0, 0, 0)
         assert self.getint(0) == 1
         assert self.getint(1) == 20
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to