Author: Hakan Ardo <[email protected]>
Branch: jit-short_from_state
Changeset: r46291:1afc4016aaea
Date: 2011-08-05 14:40 +0200
http://bitbucket.org/pypy/pypy/changeset/1afc4016aaea/

Log:    dont crash if op is None

diff --git a/pypy/jit/metainterp/optimizeopt/heap.py 
b/pypy/jit/metainterp/optimizeopt/heap.py
--- a/pypy/jit/metainterp/optimizeopt/heap.py
+++ b/pypy/jit/metainterp/optimizeopt/heap.py
@@ -127,9 +127,11 @@
             return
         for structvalue in self._cached_fields_getfield_op.keys():
             op = self._cached_fields_getfield_op[structvalue]
+            if not op:
+                continue
             if optimizer.getvalue(op.getarg(0)) in optimizer.opaque_pointers:
                 continue
-            if op and structvalue in self._cached_fields:
+            if structvalue in self._cached_fields:
                 if op.getopnum() == rop.SETFIELD_GC:
                     result = op.getarg(1)
                     getop = ResOperation(rop.GETFIELD_GC, [op.getarg(0)],
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to