Author: Carl Friedrich Bolz <[email protected]>
Branch: 
Changeset: r73661:79cdb86a9075
Date: 2014-09-06 20:48 +0200
http://bitbucket.org/pypy/pypy/changeset/79cdb86a9075/

Log:    more natural way to express this

diff --git a/rpython/translator/backendopt/storesink.py 
b/rpython/translator/backendopt/storesink.py
--- a/rpython/translator/backendopt/storesink.py
+++ b/rpython/translator/backendopt/storesink.py
@@ -88,14 +88,14 @@
                 added_some_same_as = True
             else:
                 cache[tup] = op.result
-        elif op.opname in ['setarrayitem', 'setinteriorfield']:
+        elif op.opname in ('setarrayitem', 'setinteriorfield', "malloc", 
"malloc_varsize"):
             pass
         elif op.opname == 'setfield':
             target = op.args[0]
             field = op.args[1].value
             clear_cache_for(cache, target.concretetype, field)
             cache[target, field] = op.args[2]
-        elif has_side_effects(op) and op.opname not in ("malloc", 
"malloc_varsize"):
+        elif has_side_effects(op):
             cache.clear()
         newops.append(op)
     return newops, added_some_same_as
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to