[pypy-svn] r78835 - pypy/branch/ootype-virtualrefs/pypy/rlib

dan at codespeak.net dan at codespeak.net
Sun Nov 7 20:39:50 CET 2010


Author: dan
Date: Sun Nov  7 20:39:49 2010
New Revision: 78835

Modified:
   pypy/branch/ootype-virtualrefs/pypy/rlib/_jit_vref.py
   pypy/branch/ootype-virtualrefs/pypy/rlib/jit.py
Log:
We now make it through rtyping, and rlib/test/test_jit.py passes.

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 20:39:49 2010
@@ -66,7 +66,6 @@
     def rtype_simple_call(self, hop):
         [v] = hop.inputargs(self)
         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):

Modified: pypy/branch/ootype-virtualrefs/pypy/rlib/jit.py
==============================================================================
--- pypy/branch/ootype-virtualrefs/pypy/rlib/jit.py	(original)
+++ pypy/branch/ootype-virtualrefs/pypy/rlib/jit.py	Sun Nov  7 20:39:49 2010
@@ -457,8 +457,8 @@
                 r_green = hop.args_r[i]
                 v_green = hop.inputarg(r_green, arg=i)
             else:
-                if hop.rtyper.type_system.name == 'ootypesystem':
-                    py.test.skip("lltype only")
+                #if hop.rtyper.type_system.name == 'ootypesystem':
+                    #py.test.skip("lltype only")
                 objname, fieldname = name.split('.')   # see test_green_field
                 assert objname in driver.reds
                 i = kwds_i['i_' + objname]
@@ -474,7 +474,10 @@
                         "field %r not found in %r" % (name,
                                                       r_red.lowleveltype.TO))
                     r_red = r_red.rbase
-                GTYPE = r_red.lowleveltype.TO
+                if hop.rtyper.type_system.name == 'ootypesystem':
+                    GTYPE = r_red.lowleveltype
+                else:
+                    GTYPE = r_red.lowleveltype.TO
                 assert GTYPE._immutable_field(mangled_name), (
                     "field %r must be declared as immutable" % name)
                 if not hasattr(driver, 'll_greenfields'):



More information about the Pypy-commit mailing list