[pypy-svn] r69971 - in pypy/branch/virtual-forcing/pypy: jit/metainterp/test rlib

arigo at codespeak.net arigo at codespeak.net
Tue Dec 8 11:03:11 CET 2009


Author: arigo
Date: Tue Dec  8 11:03:10 2009
New Revision: 69971

Modified:
   pypy/branch/virtual-forcing/pypy/jit/metainterp/test/test_virtualref.py
   pypy/branch/virtual-forcing/pypy/rlib/jit.py
Log:
Typo and fix the tests.


Modified: pypy/branch/virtual-forcing/pypy/jit/metainterp/test/test_virtualref.py
==============================================================================
--- pypy/branch/virtual-forcing/pypy/jit/metainterp/test/test_virtualref.py	(original)
+++ pypy/branch/virtual-forcing/pypy/jit/metainterp/test/test_virtualref.py	Tue Dec  8 11:03:10 2009
@@ -1,7 +1,7 @@
 import py
 from pypy.rpython.lltypesystem import lltype, llmemory, lloperation
 from pypy.rlib.jit import JitDriver, dont_look_inside
-from pypy.rlib.jit import virtual_ref, virtual_ref_finish
+from pypy.rlib.jit import virtual_ref, virtual_ref_finish, vref_None
 from pypy.rlib.objectmodel import compute_unique_id
 from pypy.jit.metainterp.test.test_basic import LLJitMixin, OOJitMixin
 from pypy.jit.metainterp.resoperation import rop
@@ -22,7 +22,7 @@
         def f():
             x = X()
             exctx.topframeref = virtual_ref(x)
-            exctx.topframeref = None
+            exctx.topframeref = vref_None
             virtual_ref_finish(x)
             return 1
         #
@@ -52,7 +52,7 @@
             exctx._frame = x
             exctx.topframeref = virtual_ref(x)
         def leave():
-            exctx.topframeref = None
+            exctx.topframeref = vref_None
             virtual_ref_finish(exctx._frame)
         def f(n):
             enter(n)
@@ -104,7 +104,7 @@
                 exctx.topframeref = vref = virtual_ref(x)
                 # here, 'x' should be virtual. (This is ensured because
                 # we call virtual_ref(x).)
-                exctx.topframeref = None
+                exctx.topframeref = vref_None
                 virtual_ref_finish(x)
                 # 'vref' is allowed to escape, and even be forced, even after
                 # the call to finish().
@@ -138,7 +138,7 @@
                 exctx.topframeref = virtual_ref(x)
                 total += force_me() - 100
                 virtual_ref_finish(x)
-                exctx.topframeref = None
+                exctx.topframeref = vref_None
             return total
         #
         res = self.meta_interp(f, [-4])
@@ -170,7 +170,7 @@
                 xy.next3 = XY()
                 exctx.topframeref = virtual_ref(xy)
                 n -= externalfn(n)
-                exctx.topframeref = None
+                exctx.topframeref = vref_None
                 xy.next1 = None
                 xy.next2 = None
                 xy.next3 = None
@@ -204,7 +204,7 @@
                 exctx.topframeref = virtual_ref(xy)
                 n -= externalfn(n)
                 virtual_ref_finish(xy)
-                exctx.topframeref = None
+                exctx.topframeref = vref_None
         #
         self.meta_interp(f, [15])
         self.check_loops({})     # because we aborted tracing
@@ -233,7 +233,7 @@
                 exctx.topframeref = virtual_ref(xy)
                 n -= externalfn(n)
                 virtual_ref_finish(xy)
-                exctx.topframeref = None
+                exctx.topframeref = vref_None
             return exctx.m
         #
         res = self.meta_interp(f, [30])
@@ -264,7 +264,7 @@
                 if n == 13:
                     externalfn(n)
                 n -= 1
-                exctx.topframeref = None
+                exctx.topframeref = vref_None
                 virtual_ref_finish(xy)
             return exctx.m
         #
@@ -296,7 +296,7 @@
                 if n % 6 == 0:
                     externalfn(n)
                 n -= 1
-                exctx.topframeref = None
+                exctx.topframeref = vref_None
                 virtual_ref_finish(xy)
             return exctx.m
         #
@@ -327,7 +327,7 @@
                 exctx.topframeref = virtual_ref(xy)
                 exctx.later = exctx.topframeref
                 n -= 1
-                exctx.topframeref = None
+                exctx.topframeref = vref_None
                 virtual_ref_finish(xy)
             return g()
         #

Modified: pypy/branch/virtual-forcing/pypy/rlib/jit.py
==============================================================================
--- pypy/branch/virtual-forcing/pypy/rlib/jit.py	(original)
+++ pypy/branch/virtual-forcing/pypy/rlib/jit.py	Tue Dec  8 11:03:10 2009
@@ -109,7 +109,7 @@
     JIT will abort if it is not), at least between the calls to
     virtual_ref and virtual_ref_finish.  The point is that the 'vref'
     returned by virtual_ref may escape early.  If at runtime it is
-    dereferenced (by the syntax 'vref()' or by virtual_ref_deref()) before the
+    dereferenced (by the call syntax 'vref()') before the
     virtual_ref_finish, then we get out of the assembler.  If it is not
     dereferenced at all, or only after the virtual_ref_finish, then
     nothing special occurs.



More information about the Pypy-commit mailing list