Commits

Maciej Fijalkowski committed 9dc46f5

Fxi a bit too-precise tests in test_pypy_c

  • Participants
  • Parent commits d9f8a3e

Comments (0)

Files changed (4)

pypy/module/pypyjit/test_pypy_c/test_array.py

         assert loop.match("""
             i10 = int_lt(i6, 1000)
             guard_true(i10, descr=...)
+            guard_not_invalidated(descr=...)
             i11 = int_lt(i6, i7)
             guard_true(i11, descr=...)
             f13 = getarrayitem_raw(i8, i6, descr=<ArrayF 8>)
         assert loop.match("""
             i10 = int_lt(i6, 1000)
             guard_true(i10, descr=...)
+            guard_not_invalidated(descr=...)
             i11 = int_lt(i6, i7)
             guard_true(i11, descr=...)
             i13 = getarrayitem_raw(i8, i6, descr=<Array. 4>)

pypy/module/pypyjit/test_pypy_c/test_call.py

         assert loop.match("""
             i2 = int_lt(i0, i1)
             guard_true(i2, descr=...)
+            guard_not_invalidated(descr=...)
             i3 = force_token()
             i4 = int_add(i0, 1)
             --TICK--
         """, [1000])
         loop, = log.loops_by_id('call')
         assert loop.match_by_id('call', '''
-        guard_not_invalidated(descr=<.*>)
         i1 = force_token()
         ''')
 

pypy/module/pypyjit/test_pypy_c/test_containers.py

         # gc_id call is hoisted out of the loop, the id of a value obviously
         # can't change ;)
         assert loop.match_by_id("getitem", """
+            ...
             i26 = call(ConstClass(ll_dict_lookup), p18, p6, i25, descr=...)
             ...
             p33 = getinteriorfield_gc(p31, i26, descr=<InteriorFieldDescr <FieldP dictentry.value .*>>)

pypy/module/pypyjit/test_pypy_c/test_misc.py

         assert loop0.match(expected)
         # XXX: The retracing fails to form a loop since j
         # becomes constant 0 after the bridge and constant 1 at the end of the
-        # loop. A bridge back to the peramble is produced instead.        
+        # loop. A bridge back to the peramble is produced instead.
         #assert loop1.match(expected)
 
     def test_factorial(self):
             i19 = int_add(i12, 1)
             setfield_gc(p9, i19, descr=<FieldS .*W_AbstractSeqIterObject.inst_index .*>)
             guard_nonnull_class(p17, ..., descr=...)
+            guard_not_invalidated(descr=...)
             i21 = getfield_gc(p17, descr=<FieldS .*W_Array.*.inst_len .*>)
             i23 = int_lt(0, i21)
             guard_true(i23, descr=...)