[pypy-svn] r78807 - in pypy/branch/ootype-virtualrefs/pypy/rlib: . test
dan at codespeak.net
dan at codespeak.net
Sun Nov 7 13:06:25 CET 2010
Author: dan
Date: Sun Nov 7 13:06:23 2010
New Revision: 78807
Modified:
pypy/branch/ootype-virtualrefs/pypy/rlib/_jit_vref.py
pypy/branch/ootype-virtualrefs/pypy/rlib/test/test__jit_vref.py
Log:
Passing all tests, changed ooupcast to oodowncast and fixed a test helper function.
Modified: pypy/branch/ootype-virtualrefs/pypy/rlib/_jit_vref.py
==============================================================================
--- pypy/branch/ootype-virtualrefs/pypy/rlib/_jit_vref.py (original)
+++ pypy/branch/ootype-virtualrefs/pypy/rlib/_jit_vref.py Sun Nov 7 13:06:23 2010
@@ -65,8 +65,9 @@
lowleveltype = OBJECT
def rtype_simple_call(self, hop):
[v] = hop.inputargs(self)
- #v = hop.genop('jit_force_virtual', [v], resulttype = OBJECT)
- return hop.genop('ooupcast', [v], resulttype = hop.r_result)
+ v = hop.genop('jit_force_virtual', [v], resulttype = OBJECT)
+ #RESULTTYPE, ptr
+ return hop.genop('oodowncast', [v], resulttype = hop.r_result)
def convert_const(self, value):
if value() is not None:
Modified: pypy/branch/ootype-virtualrefs/pypy/rlib/test/test__jit_vref.py
==============================================================================
--- pypy/branch/ootype-virtualrefs/pypy/rlib/test/test__jit_vref.py (original)
+++ pypy/branch/ootype-virtualrefs/pypy/rlib/test/test__jit_vref.py Sun Nov 7 13:06:23 2010
@@ -11,6 +11,8 @@
from pypy.rpython.test.tool import BaseRtypingTest, LLRtypeMixin, OORtypeMixin
+from pypy.rpython.ootypesystem import ootype
+
class X(object):
pass
@@ -125,4 +127,4 @@
class TestOOtype(BaseTestVRef, OORtypeMixin):
OBJECTTYPE = OBJECT
def castable(self, TO, var):
- return ootype.isSubclass(TO, lltype.typeOf(var))
+ return ootype.isSubclass(lltype.typeOf(var), TO)
More information about the Pypy-commit
mailing list