[pypy-svn] r46579 - in pypy/dist/pypy/config: . test
antocuni at codespeak.net
antocuni at codespeak.net
Fri Sep 14 14:33:39 CEST 2007
Author: antocuni
Date: Fri Sep 14 14:33:39 2007
New Revision: 46579
Modified:
pypy/dist/pypy/config/pypyoption.py
pypy/dist/pypy/config/test/test_pypyoption.py
pypy/dist/pypy/config/translationoption.py
Log:
- enable rweakref with ootype
- disable objspace options that requires rweakref when it's disabled; doesn't work, though :-(
Modified: pypy/dist/pypy/config/pypyoption.py
==============================================================================
--- pypy/dist/pypy/config/pypyoption.py (original)
+++ pypy/dist/pypy/config/pypyoption.py Fri Sep 14 14:33:39 2007
@@ -187,18 +187,21 @@
BoolOption("withtypeversion",
"version type objects when changing them",
cmdline=None,
- default=False),
+ default=False,
+ requires=[("translation.rweakref", True)]),
BoolOption("withshadowtracking",
"track whether an instance attribute shadows a type"
" attribute",
default=False,
requires=[("objspace.std.withmultidict", True),
- ("objspace.std.withtypeversion", True)]),
+ ("objspace.std.withtypeversion", True),
+ ("translation.rweakref", False)]),
BoolOption("withmethodcache",
"try to cache method lookups",
default=False,
- requires=[("objspace.std.withtypeversion", True)]),
+ requires=[("objspace.std.withtypeversion", True),
+ ("translation.rweakref", False)]),
BoolOption("withmethodcachecounter",
"try to cache methods and provide a counter in __pypy__. "
"for testing purposes only.",
Modified: pypy/dist/pypy/config/test/test_pypyoption.py
==============================================================================
--- pypy/dist/pypy/config/test/test_pypyoption.py (original)
+++ pypy/dist/pypy/config/test/test_pypyoption.py Fri Sep 14 14:33:39 2007
@@ -31,3 +31,13 @@
for path in c.getpaths(include_groups=True):
fn = prefix + "." + path + ".txt"
assert configdocdir.join(fn).check()
+
+def test_rweakref_required():
+ py.test.skip('fixme!')
+ conf = get_pypy_config()
+ conf.translation.rweakref = False
+ conf.objspace.std.allopts = True
+
+ assert not conf.objspace.std.withtypeversion
+ assert not conf.objspace.std.withmethodcache
+ assert not conf.objspace.std.withshadowtracking
Modified: pypy/dist/pypy/config/translationoption.py
==============================================================================
--- pypy/dist/pypy/config/translationoption.py (original)
+++ pypy/dist/pypy/config/translationoption.py Fri Sep 14 14:33:39 2007
@@ -21,7 +21,7 @@
("translation.backendopt.constfold", False),
("translation.backendopt.heap2stack", False),
("translation.backendopt.clever_malloc_removal", False),
- ("translation.rweakref", False)], # XXX
+ ]
}),
ChoiceOption("backend", "Backend to use for code generation",
["c", "llvm", "cli", "jvm", "js", "squeak", "cl"],
More information about the Pypy-commit
mailing list