[pypy-svn] pypy jit-short-preamble: assume pure functions dont have any sideffects
hakanardo
commits-noreply at bitbucket.org
Sun Jan 9 17:25:14 CET 2011
Author: Hakan Ardo <hakan at debian.org>
Branch: jit-short-preamble
Changeset: r40531:c45dc5d55121
Date: 2011-01-09 17:23 +0100
http://bitbucket.org/pypy/pypy/changeset/c45dc5d55121/
Log: assume pure functions dont have any sideffects
diff --git a/pypy/jit/codewriter/effectinfo.py b/pypy/jit/codewriter/effectinfo.py
--- a/pypy/jit/codewriter/effectinfo.py
+++ b/pypy/jit/codewriter/effectinfo.py
@@ -60,7 +60,8 @@
return cls._cache[key]
result = object.__new__(cls)
result.readonly_descrs_fields = readonly_descrs_fields
- if extraeffect == EffectInfo.EF_LOOPINVARIANT:
+ if extraeffect == EffectInfo.EF_LOOPINVARIANT or \
+ extraeffect == EffectInfo.EF_PURE:
result.write_descrs_fields = []
result.write_descrs_arrays = []
else:
More information about the Pypy-commit
mailing list