[pypy-svn] r73177 - in pypy/branch/reduce-instance-size-experiments/pypy: config objspace/std objspace/std/test
cfbolz at codespeak.net
cfbolz at codespeak.net
Tue Mar 30 17:38:51 CEST 2010
Author: cfbolz
Date: Tue Mar 30 17:38:49 2010
New Revision: 73177
Modified:
pypy/branch/reduce-instance-size-experiments/pypy/config/pypyoption.py
pypy/branch/reduce-instance-size-experiments/pypy/objspace/std/inlinedict.py
pypy/branch/reduce-instance-size-experiments/pypy/objspace/std/test/test_inlinedict.py
Log:
make inlinedict work only with the sharing dict (which is the sanest combination
anyway)
Modified: pypy/branch/reduce-instance-size-experiments/pypy/config/pypyoption.py
==============================================================================
--- pypy/branch/reduce-instance-size-experiments/pypy/config/pypyoption.py (original)
+++ pypy/branch/reduce-instance-size-experiments/pypy/config/pypyoption.py Tue Mar 30 17:38:49 2010
@@ -237,7 +237,8 @@
BoolOption("withinlineddict",
"make instances more compact by revoming a level of indirection",
default=False,
- requires=[("objspace.std.withshadowtracking", False)]),
+ requires=[("objspace.std.withsharingdict", True),
+ ("objspace.std.withshadowtracking", False)]),
BoolOption("withrangelist",
"enable special range list implementation that does not "
Modified: pypy/branch/reduce-instance-size-experiments/pypy/objspace/std/inlinedict.py
==============================================================================
--- pypy/branch/reduce-instance-size-experiments/pypy/objspace/std/inlinedict.py (original)
+++ pypy/branch/reduce-instance-size-experiments/pypy/objspace/std/inlinedict.py Tue Mar 30 17:38:49 2010
@@ -7,11 +7,9 @@
from pypy.tool.sourcetools import func_with_new_name
def make_mixin(config):
- if config.objspace.std.withsharingdict:
- from pypy.objspace.std.sharingdict import SharedDictImplementation
- return make_inlinedict_mixin(SharedDictImplementation, "structure")
- else:
- return make_inlinedict_mixin(StrDictImplementation, "content")
+ assert config.objspace.std.withsharingdict
+ from pypy.objspace.std.sharingdict import SharedDictImplementation
+ return make_inlinedict_mixin(SharedDictImplementation, "structure")
def make_indirection_method(methname, numargs):
# *args don't work, the call normalization gets confused
Modified: pypy/branch/reduce-instance-size-experiments/pypy/objspace/std/test/test_inlinedict.py
==============================================================================
--- pypy/branch/reduce-instance-size-experiments/pypy/objspace/std/test/test_inlinedict.py (original)
+++ pypy/branch/reduce-instance-size-experiments/pypy/objspace/std/test/test_inlinedict.py Tue Mar 30 17:38:49 2010
@@ -155,5 +155,6 @@
return a
""")
assert w_a.w__dict__ is None
- assert self.space.int_w(w_a.content['x']) == 12
- assert self.space.int_w(w_a.content['y']) == 13
+ assert self.space.int_w(w_a.entries[0]) == 12
+ assert self.space.int_w(w_a.entries[1]) == 13
+ assert w_a.w__dict__ is None
More information about the Pypy-commit
mailing list