Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r72480:35fdf446e439
Date: 2014-07-24 14:11 +0200
http://bitbucket.org/pypy/pypy/changeset/35fdf446e439/

Log:    Issue #1817: missing support for virtual_refs pointing to several
        different types in the same RPython program

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
@@ -34,7 +34,7 @@
         #
         def check_call(op, fname):
             assert op.opname == 'direct_call'
-            assert op.args[0].value._obj._name == fname
+            assert op.args[0].value._obj._name.startswith(fname)
         #
         ops = [op for block, op in graph.iterblockops()]
         check_call(ops[-3], 'virtual_ref')
diff --git a/rpython/rlib/jit.py b/rpython/rlib/jit.py
--- a/rpython/rlib/jit.py
+++ b/rpython/rlib/jit.py
@@ -340,6 +340,7 @@
 # ____________________________________________________________
 # VRefs
 
[email protected](0)
 def virtual_ref(x):
     """Creates a 'vref' object that contains a reference to 'x'.  Calls
     to virtual_ref/virtual_ref_finish must be properly nested.  The idea
@@ -351,6 +352,7 @@
     return DirectJitVRef(x)
 virtual_ref.oopspec = 'virtual_ref(x)'
 
[email protected](1)
 def virtual_ref_finish(vref, x):
     """See docstring in virtual_ref(x)"""
     keepalive_until_here(x)   # otherwise the whole function call is removed
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to