Author: Ronan Lamy <ronan.l...@gmail.com>
Branch: kill-ootype
Changeset: r65600:a442193ace92
Date: 2013-07-24 14:28 +0200
http://bitbucket.org/pypy/pypy/changeset/a442193ace92/

Log:    kill ObjectOrientedTypeSystem

diff --git a/rpython/rtyper/typesystem.py b/rpython/rtyper/typesystem.py
--- a/rpython/rtyper/typesystem.py
+++ b/rpython/rtyper/typesystem.py
@@ -3,7 +3,6 @@
 
 from rpython.tool.pairtype import extendabletype
 
-from rpython.rtyper.ootypesystem import ootype
 from rpython.rtyper.lltypesystem import lltype
 from rpython.rtyper.error import TyperError
 
@@ -142,48 +141,8 @@
         v_list = hop.inputargs(robj1, robj2)
         return hop.genop('ptr_eq', v_list, resulttype=lltype.Bool)
 
-class ObjectOrientedTypeSystem(TypeSystem):
-    name = "ootypesystem"
-    callable_trait = (ootype.StaticMethod, ootype.static_meth)
-
-    def derefType(self, T):
-        assert isinstance(T, ootype.OOType)
-        return T
-
-    def deref(self, obj):
-        assert isinstance(ootype.typeOf(obj), ootype.OOType)
-        return obj
-
-    def check_null(self, repr, hop):
-        vlist = hop.inputargs(repr)
-        return hop.genop('oononnull', vlist, resulttype=ootype.Bool)
-
-    def getconcretetype(self, v):
-        return v.concretetype
-
-    def null_callable(self, T):
-        return ootype.null(T)
-
-    def generic_is(self, robj1, robj2, hop):
-        roriginal1 = robj1
-        roriginal2 = robj2
-        if robj1.lowleveltype is lltype.Void:
-            robj1 = robj2
-        elif robj2.lowleveltype is lltype.Void:
-            robj2 = robj1
-        if (not isinstance(robj1.lowleveltype, (ootype.Instance, 
ootype.BuiltinADTType)) or
-            not isinstance(robj2.lowleveltype, (ootype.Instance, 
ootype.BuiltinADTType))) and \
-            (robj1.lowleveltype is not ootype.Class or
-             robj2.lowleveltype is not ootype.Class):
-            raise TyperError('is of instances of the non-instances: %r, %r' % (
-                roriginal1, roriginal2))
-
-        v_list = hop.inputargs(robj1, robj2)
-        return hop.genop('oois', v_list, resulttype=lltype.Bool)
-
 # All typesystems are singletons
 LowLevelTypeSystem.instance = LowLevelTypeSystem()
-ObjectOrientedTypeSystem.instance = ObjectOrientedTypeSystem()
 
 getfunctionptr = LowLevelTypeSystem.instance.getcallable
 
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to