[pypy-svn] pypy out-of-line-guards-2: Finish adapting to out-of-line-guards-2.
arigo
commits-noreply at bitbucket.org
Fri May 6 15:24:30 CEST 2011
Author: Armin Rigo <arigo at tunes.org>
Branch: out-of-line-guards-2
Changeset: r43928:6ab51a504cbb
Date: 2011-05-06 13:22 +0000
http://bitbucket.org/pypy/pypy/changeset/6ab51a504cbb/
Log: Finish adapting to out-of-line-guards-2.
diff --git a/pypy/module/pypyjit/test_pypy_c/test_pypy_c_new.py b/pypy/module/pypyjit/test_pypy_c/test_pypy_c_new.py
--- a/pypy/module/pypyjit/test_pypy_c/test_pypy_c_new.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_pypy_c_new.py
@@ -509,15 +509,15 @@
i20 = int_add(i11, 1)
i21 = force_token()
setfield_gc(p4, i20, descr=<.* .*W_AbstractSeqIterObject.inst_index .*>)
+ guard_not_invalidated(descr=<Guard4>)
i23 = int_lt(i18, 0)
- guard_false(i23, descr=<Guard4>)
+ guard_false(i23, descr=<Guard5>)
i25 = int_ge(i18, i9)
- guard_false(i25, descr=<Guard5>)
- i26 = int_mul(i18, i10)
- i27 = int_add_ovf(i7, i26)
- guard_no_overflow(descr=<Guard6>)
+ guard_false(i25, descr=<Guard6>)
+ i27 = int_add_ovf(i7, i18)
+ guard_no_overflow(descr=<Guard7>)
--TICK--
- jump(p0, p1, p2, p3, p4, p5, p6, i27, i18, i9, i10, i20, i12, p13, i14, i15, descr=<Loop0>)
+ jump(..., descr=<Loop0>)
""")
def test_exception_inside_loop_1(self):
@@ -536,11 +536,12 @@
assert loop.match("""
i5 = int_is_true(i3)
guard_true(i5, descr=<Guard3>)
+ guard_not_invalidated(descr=<Guard4>)
--EXC-TICK--
i12 = int_sub_ovf(i3, 1)
- guard_no_overflow(descr=<Guard5>)
+ guard_no_overflow(descr=<Guard6>)
--TICK--
- jump(p0, p1, p2, i12, descr=<Loop0>)
+ jump(..., descr=<Loop0>)
""")
def test_exception_inside_loop_2(self):
@@ -583,10 +584,11 @@
assert loop.match("""
i7 = int_lt(i4, i5)
guard_true(i7, descr=<Guard3>)
+ guard_not_invalidated(descr=<Guard4>)
--EXC-TICK--
i14 = int_add(i4, 1)
--TICK--
- jump(p0, p1, p2, p3, i14, i5, descr=<Loop0>)
+ jump(..., descr=<Loop0>)
""")
def test_chain_of_guards(self):
@@ -688,10 +690,11 @@
assert loop.match_by_id('import', """
p11 = getfield_gc(ConstPtr(ptr10), descr=<GcPtrFieldDescr pypy.objspace.std.celldict.ModuleCell.inst_w_value 8>)
guard_value(p11, ConstPtr(ptr12), descr=<Guard4>)
+ guard_not_invalidated(descr=<Guard5>)
p14 = getfield_gc(ConstPtr(ptr13), descr=<GcPtrFieldDescr pypy.objspace.std.celldict.ModuleCell.inst_w_value 8>)
p16 = getfield_gc(ConstPtr(ptr15), descr=<GcPtrFieldDescr pypy.objspace.std.celldict.ModuleCell.inst_w_value 8>)
- guard_value(p14, ConstPtr(ptr17), descr=<Guard5>)
- guard_isnull(p16, descr=<Guard6>)
+ guard_value(p14, ConstPtr(ptr17), descr=<Guard6>)
+ guard_isnull(p16, descr=<Guard7>)
""")
def test_import_fast_path(self, tmpdir):
@@ -1112,7 +1115,7 @@
# -------------------------------
entry_bridge, = log.loops_by_filename(self.filepath, is_entry_bridge=True)
ops = entry_bridge.ops_by_id('mutate', opcode='LOAD_ATTR')
- assert log.opnames(ops) == ['guard_value', 'getfield_gc', 'guard_value',
+ assert log.opnames(ops) == ['guard_value', 'guard_not_invalidated',
'getfield_gc', 'guard_nonnull_class']
# the STORE_ATTR is folded away
assert list(entry_bridge.ops_by_id('meth1', opcode='STORE_ATTR')) == []
@@ -1124,6 +1127,7 @@
i8 = getfield_gc_pure(p5, descr=<SignedFieldDescr .*W_IntObject.inst_intval.*>)
i9 = int_lt(i8, i7)
guard_true(i9, descr=.*)
+ guard_not_invalidated(descr=.*)
i11 = int_add(i8, 1)
i12 = force_token()
--TICK--
More information about the Pypy-commit
mailing list