Commits

Armin Rigo committed d5dd946

Fix some tests. Next is test_range_iter, which shows
unexpected extra getarrayitem_gc's.

  • Participants
  • Parent commits 9b9f26c
  • Branches out-of-line-guards-2

Comments (0)

Files changed (2)

File pypy/module/pypyjit/test_pypy_c/model.py

         # to repeat it every time
         ticker_check = """
             ticker0 = getfield_raw(ticker_address, descr=<SignedFieldDescr pypysig_long_struct.c_value .*>)
-            ticker1 = int_sub(ticker0, 1)
+            ticker1 = int_sub(ticker0, _)
             setfield_raw(ticker_address, ticker1, descr=<SignedFieldDescr pypysig_long_struct.c_value .*>)
             ticker_cond0 = int_lt(ticker1, 0)
             guard_false(ticker_cond0, descr=...)

File pypy/module/pypyjit/test_pypy_c/test_pypy_c_new.py

         entry_bridge, = log.loops_by_filename(self.filepath, is_entry_bridge=True)
         ops = entry_bridge.ops_by_id('meth1', opcode='LOOKUP_METHOD')
         assert log.opnames(ops) == ['guard_value', 'getfield_gc', 'guard_value',
-                                    'getfield_gc', 'guard_value']
+                                    'guard_not_invalidated']
         # the second LOOKUP_METHOD is folded away
         assert list(entry_bridge.ops_by_id('meth2', opcode='LOOKUP_METHOD')) == []
         #
         assert loop.match("""
             i15 = int_lt(i6, i9)
             guard_true(i15, descr=<Guard3>)
+            guard_not_invalidated(descr=<Guard4>)
             i16 = force_token()
             i17 = int_add_ovf(i10, i6)
-            guard_no_overflow(descr=<Guard4>)
+            guard_no_overflow(descr=<Guard5>)
             i18 = force_token()
             i19 = int_add_ovf(i10, i17)
-            guard_no_overflow(descr=<Guard5>)
+            guard_no_overflow(descr=<Guard6>)
             --TICK--
             jump(p0, p1, p2, p3, p4, p5, i19, p7, i17, i9, i10, p11, p12, p13, p14, descr=<Loop0>)
         """)
         assert loop.match("""
             i14 = int_lt(i6, i9)
             guard_true(i14, descr=<Guard3>)
+            guard_not_invalidated(descr=<Guard4>)
             i15 = force_token()
             i17 = int_add_ovf(i8, 1)
-            guard_no_overflow(descr=<Guard4>)
+            guard_no_overflow(descr=<Guard5>)
             i18 = force_token()
             i20 = int_sub(i17, 1)
             --TICK--
         """)
 
     def test_default_and_kw(self):
-        py.test.skip("Wait until we have saner defaults strat")
         def main(n):
             def f(i, j=1):
                 return i + j
         assert loop.match("""
             i7 = int_lt(i5, i6)
             guard_true(i7, descr=<Guard3>)
+            guard_not_invalidated(descr=<Guard4>)
             i9 = int_add_ovf(i5, 2)
-            guard_no_overflow(descr=<Guard4>)
+            guard_no_overflow(descr=<Guard5>)
             --TICK--
             jump(p0, p1, p2, p3, p4, i9, i6, descr=<Loop0>)
         """)
         assert loop.match("""
             i9 = int_lt(i5, i6)
             guard_true(i9, descr=<Guard3>)
+            guard_not_invalidated(descr=<Guard4>)
             i10 = int_add_ovf(i5, i7)
-            guard_no_overflow(descr=<Guard4>)
+            guard_no_overflow(descr=<Guard5>)
             --TICK--
-            jump(p0, p1, p2, p3, p4, i10, i6, i7, p8, descr=<Loop0>)
+            jump(p0, p1, p2, p3, p4, i10, i6, p7, i7, p8, descr=<Loop0>)
         """)
 
     def test_mixed_type_loop(self):