@@ -458,10 +458,34 @@ def testfunc(n):
458458 self .assertIsNotNone (ex )
459459 uops = get_opnames (ex )
460460 self .assertIn ("_GET_ITER_TRAD" , uops )
461+ self .assertIn ("_ITER_NEXT_INLINE" , uops )
462+ self .assertNotIn ("_GUARD_TYPE_ITER" , uops )
461463 self .assertNotIn ("_GET_ITER" , uops )
462464 self .assertNotIn ("_GET_ITER_VIRTUAL" , uops )
463465 self .assertNotIn ("_GET_ITER_SELF" , uops )
464466
467+ def test_get_iter_trad_set (self ):
468+ s = set (range (10 ))
469+ def testfunc (n ):
470+ total = 0
471+ while n :
472+ n -= 1
473+ for value in s :
474+ total += value
475+ break
476+ return total
477+
478+ total = testfunc (TIER2_THRESHOLD )
479+ self .assertEqual (total , next (iter (s )) * TIER2_THRESHOLD )
480+ ex = get_first_executor (testfunc )
481+ self .assertIsNotNone (ex )
482+ uops = get_opnames (ex )
483+ self .assertIn ("_GET_ITER_TRAD" , uops )
484+ self .assertIn ("_ITER_NEXT_INLINE" , uops )
485+ self .assertNotIn ("_GUARD_TYPE_ITER" , uops )
486+ self .assertNotIn ("_GET_ITER" , uops )
487+ self .assertNotIn ("_GET_ITER_VIRTUAL" , uops )
488+ self .assertNotIn ("_GET_ITER_SELF" , uops )
465489
466490 def test_for_iter_range (self ):
467491 def testfunc (n ):
0 commit comments