Esempio n. 1
0
 def test_no_of_loops_hexguards(self):
     data = [preparse("""
     # Loop 0 : loop with 39 ops
     debug_merge_point('', 0)
     guard_class(p4, 141310752, descr=<Guard0x10abcdef0>) [p0, p1]
     p60 = getfield_gc(p4, descr=<GcPtrFieldDescr 16>)
     guard_nonnull(p60, descr=<Guard0x10abcdef1>) [p0, p1]
     """), preparse("""
     # Loop 1 : loop with 46 ops
     p21 = getfield_gc(p4, descr=<GcPtrFieldDescr 16>)
     """)]
     loops = splitloops(data)
     assert len(loops) == 2
Esempio n. 2
0
 def test_no_of_loops_hexguards(self):
     data = [preparse("""
     # Loop 0 : loop with 39 ops
     debug_merge_point('', 0)
     guard_class(p4, 141310752, descr=<Guard0x10abcdef0>) [p0, p1]
     p60 = getfield_gc(p4, descr=<GcPtrFieldDescr 16>)
     guard_nonnull(p60, descr=<Guard0x10abcdef1>) [p0, p1]
     """), preparse("""
     # Loop 1 : loop with 46 ops
     p21 = getfield_gc(p4, descr=<GcPtrFieldDescr 16>)
     """)]
     loops = splitloops(data)
     assert len(loops) == 2
Esempio n. 3
0
 def test_non_contiguous_loops(self):
     data = [preparse("""
     # Loop 1 : loop with 39 ops
     debug_merge_point('', 0)
     guard_class(p4, 141310752, descr=<Guard5>) [p0, p1]
     p60 = getfield_gc(p4, descr=<GcPtrFieldDescr 16>)
     guard_nonnull(p60, descr=<Guard6>) [p0, p1]
     """), preparse("""
     # Loop 4 : loop with 46 ops
     p21 = getfield_gc(p4, descr=<GcPtrFieldDescr 16>)
     """)]
     real_loops, all_loops = splitloops(data)
     assert len(all_loops) == 2
     assert len(real_loops) == 5