[pypy-svn] r23709 - pypy/dist/pypy/translator
nik at codespeak.net
nik at codespeak.net
Mon Feb 27 22:32:26 CET 2006
Author: nik
Date: Mon Feb 27 22:32:13 2006
New Revision: 23709
Modified:
pypy/dist/pypy/translator/driver.py
pypy/dist/pypy/translator/interactive.py
Log:
add ootyping explicitly to interactive translation and translation driver.
easier for experimentation.
Modified: pypy/dist/pypy/translator/driver.py
==============================================================================
--- pypy/dist/pypy/translator/driver.py (original)
+++ pypy/dist/pypy/translator/driver.py Mon Feb 27 22:32:13 2006
@@ -187,6 +187,15 @@
#
task_rtype = taskdef(task_rtype, ['annotate'], "RTyping")
+ def task_ootype(self):
+ # Maybe type_system should simply be an option used in task_rtype
+ opt = self.options
+ rtyper = self.translator.buildrtyper(type_system="ootype")
+ rtyper.specialize(dont_simplify_again=True,
+ crash_on_first_typeerror=not opt.insist)
+ #
+ task_ootype = taskdef(task_ootype, ['annotate'], "ootyping")
+
def task_backendopt(self):
from pypy.translator.backendopt.all import backend_optimizations
opt = self.options
Modified: pypy/dist/pypy/translator/interactive.py
==============================================================================
--- pypy/dist/pypy/translator/interactive.py (original)
+++ pypy/dist/pypy/translator/interactive.py Mon Feb 27 22:32:13 2006
@@ -48,6 +48,7 @@
GOAL_USES_OPTS = {
'annotate': ['debug'],
'rtype': ['insist'],
+ 'ootype': [],
'backendopt': ['merge_if_blocks'],
'database_c': ['gc', 'stackless'],
'source_llvm': ['gc', 'stackless'],
@@ -120,6 +121,10 @@
self.update_options(argtypes, kwds)
return self.driver.rtype()
+ def ootype(self, argtypes=None, **kwds):
+ self.update_options(argtypes, kwds)
+ return self.driver.ootype()
+
# backend depedent
def backendopt(self, argtypes=None, **kwds):
More information about the Pypy-commit
mailing list