[pypy-svn] r47257 - in pypy/branch/kill-keepalives-again/pypy: config config/test doc/config

arigo at codespeak.net arigo at codespeak.net
Sun Oct 7 13:10:49 CEST 2007


Author: arigo
Date: Sun Oct  7 13:10:48 2007
New Revision: 47257

Modified:
   pypy/branch/kill-keepalives-again/pypy/config/test/test_pypyoption.py
   pypy/branch/kill-keepalives-again/pypy/config/translationoption.py
   pypy/branch/kill-keepalives-again/pypy/doc/config/translation.gc.txt
Log:
Intermediate check-in: add a --frameworkgc option to choose between GCs.
Not implemented yet.


Modified: pypy/branch/kill-keepalives-again/pypy/config/test/test_pypyoption.py
==============================================================================
--- pypy/branch/kill-keepalives-again/pypy/config/test/test_pypyoption.py	(original)
+++ pypy/branch/kill-keepalives-again/pypy/config/test/test_pypyoption.py	Sun Oct  7 13:10:48 2007
@@ -23,6 +23,13 @@
     assert conf.translation.type_system == "lltype"
     assert conf.translation.gc == "framework"
 
+def test_frameworkgc():
+    for name in ["marksweep", "semispace"]:
+        conf = get_pypy_config()
+        assert conf.translation.gc != "framework"
+        conf.translation.frameworkgc = name
+        assert conf.translation.gc == "framework"
+
 def test_check_documentation():
     from pypy.doc.config.confrest import all_optiondescrs
     configdocdir = thisdir.dirpath().dirpath().join("doc", "config")

Modified: pypy/branch/kill-keepalives-again/pypy/config/translationoption.py
==============================================================================
--- pypy/branch/kill-keepalives-again/pypy/config/translationoption.py	(original)
+++ pypy/branch/kill-keepalives-again/pypy/config/translationoption.py	Sun Oct  7 13:10:48 2007
@@ -51,6 +51,12 @@
                default=False, cmdline="--stacklessgc",
                requires=[("translation.gc", "framework"),
                          ("translation.stackless", True)]),
+    ChoiceOption("frameworkgc", "Select one of our custom GCs",
+                 ["marksweep", "semispace"],
+                 "marksweep", requires={
+                    "marksweep": [("translation.gc", "framework")],
+                    "semispace": [("translation.gc", "framework")],
+                 }),
     BoolOption("thread", "enable use of threading primitives",
                default=False, cmdline="--thread",
                requires=[("translation.gc", "boehm")]),

Modified: pypy/branch/kill-keepalives-again/pypy/doc/config/translation.gc.txt
==============================================================================
--- pypy/branch/kill-keepalives-again/pypy/doc/config/translation.gc.txt	(original)
+++ pypy/branch/kill-keepalives-again/pypy/doc/config/translation.gc.txt	Sun Oct  7 13:10:48 2007
@@ -3,8 +3,9 @@
   - "ref": reference counting. Takes very long to translate and the result is
     slow.
 
-  - "framework": our custom mark-and-sweep collector. Takes moderately long and
-    is the fastest option without external dependencies.
+  - "framework": one of our custom garbage collectors. Takes moderately long
+    and is the fastest option without external dependencies.  See
+    :config:`translation.frameworkgc`.
 
   - "boehm": use the Boehm conservative GC
 



More information about the Pypy-commit mailing list