Author: Maciej Fijalkowski <[email protected]>
Branch: optresult-unroll
Changeset: r79430:d68f64dcc8cb
Date: 2015-09-04 16:27 +0200
http://bitbucket.org/pypy/pypy/changeset/d68f64dcc8cb/
Log: add a case for we don't know
diff --git a/rpython/jit/metainterp/optimizeopt/info.py
b/rpython/jit/metainterp/optimizeopt/info.py
--- a/rpython/jit/metainterp/optimizeopt/info.py
+++ b/rpython/jit/metainterp/optimizeopt/info.py
@@ -239,6 +239,9 @@
shortboxes):
if self._fields is None:
return
+ if descr.get_index() >= len(self._fields):
+ # we don't know about this item
+ return
op = optimizer.get_box_replacement(self._fields[descr.get_index()])
opnum = OpHelpers.getfield_for_descr(descr)
getfield_op = ResOperation(opnum, [structbox], descr=descr)
@@ -541,6 +544,9 @@
shortboxes):
if self._items is None:
return
+ if index >= len(self._items):
+ # we don't know about this item
+ return
item = self._items[index]
if item is not None:
op = optimizer.get_box_replacement(item)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit