[pypy-svn] r72015 - pypy/branch/faster-compilation/pypy/rpython

fijal at codespeak.net fijal at codespeak.net
Wed Mar 10 02:18:59 CET 2010


Author: fijal
Date: Wed Mar 10 02:18:57 2010
New Revision: 72015

Modified:
   pypy/branch/faster-compilation/pypy/rpython/controllerentry.py
   pypy/branch/faster-compilation/pypy/rpython/rexternalobj.py
   pypy/branch/faster-compilation/pypy/rpython/rfloat.py
   pypy/branch/faster-compilation/pypy/rpython/rint.py
   pypy/branch/faster-compilation/pypy/rpython/rlist.py
   pypy/branch/faster-compilation/pypy/rpython/rptr.py
   pypy/branch/faster-compilation/pypy/rpython/rtuple.py
Log:
A partial fix here


Modified: pypy/branch/faster-compilation/pypy/rpython/controllerentry.py
==============================================================================
--- pypy/branch/faster-compilation/pypy/rpython/controllerentry.py	(original)
+++ pypy/branch/faster-compilation/pypy/rpython/controllerentry.py	Wed Mar 10 02:18:57 2010
@@ -5,7 +5,7 @@
 from pypy.rpython.extregistry import ExtRegistryEntry
 from pypy.rpython.annlowlevel import cachedtype
 from pypy.rpython.error import TyperError
-
+from pypy.tool.pairtype import extendabletype
 
 class ControllerEntry(ExtRegistryEntry):
 
@@ -226,6 +226,7 @@
 _make_none_union("SomeControlledInstance", "obj.s_real_obj, obj.controller", globals())
 
 class __extend__(SomeControlledInstance):
+    __metaclass__ = extendabletype
 
     def getattr(s_cin, s_attr):
         assert s_attr.is_constant()

Modified: pypy/branch/faster-compilation/pypy/rpython/rexternalobj.py
==============================================================================
--- pypy/branch/faster-compilation/pypy/rpython/rexternalobj.py	(original)
+++ pypy/branch/faster-compilation/pypy/rpython/rexternalobj.py	Wed Mar 10 02:18:57 2010
@@ -6,11 +6,12 @@
 from pypy.objspace.flow.model import Constant, Variable
 from pypy.rpython import extregistry
 from pypy.annotation.signature import annotation
-from pypy.tool.pairtype import pairtype
+from pypy.tool.pairtype import extendabletype
 
 # ExternalObjects
 
 class __extend__(annmodel.SomeExternalObject):
+    __metaclass__ = extendabletype
 
     def rtyper_makerepr(self, rtyper):
        # delegate to the get_repr() of the extregistrered Entry class

Modified: pypy/branch/faster-compilation/pypy/rpython/rfloat.py
==============================================================================
--- pypy/branch/faster-compilation/pypy/rpython/rfloat.py	(original)
+++ pypy/branch/faster-compilation/pypy/rpython/rfloat.py	Wed Mar 10 02:18:57 2010
@@ -11,10 +11,13 @@
 
 from pypy.rlib.rarithmetic import base_int
 from pypy.rlib.objectmodel import _hash_float
+from pypy.tool.pairtype import extendabletype
 
 import math
 
 class __extend__(annmodel.SomeFloat):
+    __metaclass__ = extendabletype
+
     def rtyper_makerepr(self, rtyper):
         return float_repr
     def rtyper_makekey(self):

Modified: pypy/branch/faster-compilation/pypy/rpython/rint.py
==============================================================================
--- pypy/branch/faster-compilation/pypy/rpython/rint.py	(original)
+++ pypy/branch/faster-compilation/pypy/rpython/rint.py	Wed Mar 10 02:18:57 2010
@@ -11,6 +11,7 @@
 from pypy.rpython.error import TyperError, MissingRTypeOperation
 from pypy.rpython.rmodel import log
 from pypy.rlib import objectmodel
+from pypy.tool.pairtype import extendabletype
 
 _integer_reprs = {}
 def getintegerrepr(lltype, prefix=None):
@@ -22,6 +23,8 @@
     return repr
 
 class __extend__(annmodel.SomeInteger):
+    __metaclass__ = extendabletype
+    
     def rtyper_makerepr(self, rtyper):
         lltype = build_number(None, self.knowntype)
         return getintegerrepr(lltype)

Modified: pypy/branch/faster-compilation/pypy/rpython/rlist.py
==============================================================================
--- pypy/branch/faster-compilation/pypy/rpython/rlist.py	(original)
+++ pypy/branch/faster-compilation/pypy/rpython/rlist.py	Wed Mar 10 02:18:57 2010
@@ -12,6 +12,7 @@
 from pypy.rlib.rarithmetic import ovfcheck, widen
 from pypy.rpython.annlowlevel import ADTInterface
 from pypy.rlib import rgc
+from pypy.tool.pairtype import extendabletype
 
 ADTIFixedList = ADTInterface(None, {
     'll_newlist':      (['SELF', Signed        ], 'self'),
@@ -31,6 +32,8 @@
 
 
 class __extend__(annmodel.SomeList):
+    __metaclass__ = extendabletype
+    
     def rtyper_makerepr(self, rtyper):
         listitem = self.listdef.listitem
         s_value = listitem.s_value

Modified: pypy/branch/faster-compilation/pypy/rpython/rptr.py
==============================================================================
--- pypy/branch/faster-compilation/pypy/rpython/rptr.py	(original)
+++ pypy/branch/faster-compilation/pypy/rpython/rptr.py	Wed Mar 10 02:18:57 2010
@@ -5,9 +5,11 @@
 from pypy.rpython.error import TyperError
 from pypy.rpython.rmodel import Repr, IntegerRepr
 from pypy.rlib.rarithmetic import r_uint
-
+from pypy.tool.pairtype import extendabletype
 
 class __extend__(annmodel.SomePtr):
+    __metaclass__ = extendabletype
+    
     def rtyper_makerepr(self, rtyper):
 ##        if self.is_constant() and not self.const:   # constant NULL
 ##            return nullptr_repr
@@ -20,6 +22,8 @@
         return self.__class__, self.ll_ptrtype
 
 class __extend__(annmodel.SomeInteriorPtr):
+    __metaclass__ = extendabletype
+    
     def rtyper_makerepr(self, rtyper):
         return InteriorPtrRepr(self.ll_ptrtype)
  
@@ -190,6 +194,8 @@
 # ADT  methods
 
 class __extend__(annmodel.SomeLLADTMeth):
+    __metaclass__ = extendabletype
+
     def rtyper_makerepr(self, rtyper):
         return LLADTMethRepr(self, rtyper)
     def rtyper_makekey(self):

Modified: pypy/branch/faster-compilation/pypy/rpython/rtuple.py
==============================================================================
--- pypy/branch/faster-compilation/pypy/rpython/rtuple.py	(original)
+++ pypy/branch/faster-compilation/pypy/rpython/rtuple.py	Wed Mar 10 02:18:57 2010
@@ -9,8 +9,11 @@
 from pypy.rpython.lltypesystem.lltype import Void, Signed, Bool
 from pypy.rlib.rarithmetic import intmask
 from pypy.rlib.unroll import unrolling_iterable
+from pypy.tool.pairtype import extendabletype
 
 class __extend__(annmodel.SomeTuple):
+    __metaclass__ = extendabletype
+    
     def rtyper_makerepr(self, rtyper):
         repr_class = rtyper.type_system.rtuple.TupleRepr
         return repr_class(rtyper, [rtyper.getrepr(s_item) for s_item in self.items])



More information about the Pypy-commit mailing list