[pypy-svn] r35312 - in pypy/branch/builtin-call-speedup/pypy: interpreter objspace/std
mwh at codespeak.net
mwh at codespeak.net
Tue Dec 5 17:26:24 CET 2006
Author: mwh
Date: Tue Dec 5 17:26:24 2006
New Revision: 35312
Modified:
pypy/branch/builtin-call-speedup/pypy/interpreter/specialcode.py
pypy/branch/builtin-call-speedup/pypy/objspace/std/dictmultiobject.py
Log:
fix a typo that prevented the WaryDictImplementation from being used, and
another that prevented it from working.
comment out a print.
Modified: pypy/branch/builtin-call-speedup/pypy/interpreter/specialcode.py
==============================================================================
--- pypy/branch/builtin-call-speedup/pypy/interpreter/specialcode.py (original)
+++ pypy/branch/builtin-call-speedup/pypy/interpreter/specialcode.py Tue Dec 5 17:26:24 2006
@@ -16,8 +16,8 @@
w_builtin_dict = w_builtins.w_dict
assert isinstance(w_builtin_dict, W_DictMultiObject)
w_value = w_builtin_dict.implementation.get_builtin_indexed(num)
- if w_value is not None:
- print "CALL_LIKELY_BUILTIN fast"
+## if w_value is not None:
+## print "CALL_LIKELY_BUILTIN fast"
else:
w_varname = f.space.wrap(OPTIMIZED_BUILTINS[num])
w_value = f.space.finditem(f.w_globals, w_varname)
Modified: pypy/branch/builtin-call-speedup/pypy/objspace/std/dictmultiobject.py
==============================================================================
--- pypy/branch/builtin-call-speedup/pypy/objspace/std/dictmultiobject.py (original)
+++ pypy/branch/builtin-call-speedup/pypy/objspace/std/dictmultiobject.py Tue Dec 5 17:26:24 2006
@@ -413,6 +413,7 @@
i = BUILTIN_TO_INDEX.get(key, -1)
if i != -1:
self.shadowed[i] = None
+ return self
elif self._is_sane_hash(w_key_type):
raise KeyError
else:
@@ -630,7 +631,7 @@
def __init__(w_self, space, wary=False):
if space.config.objspace.withfastbuiltins and wary:
w_self.implementation = WaryDictImplementation(space)
- if space.config.objspace.std.withdictmeasurement:
+ elif space.config.objspace.std.withdictmeasurement:
w_self.implementation = MeasuringDictImplementation(space)
else:
w_self.implementation = space.emptydictimpl
More information about the Pypy-commit
mailing list