@@ -1937,23 +1937,8 @@ def testfunc(n):
19371937 self .assertEqual (len (res ), TIER2_THRESHOLD )
19381938 uops = get_opnames (ex )
19391939 self .assertNotIn ("_GUARD_NOS_INT" , uops )
1940- self .assertIn ("_GET_LEN" , uops )
1941- self .assertIn ("_POP_TOP_LOAD_CONST_INLINE_BORROW" , uops )
1940+ self .assertIn ("_LOAD_CONST_INLINE_BORROW" , uops )
19421941
1943- def test_get_len_with_non_const_tuple (self ):
1944- def testfunc (n ):
1945- x = 0.0
1946- for _ in range (n ):
1947- match (object (), object ()):
1948- case [_, _]:
1949- x += 1.0
1950- return x
1951- res , ex = self ._run_with_optimizer (testfunc , TIER2_THRESHOLD )
1952- self .assertEqual (int (res ), TIER2_THRESHOLD )
1953- uops = get_opnames (ex )
1954- self .assertNotIn ("_GUARD_NOS_INT" , uops )
1955- self .assertIn ("_GET_LEN" , uops )
1956- self .assertIn ("_POP_TOP_LOAD_CONST_INLINE_BORROW" , uops )
19571942
19581943 def test_get_len_with_non_tuple (self ):
19591944 def testfunc (n ):
@@ -1969,22 +1954,6 @@ def testfunc(n):
19691954 self .assertNotIn ("_GUARD_NOS_INT" , uops )
19701955 self .assertIn ("_GET_LEN" , uops )
19711956
1972- def test_get_len_with_immortal_tuple (self ):
1973- def testfunc (n ):
1974- class TestObject :
1975- pass
1976- x = 0.0
1977- for _ in range (n ):
1978- match TestObject .__mro__ :
1979- case (_, _,):
1980- x += 1.0
1981- return x
1982- res , ex = self ._run_with_optimizer (testfunc , TIER2_THRESHOLD )
1983- self .assertEqual (int (res ), TIER2_THRESHOLD )
1984- uops = get_opnames (ex )
1985- self .assertIn ("_GET_LEN" , uops )
1986- self .assertIn ("_LOAD_CONST_INLINE_BORROW" , uops )
1987-
19881957
19891958 def test_binary_op_subscr_tuple_int (self ):
19901959 def testfunc (n ):
0 commit comments