Commit 6e27afa0 authored by Alex Gaynor's avatar Alex Gaynor
Browse files

Removed some more ootyep specific things.

parent ba26aca2e830
......@@ -317,7 +317,6 @@ class __extend__(SomeList):
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:
......
def pytest_addoption(parser):
group = parser.getgroup("pypyjit.py options")
group.addoption('--ootype', action="store_true", dest="ootype",
default=False,
help="use ootype")
......@@ -160,11 +160,9 @@ class OpParser(object):
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('):
......
......@@ -553,8 +553,7 @@ def op_getarrayitem(p, index):
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
......
......@@ -32,8 +32,7 @@ from rpython.tool.pairtype import pairtype, pair
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)
......
......@@ -48,16 +48,14 @@ class __extend__(annmodel.SomeList):
# 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):
......
......@@ -38,7 +38,7 @@ _BACKEND_TO_TYPESYSTEM = {
}
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 @@ class TranslationDriver(SimpleTaskEngine):
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):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment