[pypy-svn] r50065 - pypy/dist/pypy/translator/c
arigo at codespeak.net
arigo at codespeak.net
Mon Dec 24 17:42:32 CET 2007
Author: arigo
Date: Mon Dec 24 17:42:32 2007
New Revision: 50065
Modified:
pypy/dist/pypy/translator/c/genc.py
Log:
Restore this - needed by tests.
Modified: pypy/dist/pypy/translator/c/genc.py
==============================================================================
--- pypy/dist/pypy/translator/c/genc.py (original)
+++ pypy/dist/pypy/translator/c/genc.py Mon Dec 24 17:42:32 2007
@@ -23,12 +23,15 @@
_compiled = False
modulename = None
- def __init__(self, translator, entrypoint, config):
+ def __init__(self, translator, entrypoint, config, gcpolicy=None):
self.translator = translator
self.entrypoint = entrypoint
self.entrypoint_name = self.entrypoint.func_name
self.originalentrypoint = entrypoint
self.config = config
+ self.gcpolicy = gcpolicy # for tests only, e.g. rpython/memory/
+ if gcpolicy is not None and gcpolicy.requires_stackless:
+ config.translation.stackless = True
self.eci = ExternalCompilationInfo()
def build_database(self):
@@ -83,6 +86,8 @@
self.eci = self.eci.merge(*all)
def get_gcpolicyclass(self):
+ if self.gcpolicy is not None:
+ return self.gcpolicy # for tests only
name = self.config.translation.gctransformer
if self.config.translation.stacklessgc:
name = "%s+stacklessgc" % (name,)
More information about the Pypy-commit
mailing list