[pypy-commit] pypy default: Removed some more ootyep specific things.

alex_gaynor noreply at buildbot.pypy.org
Sun Jul 28 19:43:47 CEST 2013


Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: 
Changeset: r65746:b4d07b830269
Date: 2013-07-28 10:43 -0700
http://bitbucket.org/pypy/pypy/changeset/b4d07b830269/

Log:	Removed some more ootyep specific things.

diff --git a/rpython/annotator/unaryop.py b/rpython/annotator/unaryop.py
--- a/rpython/annotator/unaryop.py
+++ b/rpython/annotator/unaryop.py
@@ -317,7 +317,6 @@
             s_iterable = args_s[0]
             if isinstance(s_iterable, (SomeList, SomeDict)):
                 lst = SomeList(lst.listdef) # create a fresh copy
-                lst.known_maxlength = True
                 lst.listdef.resize()
                 lst.listdef.listitem.hint_maxlength = True
         elif 'fence' in hints:
diff --git a/rpython/jit/tl/conftest.py b/rpython/jit/tl/conftest.py
deleted file mode 100644
--- a/rpython/jit/tl/conftest.py
+++ /dev/null
@@ -1,5 +0,0 @@
-def pytest_addoption(parser):
-    group = parser.getgroup("pypyjit.py options")
-    group.addoption('--ootype', action="store_true", dest="ootype",
-                    default=False,
-                    help="use ootype")
diff --git a/rpython/jit/tool/oparser.py b/rpython/jit/tool/oparser.py
--- a/rpython/jit/tool/oparser.py
+++ b/rpython/jit/tool/oparser.py
@@ -160,11 +160,9 @@
                 return self.model.ConstFloat(self.model.convert_to_floatstorage(arg))
             if (arg.startswith('"') or arg.startswith("'") or
                 arg.startswith('s"')):
-                # XXX ootype
                 info = arg[1:].strip("'\"")
                 return self.model.get_const_ptr_for_string(info)
             if arg.startswith('u"'):
-                # XXX ootype
                 info = arg[1:].strip("'\"")
                 return self.model.get_const_ptr_for_unicode(info)
             if arg.startswith('ConstClass('):
diff --git a/rpython/rtyper/lltypesystem/opimpl.py b/rpython/rtyper/lltypesystem/opimpl.py
--- a/rpython/rtyper/lltypesystem/opimpl.py
+++ b/rpython/rtyper/lltypesystem/opimpl.py
@@ -553,8 +553,7 @@
 def _normalize(x):
     if not isinstance(x, str):
         TYPE = lltype.typeOf(x)
-        if (isinstance(TYPE, lltype.Ptr) and TYPE.TO._name == 'rpy_string'
-            or getattr(TYPE, '_name', '') == 'String'):    # ootype
+        if isinstance(TYPE, lltype.Ptr) and TYPE.TO._name == 'rpy_string':
             from rpython.rtyper.annlowlevel import hlstr
             return hlstr(x)
     return x
diff --git a/rpython/rtyper/lltypesystem/rlist.py b/rpython/rtyper/lltypesystem/rlist.py
--- a/rpython/rtyper/lltypesystem/rlist.py
+++ b/rpython/rtyper/lltypesystem/rlist.py
@@ -32,8 +32,7 @@
 class BaseListRepr(AbstractBaseListRepr):
     rstr_ll = rstr.LLHelpers
 
-    # known_maxlength is ignored by lltype but used by ootype
-    def __init__(self, rtyper, item_repr, listitem=None, known_maxlength=False):
+    def __init__(self, rtyper, item_repr, listitem=None):
         self.rtyper = rtyper
         self.LIST = GcForwardReference()
         self.lowleveltype = Ptr(self.LIST)
diff --git a/rpython/rtyper/rlist.py b/rpython/rtyper/rlist.py
--- a/rpython/rtyper/rlist.py
+++ b/rpython/rtyper/rlist.py
@@ -48,16 +48,14 @@
             # of recursive structures -- i.e. if the listdef contains itself
             rlist = rtyper.type_system.rlist
             item_repr = lambda: rtyper.getrepr(listitem.s_value)
-            known_maxlength = getattr(self, 'known_maxlength', False)
             if self.listdef.listitem.resized:
-                return rlist.ListRepr(rtyper, item_repr, listitem, known_maxlength)
+                return rlist.ListRepr(rtyper, item_repr, listitem)
             else:
                 return rlist.FixedSizeListRepr(rtyper, item_repr, listitem)
 
     def rtyper_makekey(self):
         self.listdef.listitem.dont_change_any_more = True
-        known_maxlength = getattr(self, 'known_maxlength', False)
-        return self.__class__, self.listdef.listitem, known_maxlength
+        return self.__class__, self.listdef.listitem
 
 
 class AbstractBaseListRepr(Repr):
diff --git a/rpython/translator/driver.py b/rpython/translator/driver.py
--- a/rpython/translator/driver.py
+++ b/rpython/translator/driver.py
@@ -38,7 +38,7 @@
 }
 
 def backend_to_typesystem(backend):
-    return _BACKEND_TO_TYPESYSTEM.get(backend, 'ootype')
+    return _BACKEND_TO_TYPESYSTEM[backend]
 
 # set of translation steps to profile
 PROFILE = set([])
@@ -558,7 +558,6 @@
         assert 'rpython.rtyper.rmodel' not in sys.modules, (
             "cannot fork because the rtyper has already been imported")
     prereq_checkpt_rtype_lltype = prereq_checkpt_rtype
-    prereq_checkpt_rtype_ootype = prereq_checkpt_rtype
 
     # checkpointing support
     def _event(self, kind, goal, func):


More information about the pypy-commit mailing list