Author: Alex Gaynor <[email protected]>
Branch:
Changeset: r59175:93966c024aec
Date: 2012-12-01 11:15 -0800
http://bitbucket.org/pypy/pypy/changeset/93966c024aec/
Log: Remove insist translation option, which has long been useless.
diff --git a/pypy/config/translationoption.py b/pypy/config/translationoption.py
--- a/pypy/config/translationoption.py
+++ b/pypy/config/translationoption.py
@@ -127,8 +127,6 @@
# misc
BoolOption("verbose", "Print extra information", default=False),
- BoolOption("insist", "Try hard to go on RTyping", default=False,
- cmdline="--insist"),
StrOption("cc", "Specify compiler to use for compiling generated C",
cmdline="--cc"),
StrOption("profopt", "Specify profile based optimization script",
cmdline="--profopt"),
diff --git a/pypy/rpython/rtyper.py b/pypy/rpython/rtyper.py
--- a/pypy/rpython/rtyper.py
+++ b/pypy/rpython/rtyper.py
@@ -91,7 +91,6 @@
## self.order = __import__(order_module, {}, {}, ['*']).order
## s = 'Using %s.%s for order' % (self.order.__module__,
self.order.__name__)
## self.log.info(s)
- self.crash_on_first_typeerror = True
def getconfig(self):
return self.annotator.translator.config
@@ -193,9 +192,8 @@
def bindingrepr(self, var):
return self.getrepr(self.binding(var))
- def specialize(self, dont_simplify_again=False, crash_on_first_typeerror =
True):
+ def specialize(self, dont_simplify_again=False):
"""Main entry point: specialize all annotated blocks of the program."""
- self.crash_on_first_typeerror = crash_on_first_typeerror
# specialize depends on annotator simplifications
assert dont_simplify_again in (False, True) # safety check
if not dont_simplify_again:
@@ -590,12 +588,7 @@
graph = self.annotator.annotated.get(block)
e.where = (graph, block, position)
self.typererror_count += 1
- if self.crash_on_first_typeerror:
- raise
- self.typererrors.append(e)
- if llops:
- c1 = inputconst(Void, Exception.__str__(e))
- llops.genop('TYPER ERROR', [c1], resulttype=Void)
+ raise
# __________ regular operations __________
diff --git a/pypy/translator/driver.py b/pypy/translator/driver.py
--- a/pypy/translator/driver.py
+++ b/pypy/translator/driver.py
@@ -347,9 +347,7 @@
""" RTyping - lltype version
"""
rtyper = self.translator.buildrtyper(type_system='lltype')
- insist = not self.config.translation.insist
- rtyper.specialize(dont_simplify_again=True,
- crash_on_first_typeerror=insist)
+ rtyper.specialize(dont_simplify_again=True)
#
task_rtype_lltype = taskdef(task_rtype_lltype, ['annotate'], "RTyping")
RTYPE = 'rtype_lltype'
@@ -358,10 +356,8 @@
""" RTyping - ootype version
"""
# Maybe type_system should simply be an option used in task_rtype
- insist = not self.config.translation.insist
rtyper = self.translator.buildrtyper(type_system="ootype")
- rtyper.specialize(dont_simplify_again=True,
- crash_on_first_typeerror=insist)
+ rtyper.specialize(dont_simplify_again=True)
#
task_rtype_ootype = taskdef(task_rtype_ootype, ['annotate'], "ootyping")
OOTYPE = 'rtype_ootype'
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit