[pypy-svn] r57507 - in pypy/branch/oo-jit/pypy: annotation jit/codegen/cli jit/rainbow jit/timeshifter rpython/ootypesystem

antocuni at codespeak.net antocuni at codespeak.net
Wed Aug 20 15:36:04 CEST 2008


Author: antocuni
Date: Wed Aug 20 15:36:03 2008
New Revision: 57507

Modified:
   pypy/branch/oo-jit/pypy/annotation/builtin.py
   pypy/branch/oo-jit/pypy/jit/codegen/cli/operation.py
   pypy/branch/oo-jit/pypy/jit/rainbow/interpreter.py
   pypy/branch/oo-jit/pypy/jit/timeshifter/rcontainer.py
   pypy/branch/oo-jit/pypy/rpython/ootypesystem/ootype.py
Log:
some rpython fixes



Modified: pypy/branch/oo-jit/pypy/annotation/builtin.py
==============================================================================
--- pypy/branch/oo-jit/pypy/annotation/builtin.py	(original)
+++ pypy/branch/oo-jit/pypy/annotation/builtin.py	Wed Aug 20 15:36:03 2008
@@ -577,7 +577,7 @@
     if TYPE is ootype.Object:
         return SomeOOObject()
     elif TYPE is ootype.Class:
-        return SomeOOClass(T)
+        return SomeOOClass(TYPE)
     elif isinstance(TYPE, ootype.StaticMethod):
         return SomeOOStaticMeth(TYPE)
     elif isinstance(TYPE, ootype.OOType):

Modified: pypy/branch/oo-jit/pypy/jit/codegen/cli/operation.py
==============================================================================
--- pypy/branch/oo-jit/pypy/jit/codegen/cli/operation.py	(original)
+++ pypy/branch/oo-jit/pypy/jit/codegen/cli/operation.py	Wed Aug 20 15:36:03 2008
@@ -337,6 +337,12 @@
 UNARYOPS = fillops(cli_opcodes.unary_ops, "UnaryOp")
 BINARYOPS = fillops(cli_opcodes.binary_ops, "BinaryOp")
 
+class XXX(BinaryOp):
+    pass
+
+BINARYOPS['oostring'] = XXX
+BINARYOPS['subclassof'] = XXX
+
 @specialize.memo()
 def getopclass1(opname):
     try:

Modified: pypy/branch/oo-jit/pypy/jit/rainbow/interpreter.py
==============================================================================
--- pypy/branch/oo-jit/pypy/jit/rainbow/interpreter.py	(original)
+++ pypy/branch/oo-jit/pypy/jit/rainbow/interpreter.py	Wed Aug 20 15:36:03 2008
@@ -1115,6 +1115,7 @@
 
     @arguments("red", "jumptarget")
     def opimpl_goto_if_known_class(self, objbox, target):
+        assert isinstance(objbox, rvalue.AbstractPtrRedBox)
         known_class = False
         content = objbox.content
         if content is not None:
@@ -1131,6 +1132,7 @@
     def opimpl_const_oosend(self, greenargs, redargs, methname):
         from pypy.rpython.ootypesystem.rclass import CLASSTYPE
         selfbox = redargs[0]
+        assert isinstance(selfbox, rvalue.AbstractPtrRedBox)
         vstruct = selfbox.content
         assert vstruct is not None
         if isinstance(vstruct, rcontainer.PartialDataStruct):

Modified: pypy/branch/oo-jit/pypy/jit/timeshifter/rcontainer.py
==============================================================================
--- pypy/branch/oo-jit/pypy/jit/timeshifter/rcontainer.py	(original)
+++ pypy/branch/oo-jit/pypy/jit/timeshifter/rcontainer.py	Wed Aug 20 15:36:03 2008
@@ -79,7 +79,7 @@
     firstsubstructdesc = None
     materialize = None
     StructFieldDesc = None
-    PtrRedBox = rvalue.PtrRedBox
+    PtrRedBox = None
     firstfielddesc = 0
 
     def __init__(self, RGenOp, TYPE):
@@ -239,6 +239,7 @@
 class StructTypeDesc(AbstractStructTypeDesc):
     
     StructFieldDesc = None # patched later with StructFieldDesc
+    PtrRedBox = rvalue.PtrRedBox
 
     _attrs_ = []
 

Modified: pypy/branch/oo-jit/pypy/rpython/ootypesystem/ootype.py
==============================================================================
--- pypy/branch/oo-jit/pypy/rpython/ootypesystem/ootype.py	(original)
+++ pypy/branch/oo-jit/pypy/rpython/ootypesystem/ootype.py	Wed Aug 20 15:36:03 2008
@@ -891,6 +891,7 @@
         return '%s(%s)' % (self.__class__.__name__, self._INSTANCE)
 
 nullruntimeclass = _class(None)
+Class._null = nullruntimeclass
 
 class _instance(object):
     



More information about the Pypy-commit mailing list