[pypy-svn] r15462 - pypy/dist/pypy/translator/goal
hpk at codespeak.net
hpk at codespeak.net
Sun Jul 31 13:59:54 CEST 2005
Author: hpk
Date: Sun Jul 31 13:59:53 2005
New Revision: 15462
Modified:
pypy/dist/pypy/translator/goal/app_main.py
pypy/dist/pypy/translator/goal/translate_pypy.py
Log:
- allow pypy.rpython.memory to be imported before forking
- set recursion limit to 1000 for the translated PyPy's
entry_point (otherwise the compiler doesn't run successfully
with the translated PyPy)
Modified: pypy/dist/pypy/translator/goal/app_main.py
==============================================================================
--- pypy/dist/pypy/translator/goal/app_main.py (original)
+++ pypy/dist/pypy/translator/goal/app_main.py Sun Jul 31 13:59:53 2005
@@ -6,6 +6,9 @@
import sys
sys.executable = argv[0]
sys.argv = argv[1:]
+ # with PyPy in top of CPython we can only have around 100
+ # but we need more in the translated PyPy for the compiler package
+ sys.setrecursionlimit(1000)
mainmodule = type(sys)('__main__')
sys.modules['__main__'] = mainmodule
Modified: pypy/dist/pypy/translator/goal/translate_pypy.py
==============================================================================
--- pypy/dist/pypy/translator/goal/translate_pypy.py (original)
+++ pypy/dist/pypy/translator/goal/translate_pypy.py Sun Jul 31 13:59:53 2005
@@ -134,7 +134,10 @@
for name, module in sys.modules.items():
if module is not None and name.startswith(prefix):
sname = name[len(prefix):]
- if sname not in oknames:
+ for okname in oknames:
+ if sname.startswith(okname):
+ break
+ else:
wrongimports.append(name)
if wrongimports:
raise RuntimeError("cannot fork because improper rtyper code"
More information about the Pypy-commit
mailing list