Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r89136:db7c07b019cd Date: 2016-12-18 13:04 +0100 http://bitbucket.org/pypy/pypy/changeset/db7c07b019cd/
Log: Test and fix: ASSERT_NOT_NONE should not have any effect with the heapcache diff --git a/rpython/jit/metainterp/heapcache.py b/rpython/jit/metainterp/heapcache.py --- a/rpython/jit/metainterp/heapcache.py +++ b/rpython/jit/metainterp/heapcache.py @@ -230,7 +230,8 @@ opnum != rop.PTR_EQ and opnum != rop.PTR_NE and opnum != rop.INSTANCE_PTR_EQ and - opnum != rop.INSTANCE_PTR_NE): + opnum != rop.INSTANCE_PTR_NE and + opnum != rop.ASSERT_NOT_NONE): for box in argboxes: self._escape_box(box) @@ -263,7 +264,8 @@ opnum == rop.SETFIELD_RAW or opnum == rop.SETARRAYITEM_RAW or opnum == rop.SETINTERIORFIELD_RAW or - opnum == rop.RAW_STORE): + opnum == rop.RAW_STORE or + opnum == rop.ASSERT_NOT_NONE): return if (rop._OVF_FIRST <= opnum <= rop._OVF_LAST or rop._NOSIDEEFFECT_FIRST <= opnum <= rop._NOSIDEEFFECT_LAST or diff --git a/rpython/jit/metainterp/test/test_ajit.py b/rpython/jit/metainterp/test/test_ajit.py --- a/rpython/jit/metainterp/test/test_ajit.py +++ b/rpython/jit/metainterp/test/test_ajit.py @@ -3510,6 +3510,7 @@ self.check_resops(call_f=1) def test_look_inside_iff_virtual(self): + from rpython.rlib.debug import ll_assert_not_none # There's no good reason for this to be look_inside_iff, but it's a test! @look_inside_iff(lambda arg, n: isvirtual(arg)) def f(arg, n): @@ -3529,7 +3530,7 @@ if n == 0: i += f(a, n) else: - i += f(A(2), n) + i += f(ll_assert_not_none(A(2)), n) res = self.meta_interp(main, [0], enable_opts='') assert res == main(0) self.check_resops(call_i=1, getfield_gc_i=0) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit