Author: Alex Gaynor <[email protected]>
Branch: inline-virtualref-2
Changeset: r60388:d59d143b055a
Date: 2013-01-23 13:23 -0600
http://bitbucket.org/pypy/pypy/changeset/d59d143b055a/

Log:    make this test pass nwo that it's better optimized

diff --git a/rpython/jit/metainterp/test/test_virtualref.py 
b/rpython/jit/metainterp/test/test_virtualref.py
--- a/rpython/jit/metainterp/test/test_virtualref.py
+++ b/rpython/jit/metainterp/test/test_virtualref.py
@@ -419,15 +419,18 @@
         self.check_aborted_count(0)
 
     def test_jit_force_virtual_seen(self):
-        myjitdriver = JitDriver(greens = [], reds = ['n'])
-        #
+        myjitdriver = JitDriver(greens=[], reds=['n'])
+
         A = lltype.GcArray(lltype.Signed)
-        class XY:
+
+        class XY(object):
             pass
-        class ExCtx:
+
+        class ExCtx(object):
             pass
         exctx = ExCtx()
-        #
+        escapes = []
+
         def f(n):
             while n > 0:
                 myjitdriver.can_enter_jit(n=n)
@@ -435,16 +438,16 @@
                 xy = XY()
                 xy.n = n
                 exctx.topframeref = vref = virtual_ref(xy)
+                escapes.append(xy)
                 xy.next1 = lltype.malloc(A, 0)
                 n = exctx.topframeref().n - 1
-                xy.next1 = lltype.nullptr(A)
                 exctx.topframeref = vref_None
                 virtual_ref_finish(vref, xy)
             return 1
         #
         res = self.meta_interp(f, [15])
         assert res == 1
-        self.check_resops(new_with_vtable=4,     # vref, xy
+        self.check_resops(new_with_vtable=2,     # xy
                           new_array=2)           # next1
         self.check_aborted_count(0)
 
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to