Author: Spenser Bauman <saba...@gmail.com> Branch: remove-getarrayitem-pure Changeset: r86912:2fb300020852 Date: 2016-04-03 13:16 -0400 http://bitbucket.org/pypy/pypy/changeset/2fb300020852/
Log: Move code diff --git a/rpython/jit/metainterp/optimizeopt/heap.py b/rpython/jit/metainterp/optimizeopt/heap.py --- a/rpython/jit/metainterp/optimizeopt/heap.py +++ b/rpython/jit/metainterp/optimizeopt/heap.py @@ -447,6 +447,8 @@ pass self.force_lazy_set(fielddescr, can_cache=False) for arraydescr in effectinfo.write_descrs_arrays: + if arraydescr.is_always_pure(): + continue self.force_lazy_setarrayitem(arraydescr, can_cache=False) if arraydescr in self.corresponding_array_descrs: dictdescr = self.corresponding_array_descrs.pop(arraydescr) @@ -552,10 +554,7 @@ cf.do_setfield(self, op) def optimize_GETARRAYITEM_GC_I(self, op): - arrayinfo = self.ensure_ptr_info_arg0(op) - indexb = self.getintbound(op.getarg(1)) arraydescr = op.getdescr() - if (arraydescr.is_always_pure() and self.get_constant_box(op.getarg(0)) is not None and self.get_constant_box(op.getarg(1)) is not None): @@ -563,6 +562,8 @@ self.optimizer.make_constant(op, resbox) return + arrayinfo = self.ensure_ptr_info_arg0(op) + indexb = self.getintbound(op.getarg(1)) cf = None if indexb.is_constant(): index = indexb.getint() _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit