+
    Bip                    V   ^ RI t ^ RIt^ RIHtHt ^ RIt^ RIt^ RIt^ RIt ^ RI	t	^ RIHt ^ RIHtHtHt R tR tR t ! R R	]4      t ! R
 R]P*                  4      t ! R R]4      t ! R R]4      t ! R R]4      t]R8X  d   ]P6                  ! 4        R# R#   ]
 d    Rt	 Li ; i)    N)combinationsproduct)support)BytecodeTestCaseCfgOptimizationTestCaseCompilationStepTestCasec                 v    \         P                  ! R V  R24      p/ p\        W4       VR,          P                  # )z=
        def f(x):
            match x:
                case z#:
                    pass
        f)textwrapdedentexec__code__)patternsource	namespaces   &  */usr/lib/python3.14/test/test_peepholer.py compile_pattern_with_fast_localsr      sE    __ Y 		F IS>"""    c                 *   ^ p\         P                  ! V 4       F  pVP                  V8X  g   K  V^,          pK!  	  \        V R4      '       d   V P                  p V P
                   F)  p\        VR4      '       g   K  V\        WA4      ,          pK+  	  V# )r   r   co_code)disget_instructionsopnamehasattrr   	co_constscount_instr_recursively)r
   r   countinstrcs   &&   r   r   r       s{    E%%a(<<6!QJE ) q*JJ[[1i  ,Q77E  Lr   c                 l    \        \        P                  4       F  w  rW^ ,          8X  g   K  Vu # 	  R# r   N)	enumerateopcode_nb_ops)arginb_ops   &  r   get_binop_argvalr(   -   s%    fnn-(?H .r   c                   "  a  ] tR t^4t o R tR tR tR tR tR t	R t
R tR	 tR
 tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR t] PB                  ! R4      R 4       t"R t#R  t$R! t%R" t&R# t'R$ t(R% t)R&t*V t+R'# )(TestTranformsc           
     ^   \        \        P                  ! V4      4      pV Uu/ uF  q3P                  VbK  	  ppV F  pR VP                  9  d   K  WCP
                  ,          pVP                  R9   dE   V P                  VP                   RVP                   RVP                   RVP                   24       VP                  R9   g   K  VP                  R8X  g   K  V P                  VP                   RVP                   RVP                   RVP                   24       K  	  R# u upi )JUMP_z at z
 jumps to RETURN_VALUEN)JUMP_BACKWARDJUMP_FORWARD)listr   r   offsetr   argvalfail)selfcodeinstructionsr   targetstgts   &&    r   check_jump_targets TestTranforms.check_jump_targets6   s    C00674@AL5<<&LA!Eell*,,'Czz>>		U\\N$u||n =&&)jj\cjj\C D  AA

n,		U\\N$u||n =&&)jj\cjj\C D " Bs   D*c                &   \         P                  ! V4      p\        \         P                  ! V4      4      p\	        R V 4       4      p\        R V 4       4      pV P                  V^ 4       V P                  V\        VP                  4      4       R# )z0Check that the lnotab byte offsets are sensible.c              3   2   "   T F  q^ ,          x  K  	  R# 5ir!    .0ts   & r   	<genexpr>-TestTranforms.check_lnotab.<locals>.<genexpr>M        0AQ44   c              3   2   "   T F  q^ ,          x  K  	  R# 5ir!   r=   r>   s   & r   rA   rB   N   rC   rD   N)
r   _get_code_objectr0   findlinestartsminmaxassertGreaterEqual
assertLesslenr   )r4   r5   lnotabmin_bytecodemax_bytecodes   &&   r   check_lnotabTestTranforms.check_lnotabG   sp    ##D)c((./ 000000a0c$,,&78r   c                    R  pV P                  VR4       V P                  VR4       V P                  VR4       V P                  V4       R# )c                     V ^8X  g   ? R# R# )   Nr=   xs   &r   unot%TestTranforms.test_unot.<locals>.unotW   s    6 r   	UNARY_NOTPOP_JUMP_IF_FALSEPOP_JUMP_IF_TRUENassertNotInBytecodeassertInBytecoderP   )r4   rW   s   & r   	test_unotTestTranforms.test_unotU   sI    	 	  {3  ':;d$67$r   c                    R FY  w  rpV P                  VR7      ;_uu_ 4        \        VRR4      pV P                  WBV4       V P                  V4       RRR4       K[  	  R#   + '       g   i     Kp  ; i)
not a is bline singleN))rb   IS_OP   )znot a is not brg   r   )z
not a in bCONTAINS_OPrh   )znot a not in bri   r   )subTestcompiler^   rP   )r4   rd   cmp_opinvertr5   s   &    r   test_elim_inversion_of_is_or_in-TestTranforms.test_elim_inversion_of_is_or_in_   sf    % D& 4((tR2%%dF;!!$' )(% )((s   1A""A3c                   R  pR pR pVR3VR3VR33 F^  w  rEV P                  VR7      ;_uu_ 4        V P                  VR4       V P                  VRV4       V P                  V4       RRR4       K`  	  R	 pV P                  VR4       V P                  VRR4       V P                  V4       R#   + '       g   i     K  ; i)
c                      R p R p V # Nr=   rU   s    r   r
   0TestTranforms.test_global_as_constant.<locals>.fm   s    AAHr   c                  
    R p V # Tr=   rU   s    r   g0TestTranforms.test_global_as_constant.<locals>.gq   s    AHr   c                  
    R p V # )Fr=   rU   s    r   h0TestTranforms.test_global_as_constant.<locals>.ht   s    AHr   NTF)funcLOAD_GLOBAL
LOAD_CONSTc                     R# )z1Adding a docstring made this test fail in Py2.5.0Nr=   r=   r   r   r
   rs   ~   s    r   )rj   r]   r^   rP   )r4   r
   rv   ry   r{   elems   &     r   test_global_as_constant%TestTranforms.test_global_as_constantk   s    			 t9q$i!U<JD4((((}=%%dL$?!!$' )( =	 	  M2at4! )((s   7B22Cc                    R  pR F  pV P                  W4       K  	  R F  pV P                  W4       K  	  V P                  V4       R# )c                       K  rh   )r0   r=   r   r   r
   'TestTranforms.test_while_one.<locals>.f   s    r   N)r}   rZ   )r.   r\   )r4   r
   r   s   &  r   test_while_oneTestTranforms.test_while_one   sG    	 8D$$Q- 8&D!!!* '!r   c                0   R F{  w  rV P                  VR7      ;_uu_ 4        \        VRR4      pV P                  W24       V P                  VR4       V P                  VR4       V P	                  V4       RRR4       K}  	  R#   + '       g   i     K  ; i)a, = a,rc   re   rf   BUILD_TUPLEUNPACK_SEQUENCEN))r   r}   )za, b = a, bSWAP)za, b, c = a, b, cr   rj   rk   r^   r]   rP   r4   rd   r   r5   s   &   r   test_pack_unpackTestTranforms.test_pack_unpack   s    JD
 4((tBx0%%d1((}=((/@A!!$' )(
 )((s   ABBc           	        R	 Fk  w  rV P                  VR7      ;_uu_ 4        \        VRR4      pV P                  VRV4       V P                  VR4       V P	                  V4       RRR4       Km  	  \        \        \        \        R4      4      4      RR4      pV P                  VR4       \        P                  ! V4       Uu. uF  pVP                  R8X  g   K  VNK  	  ppV P                  \        V4      ^4       V P	                  V4       R pV P	                  V4       R#   + '       g   i     EK5  ; iu upi )
	a = 1,2,3Nrc   re   rf   r}   r   '  c                     . ^ N^N^N^N^N^N^N^N^N^	N^ N^N^N^N^N^N^N^N^N^	N^ N^N^N^N^N^N^N^N^N^	N^ N^N^N^N^N^N^N^N^N^	N^ N^N^N^N^N^N^N^N^N^	N^ N^N^N^N^N^N^N^N^N^	N^ N^N^N^N^N^N^N^N^N^	N^ N^N^N^N^N^N^N^N^N^	N^ N^N^N^N^N^N^N^N^N^	N^ N^N^N^N^N^N^N^N^N^	N( 3 R# r!   r=   r=   r   r   craterGTestTranforms.test_constant_folding_tuples_of_constants.<locals>.crater   s    "#%&()+, "#%&()+,       ! #$ &' )* ,- 	 	 	 	 	  !	 #$	 &'	 )*	 ,-	
 
 
 
 
 
  !
 #$
 &'
 )*
 ,-       ! #$ &' )* ,-       ! #$ &' )* ,-       ! #$ &' )* ,-       ! #$ &' )* ,-       ! #$ &' )* ,-  r   ))r   rh   rT      )z("a","b","c")abr   )za,b,c,d = 1,2,3,4)rh   rT   r      )z(None, 1, None)Nrh   N)z((1, 2), 3, 4)rh   rT   r   r   )rj   rk   r^   r]   rP   reprtupleranger   r   r   assertEqualrL   )r4   rd   r   r5   r   load_constsr   s   &      r   )test_constant_folding_tuples_of_constants7TestTranforms.test_constant_folding_tuples_of_constants   s   JD 4((tBx0%%dL$?((}=!!$'	 )( tE%,/0H=  }5*-*>*>t*D ?*D!&!= u*D ?[)1-$
	 	&!? )((?s   AD&D;D;&D8c                   R Fk  w  rV P                  VR7      ;_uu_ 4        \        VRR4      pV P                  VRV4       V P                  VR4       V P	                  V4       RRR4       Km  	  R#   + '       g   i     K  ; i)a in [1,2,3]Nrc   re   rf   r}   
BUILD_LIST))r   r   )za not in ["a","b","c"]r   )za in [None, 1, None]r   )za not in [(1, 2), 3, 4]r   r   r   s   &   r   (test_constant_folding_lists_of_constants6TestTranforms.test_constant_folding_lists_of_constants   su    JD 4((tR2%%dL$?((|<!!$'	 )( )((s   AA44Bc           	        R \        0 Rm4      3R\        0 Rm4      3R\        ^R04      3R\        0 Rm4      3R\        0 Rm4      33 Fk  w  rV P                  VR7      ;_uu_ 4        \        VRR4      pV P                  VR	4       V P	                  VR
V4       V P                  V4       RRR4       Km  	  R pR pV P                  V! ^4      4       V P                  V! ^4      '       * 4       V P                  V4       V P                  V! ^4      '       * 4       V P                  V! ^4      4       V P                  V4       R#   + '       g   i     EK  ; i)za in {1,2,3}za not in {"a","b","c"}za in {None, 1, None}Nza not in {(1, 2), 3, 4}za in {1, 2, 3, 3, 2, 1}rc   re   rf   	BUILD_SETr}   c                     V R9   # rh      rh   rT   r   r=   r   s   &r   r
   @TestTranforms.test_constant_folding_sets_of_constants.<locals>.f   s    	>!r   c                     V R9  # r   r=   r   s   &r   rv   @TestTranforms.test_constant_folding_sets_of_constants.<locals>.g   s    I%%r   r   >   r   r   r   >   r   r   r   )	frozensetrj   rk   r]   r^   rP   
assertTrue)r4   rd   r   r5   r
   rv   s   &     r   'test_constant_folding_sets_of_constants5TestTranforms.test_constant_folding_sets_of_constants   s(    Yy12%y'AB#Y4y%9:&	.(AB&	)(<=JD 4((tR2(({;%%dL$?!!$'	 )(	"	& 	!AaD!!AaD!!!' )((s   (AEEc                "   . ROpV Fp  w  r#V P                  W#R7      ;_uu_ 4        \        VRR4      pVe   V P                  VRV4       MV P                  VR4       V P	                  V4       RRR4       Kr  	  R#   + '       g   i     K  ; i)(0, )[0]N)expropargre   rf   LOAD_SMALL_INT))r   r   )(1 + 2, )[0]r   )z(2 + 2 * 2, )[0]   )z(1, (1 + 2 + 3, ))[1][0]r   )1 + 2r   )z2 + 2 * 2 // 2 - 2rT   )z
(255, )[0]   )z
(256, )[0]N)z(1000, )[0]N)z(1 - 2, )[0]N)z255 + 0r   )z255 + 1N)z-1N)z--1rh   )z--255r   )z--256N)z~1N)z~~1rh   )z~~255r   )z~~256N)z++255r   )z++256Nr   )r4   testsr   r   r5   s   &    r   test_constant_folding_small_int-TestTranforms.test_constant_folding_small_int   s    
0 !KD455tR2$))$0@%H,,T3CD!!$' 65 !555s   A	A==Bc                ,   ^pRRRRRRRRRRRRVRR^3RRRRVRRR3R.pV F  w  ppppppV P                  W6R7      ;_uu_ 4        \        VR	R
4      p	V'       d(   V P                  WVR7       V P                  WVR7       MV P                  WVR7       V P	                  V	4       RRR4       K  	  R p
\
        P                  ! V
4       F  pV P                  VP                  R4       K!  	  V P	                  V
4       R#   + '       g   i     K  ; i)   NTr   Fz+++1CALL_INTRINSIC_1z+++xr   is_optimizedre   rf   r2   c                      R# )      ?       r=   r=   r   r   negzero<TestTranforms.test_constant_folding_unaryop.<locals>.negzero<  s    r   UNARY_)z-0UNARY_NEGATIVENTr   r   )z-0.0r   NTr}   r   )z
-(1.0-1.0)r   NTr}   r   )z-0.5r   NTr}   g      )z---1r   NTr}   )z---""r   NFNN)z~~~1UNARY_INVERTNTr}   )z~~~""r   NFNN)znot not TruerY   NTr}   T)z	not not xrY   NT	LOAD_NAMErV   )z---xr   NFNN)z~~~xr   NFNN)z~Truer   NFNN)	rj   rk   r]   r^   rP   r   r   assertNotStartsWithr   )r4   intrinsic_positiver   r   original_opcodeoriginal_argvalr   optimized_opcodeoptimized_argvalr5   r   r   s   &           r   test_constant_folding_unaryop+TestTranforms.test_constant_folding_unaryop  s;   EFLFD@B>ID');TCSUVW?=');UD$O>
2 
4CCtR2,,T?,[))$IY)Z))$)X!!$' DC 	 ))'2E$$U\\8< 3'" DCCs   A!DDc           	     8   . RNRNRNRNRNRNRNRNRNRNRNR NR!NR"NR#NR$NR%NR&NR'NR(NR)NR*NR+NR,NR-NR.NR/NR0NR1NR2NR3NR4NR5NR6NR7NR8NR9NR:NR;NR<NR=NR>NR?NR@NRANRBNRCNRDNRENRFNRGNRHNRINRJNRKNpV F  w  pppppV P                  W$R7      ;_uu_ 4        \        VRR4      p\        V4      pV'       d)   V P                  VRVR7       V P	                  WuVR7       MV P	                  VRVR7       V P                  V4       RRR4       K  	  \        RRR4      pV P	                  VRR	4       V P                  R
R	,          VP                  4       V P                  V4       \        RRR4      pV P	                  VRR4       V P                  ^R,          VP                  4       V P                  V4       \        RRR4      pV P	                  VRR4       V P                  ^R,          VP                  4       V P                  V4       \        RRR4      pV P	                  VRR4       V P                  VR4       V P                  V4       \        RRR4      pV P	                  VRR4       V P                  VR4       V P                  V4       \        RRR4      pV P	                  VRR4       V P                  VR4       V P                  V4       \        RRR4      pV P	                  VR4       V P                  V4       R#   + '       g   i     EK  ; i)Lr   Nr}   r   re   rf   	BINARY_OPr   z	"x"*10000r   rV   z1<<1000  z2**1000z"foo"[0]r
   u	   "a￿"[1]u   ￿u	   "𒍅"[0]u   𒍅z	"fuu"[10])r   NB_ADDTr   r   )z	1 + 2 + 3r   Tr   r   )z1 + ""r   FNN)z1 - 2NB_SUBTRACTTr}   r   )z	1 - 2 - 3r   Tr}   )z1 - ""r   FNN)z2 * 2NB_MULTIPLYTr   r   )z	2 * 2 * 2r   Tr      )z2 / 2NB_TRUE_DIVIDETr}   r   )z	2 / 2 / 2r   Tr}         ?)z2 / ""r   FNN)z2 // 2NB_FLOOR_DIVIDETr   rh   )z2 // 2 // 2r   Tr   r   )z2 // ""r   FNN)z2 % 2NB_REMAINDERTr   r   )z	2 % 2 % 2r   Tr   r   )z2 % ()r   FNN)z2 ** 2NB_POWERTr   r   )z2 ** 2 ** 2r   Tr      )z2 ** ""r   FNN)z2 << 2	NB_LSHIFTTr   r   )z2 << 2 << 2r   Tr       )z2 << ""r   FNN)z2 >> 2	NB_RSHIFTTr   r   )z2 >> 2 >> 2r   Tr   r   )z2 >> ""r   FNN)z2 | 2NB_ORTr   rT   )z	2 | 2 | 2r   Tr   rT   )z2 | ""r   FNN)z2 & 2NB_ANDTr   rT   )z	2 & 2 & 2r   Tr   rT   )z2 & ""r   FNN)z2 ^ 2NB_XORTr   r   )z	2 ^ 2 ^ 2r   Tr   rT   )z2 ^ ""r   FNN)z(1, )[0]	NB_SUBSCRTr   rh   )z	(1, )[-1]r   Tr   rh   )r   r   Tr   r   )z(1, (1, 2))[1][1]r   Tr   rT   )z(1, 2)[2-1]r   Tr   rT   )z(1, (1, 2))[1][2-1]r   Tr   rT   )z(1, (1, 2))[1:6][0][2-1]r   Tr   rT   )z"a"[0]r   Tr}   r   )z("a" + "b")[1]r   Tr}   r   )z("a" + "b", )[0][1]r   Tr}   r   )z("a" * 10)[9]r   Tr}   r   )z(1, )[1]r   FNN)z	(1, )[-2]r   FNN)z"a"[1]r   FNN)z"a"[-2]r   FNN)z("a" + "b")[2]r   FNN)z("a" + "b", )[0][2]r   FNN)z("a" + "b", )[1][0]r   FNN)z("a" * 10)[10]r   FNN)z(1, (1, 2))[2:6][0][2-1]r   FNN)rj   rk   r(   r]   r^   rP   assertNotInr   )	r4   r   r   r'   r   r   r   r5   	nb_op_vals	   &        r   test_constant_folding_binop)TestTranforms.test_constant_folding_binopC  s   8
:8
>8
 48
 =	8

 A8
 98
 @8
 D8
 A8
 E8
 <8
 E8
 J8
 >8
 A8
  E!8
" :#8
$ >%8
& D'8
( 7)8
* ?+8
, E-8
. 8/8
0 ?18
2 D38
4 858
6 :78
8 >98
: 3;8
< ;=8
> ??8
@ 4A8
B ;C8
D ?E8
F 4G8
H AI8
J BK8
L EM8
N JO8
P DQ8
R LS8
T QU8
V =W8
X EY8
Z J[8
\ D]8
^ 9_8
` :a8
b 7c8
d 8e8
f ?g8
h Di8
j Dk8
l ?m8
n Io8
@ 
4CCtR2,U3	,,T;y,Q))$IY)Z))$I)N!!$' DC  {B1dL%8UDNN3$y"h/dL$7D$..1$y"h/dL$7D$..1$ z2x0dL#6  {3$*B9dL(;  k2$ ("h7dL,?  {3$ {B1dK0$[ DCCs   A.LLc                    . ROpV F6  p\        \        P                  ! V4      RR4      pV P                  VR4       K8  	  R# )J
            (-
             -
             -
             1)
            re   rf   NOPN)
r   zY
            (1
             +
             2
             +
             3)
            z@
            (1,
             2,
             3)[0]
            z=
            [1,
             2,
             3]
            z=
            {1,
             2,
             3}
            zc
            1 in [
               1,
               2,
               3
            ]
            zc
            1 in {
               1,
               2,
               3
            }
            zn
            for _ in [1,
                      2,
                      3]:
                pass
            zn
            for _ in [1,
                      2,
                      x]:
                pass
            zn
            for _ in {1,
                      2,
                      3}:
                pass
            )rk   r   r   r]   )r4   sourcesr   r5   s   &   r   )test_constant_folding_remove_nop_location7TestTranforms.test_constant_folding_remove_nop_location  s>    F
P F8??62BAD$$T51 r   c                   R  pV P                  VRR4       \        P                  ! V4       Uu. uF  pVP                  R8X  g   K  VNK  	  ppV P	                  \        V4      ^4       V P                  V4       R# u upi )c                     V # rr   r=   rU   s   &r   r
   /TestTranforms.test_elim_extra_return.<locals>.f  s    Hr   r}   Nr-   )r]   r   r   r   r   rL   rP   r4   r
   r   returnss   &   r   test_elim_extra_return$TestTranforms.test_elim_extra_return  sv    	  L$7&)&:&:1&= =&=U"\\^; 5&= =Wq)!=s   A=A=c                H   R  pV P                  V4       V P                  VR4       V P                  VR4       \        P                  ! V4       Uu. uF  pVP                  R8X  g   K  VNK  	  ppV P                  \        V4      ^4       V P                  V4       R# u upi )c                     V '       d   V# T# rr   r=   )cond
true_valuefalse_values   &&&r   r
   1TestTranforms.test_elim_jump_to_return.<locals>.f  s    "&J &$&r   r/   r.   r-   N)r9   r]   r   r   r   r   rL   rP   r   s   &   r   test_elim_jump_to_return&TestTranforms.test_elim_jump_to_return  s    	& 	"  N3  O4&)&:&:1&= =&=U"\\^; 5&= =Wq)!=s   B)Bc                P    R  pV P                  V4       V P                  V4       R# )c                  ~    \         '       d'   \        '       g   \        '       d   \        4        R # R # \	        4        R # rr   )r   r   dfoobazr=   r   r   r
   6TestTranforms.test_elim_jump_to_uncond_jump.<locals>.f  s"    qAqE  r   Nr9   rP   r4   r
   s   & r   test_elim_jump_to_uncond_jump+TestTranforms.test_elim_jump_to_uncond_jump  s%    	 	"!r   c                P    R  pV P                  V4       V P                  V4       R# )c                  b    X '       d'   \         '       g   \        '       g   K"  \        4       p K.  R # rr   )r   r  r  r   s    r   r
   7TestTranforms.test_elim_jump_to_uncond_jump2.<locals>.f)  s    AqA	 r   Nr  r  s   & r   test_elim_jump_to_uncond_jump2,TestTranforms.test_elim_jump_to_uncond_jump2'  s%    	 	"!r   c                ~   R  pV P                  V4       V P                  V4       V P                  \        VR4      ^4       R pV P                  V4       V P                  V4       V P                  \        VR4      ^4       R pV P                  V4       V P                  V4       V P                  \        VR4      ^4       V P                  \        VR4      ^4       R pV P                  V4       V P                  V4       V P                  \        VR4      ^4       V P                  \        VR4      ^4       R# )c                 .    T ;'       d    T;'       d    T# rr   r=   r   s   &&&r   r
   7TestTranforms.test_elim_jump_to_uncond_jump3.<locals>.f5  s      W1  r   rZ   c                 .    T ;'       g    T;'       g    T# rr   r=   r   s   &&&r   r
   r  <  s      V!  r   r[   c                 .    T ;'       d    T;'       g    T# rr   r=   r   s   &&&r   r
   r  C  s    WW1  r   c                 .    T ;'       g    T;'       d    T# rr   r=   r   s   &&&r   r
   r  K  s    VV!  r   N)r9   rP   r   r   r  s   & r   test_elim_jump_to_uncond_jump3,TestTranforms.test_elim_jump_to_uncond_jump32  s$   	 	"!04GH!L	 	"!04FGK	 	"!04GH!L04FGK	 	"!04GH!L04FGKr   c                .    R  pV P                  V4       R# )c                  R    \        ^4       F  p V ^8  g   K  \        V 4       K  	  R# )r   N)r   print)r&   s    r   r
   7TestTranforms.test_elim_jump_to_uncond_jump4.<locals>.fT  s    1Xq5!H r   N)r9   r  s   & r   test_elim_jump_to_uncond_jump4,TestTranforms.test_elim_jump_to_uncond_jump4S  s    	 	"r   c                &   R  pV P                  VR4       V P                  VR4       \        P                  ! V4       Uu. uF  pVP                  R8X  g   K  VNK  	  ppV P	                  \        V4      ^4       V P                  V4       R# u upi )c                 0    V '       d   ^# V'       d   ^#  ^# r   r=   )cond1cond2s   &&r   r
   5TestTranforms.test_elim_jump_after_return1.<locals>.f\  s    QQr   r/   r.   r-   N)r]   r   r   r   assertLessEqualrL   rP   r   s   &   r   test_elim_jump_after_return1*TestTranforms.test_elim_jump_after_return1Z  s    	 	  N3  O4&)&:&:1&= =&=U"\\^; 5&= =S\1-!=s    BBc                R    R  pV P                  VR4       V P                  V4       R# )c                      R  R lp V # )c                    V ^8  d   QhR^/# )rT   returnr=   )formats   "r   __annotate__MTestTranforms.test_make_function_doesnt_bail.<locals>.f.<locals>.__annotate__n  s      S r   c                      R # rr   r=   r=   r   r   rv   BTestTranforms.test_make_function_doesnt_bail.<locals>.f.<locals>.gn  s    r   r=   )rv   s    r   r
   7TestTranforms.test_make_function_doesnt_bail.<locals>.fm  s    Hr   r   N)r]   rP   r  s   & r   test_make_function_doesnt_bail,TestTranforms.test_make_function_doesnt_baill  s'    	 	  K0!r   c                f    R  pV P                  \        VR4      ^ 4       V P                  V4       R# )c                  (    \         \        \        39   # rr   )rV   r   r   r=   r   r   containtest7TestTranforms.test_in_literal_list.<locals>.containtestu  s    A;r   r   Nr   r   rP   )r4   r?  s   & r   test_in_literal_list"TestTranforms.test_in_literal_listt  s-    	0lKQO+&r   c                f    R  pV P                  \        VR4      ^ 4       V P                  V4       R# )c                  ,    \         \        3 F  p K  	  R # rr   r   r   rU   s    r   forloop8TestTranforms.test_iterate_literal_list.<locals>.forloop{  s    V r   r   NrA  )r4   rG  s   & r   test_iterate_literal_list'TestTranforms.test_iterate_literal_listz  s/    	 	0,GK'"r   c                \    R  pV P                  V! 4       ^4       V P                  V4       R# )c                       ^# ru   r=   r=   r   r   r
   =TestTranforms.test_condition_with_binop_with_bools.<locals>.f  s    r   N)r   rP   r  s   & r   $test_condition_with_binop_with_bools2TestTranforms.test_condition_with_binop_with_bools  s)    	 	a !r   c                \    R  pV P                  V! R4      4       V P                  V4       R# )c                     V '       d    R #  R# )TFr=   rU   s   &r   r
   3TestTranforms.test_if_with_if_expression.<locals>.f  s      %r   TN)r   rP   r  s   & r   test_if_with_if_expression(TestTranforms.test_if_with_if_expression  s'    	 	$ !r   c                .    R  pV P                  V4       R# )c                      ^# r   r=   rU   s   &r   r
   +TestTranforms.test_trailing_nops.<locals>.f  s    r   N)rP   r  s   & r   test_trailing_nops TestTranforms.test_trailing_nops  s    	 	!r   c                    R  pV P                  \        VR4      ^4       R pV P                  \        VR4      ^4       R pV P                  \        VR4      ^4       R pV P                  \        VR4      ^4       R# )c                  R    \          U Uu. uF  p \        V 4      qNK  	  upp # u upp i rr   r   r
   rV   ys     r   listcompGTestTranforms.test_assignment_idiom_in_comprehensions.<locals>.listcomp  "     1q!1Q4QAq111   #FOR_ITERc                  R    \          U Uu0 uF  p \        V 4      qkK  	  upp # u upp i rr   r\  r]  s     r   setcompFTestTranforms.test_assignment_idiom_in_comprehensions.<locals>.setcomp  ra  rb  c                  T    \          U Uu/ uF  p \        V 4      qVbK  	  upp # u upp i rr   r\  r]  s     r   dictcompGTestTranforms.test_assignment_idiom_in_comprehensions.<locals>.dictcomp  s&    "#4!QadqDA!444s   $c                      R  \          4       # )c              3   :   "   T F  p\        V4      q"x  K  	  R # 5irr   )r
   )r?   rV   r^  s   &  r   rA   YTestTranforms.test_assignment_idiom_in_comprehensions.<locals>.genexpr.<locals>.<genexpr>  s     1q!1Q4QAqs   r   r=   r   r   genexprFTestTranforms.test_assignment_idiom_in_comprehensions.<locals>.genexpr  s    1q11r   N)r   r   )r4   r_  re  rh  rm  s   &    r   'test_assignment_idiom_in_comprehensions5TestTranforms.test_assignment_idiom_in_comprehensions  sv    	20:FJ	20*EqI	50:FJ	20*EqIr   cpuc                x   R p. \        RR4      O\        RR4      O\        RR4      O\        \        R4      \        R4      ) 3R4      Op. \        RR4      ORNRNpV F  w  rEV F  w  rg\        \        V4      ^,           4       F  p\	        W4       F  p	RRP                  V	4      ,           V,           V,           V,           p
V P                  WR7      ;_uu_ 4        W,          p\        V
: R	2R
V/4      pV P                  WRV
: 24       RRR4       K  	  K  	  K  	  K  	  R#   + '       g   i     K  ; i)z-+ #0re   sraduioxX	duifegFEGinffegFEG%)fmtvaluez % (x,)rV   zfmt = N)re   1234u   абвг)  i.)g|EJ@g|EJ)re   130)re   .z.0z.2)re   .40)r~  r  )	r   floatr   rL   r   joinrj   evalr   )r4   flags	testcaseswidth_precsrz  suffixwidthprecrspecry  s1s2s   &            r   test_format_combinations&TestTranforms.test_format_combinations  sD   
-u5
]H-
 2K@
 eElU5\M2H=	
	
_&;<

 

 'ME*s5zA~.A ,U 6!BGGDM1E9D@6I!\\c\??!$B!%w&7#u!FB ,,Rx[A @? !7 /  + '
 @??s   1D((D9c                2   R  pV P                  V! R4      R4       V P                  V! RR4      R4       V P                  V! RR4      R4       V P                  V! RR4      R4       V P                  V! RR4      R	4       V P                  V! RR
4      R4       V P                  V! RR
4      R4       V P                  V! RR
4      R4       V P                  V! RR4      R4       V P                  V! RR4      R4       V P                  V! R^^"4      R4       R# )c           	      <   \        \        V4      4       Uu. uF  pR V^,            2NK  	  pp\        V4      ^8X  d   RV^ ,          ,           R,           pMRRP                  V4      ,           R,           p\        V : RV 2\	        \        W14      4      4      # u upi )rV   (z,)z, )z % )r   rL   r  r  dictzip)ry  valuesr&   varsargss   &*   r   r5  .TestTranforms.test_format_misc.<locals>.format  s    ',S['9:'9!a!uI'9D:4yA~T!W}t+TYYt_,s23'TF+T#d2C-DEE ;s   Bstringzx = %s!r|  z	x = 1234!zx = %d!zx = %x!zx = 4d2!zx = %f!zx = 1234.000000!gMb H@zx = 1234.0000625!zx = 1234.000063!zx = %s%% %%%%zx = 1234% %%z%% %sz
x = %% %s!zx = %s, y = %dzx = 12, y = 34Nr   )r4   r5  s   & r   test_format_miscTestTranforms.test_format_misc  s   	F 	)84	40+>	40+>	40*=	402DE	<8:MN	<8:LM	<8+F6G	73\B 0"b9;KLr   c           
        V P                  \        R 4      ;_uu_ 4        \        R4       RRR4       V P                  \        R4      ;_uu_ 4        \        RR^R^/4       RRR4       V P                  \        R4      ;_uu_ 4        \        RRR	/4       RRR4       V P                  \        R4      ;_uu_ 4        \        R
RR	/4       RRR4       V P                  \        R 4      ;_uu_ 4        \        RRR	/4       RRR4       V P                  \        R4      ;_uu_ 4        \        RRR	/4       RRR4       V P                  \        R4      ;_uu_ 4        \        RRR/4       RRR4       V P                  \        R4      ;_uu_ 4        \        RRR/4       RRR4       V P                  \        R4      ;_uu_ 4        \        RRR/4       RRR4       V P                  \        R4      ;_uu_ 4        \        RRR/4       RRR4       V P                  \        R 4      ;_uu_ 4        \        RR^R. /4       RRR4       V P                  \        R4      ;_uu_ 4        \        RR^R^^./4       RRR4       R#   + '       g   i     ELb; i  + '       g   i     EL?; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     ELy; i  + '       g   i     ELX; i  + '       g   i     EL7; i  + '       g   i     EL; i  + '       g   i     R# ; i)z&not enough arguments for format stringz	'%s' % ()Nz4not all arguments converted during string formattingz'%s' % (x, y)rV   r^  zincomplete formatz'%s%' % (x,)r|  z'%s%%%' % (x,)z'%s%z' % (x,)zunsupported format characterz'%s%z' % (x, 5)z"a real number is required, not strz'%d' % (x,)r{  z!an integer is required, not floatz'%x' % (x,)g
ףp=J@zan integer is required, not strzmust be real number, not strz'%f' % (x,)z'%s, %s' % (x, *y))assertRaisesRegex	TypeErrorr  
ValueErrorr4   s   &r   test_format_errors TestTranforms.test_format_errors  s   ##I<> >> ##IJL L33"23L ##J0CDD#t- E##J0CDD!C;/ E##I<> >3+.> ##J0NOO"S$K0 P##I/STTf. U##I/RSSg/ T##I/PQQf. R##I/MNNf. O##I<> >%QR'89> ##IJL L%QaV'<=L L5> > >L L L EDDDDD> > > POOTTTSSSQQQNNN> > >L L Ls   JJJ,=K 2K'K(K<LL$;L80M'M J	J)	,J=	 K	K%	(K9	<L	L!	$L5	8M		M	 M1	c                0    R  pV P                  VR4       R# )c                     YrYrR # rr   r=   rF  s   &&r   r
   5TestTranforms.test_static_swaps_unpack_two.<locals>.f  s    qqr   r   Nr]   r  s   & r   test_static_swaps_unpack_two*TestTranforms.test_static_swaps_unpack_two  s    	 	  F+r   c                0    R  pV P                  VR4       R# )c                 6    YTr!p YTrp YTr pYTrpYTrpYTrpR # rr   r=   r   s   &&&r   r
   7TestTranforms.test_static_swaps_unpack_three.<locals>.f  s:    A!AA!AA!AA!AA!AA!A!r   r   Nr  r  s   & r   test_static_swaps_unpack_three,TestTranforms.test_static_swaps_unpack_three  s    	 	  F+r   c                    \        R RR4       FQ  w  rpRV RV RV R2pV P                  V4      ;_uu_ 4        \        V4      pV P                  VR4       RRR4       KS  	  R#   + '       g   i     Kh  ; i)	_a_b_cz{'a': z, 'b': z, 'c': }r   N)r   rj   r   r]   )r4   r   r   r   r   r5   s   &     r   test_static_swaps_match_mapping-TestTranforms.test_static_swaps_match_mapping  sn    tT40GA!s'!GA3b9Gg&&7@((v6 '& 1&&&s   A%%A6c           	        . ROp\        RRR4       F`  w  r#pV FT  pVP                  W#V4      pV P                  V4      ;_uu_ 4        \        V4      pV P	                  VR4       RRR4       KV  	  Kb  	  R#   + '       g   i     Ko  ; i)C({}, {}, {})r  r  r  r   N)r  zC({}, {}, c={})zC({}, b={}, c={})zC(a={}, b={}, c={}))r   r5  rj   r   r]   )r4   formsr   r   r   formr   r5   s   &       r   test_static_swaps_match_class+TestTranforms.test_static_swaps_match_class  sy    
 tT40GA!++aA.\\'**;GDD,,T6: +*  1 +**s   A8	8B	c           	     R   0 Rmp. ROp\        RRR4       Fy  w  r4pV Fm  pVP                  W4V4      pV P                  V4      ;_uu_ 4        \        V4      pWq9   d   V P	                  VR4       MV P                  VR4       RRR4       Ko  	  K{  	  R#   + '       g   i     K  ; i)*_, b, cr  r  r  r   N>   r  a, *_, ca, b, *_)z
{}, {}, {}z{}, {}, *{}z{}, *{}, {}z*{}, {}, {})r   r5  rj   r   r^   r]   )	r4   swapsr  r   r   r   r  r   r5   s	   &        r    test_static_swaps_match_sequence.TestTranforms.test_static_swaps_match_sequence  s    4KtT40GA!++aA.\\'**;GDD' --dF;00v> +*  1 +**s   7B	B&r=   N),__name__
__module____qualname____firstlineno__r9   rP   r_   rn   r   r   r   r   r   r   r   r   r   r   r  r
  r  r  r!  r'  r/  r;  rB  rI  rN  rS  rX  ro  r   requires_resourcer  r  r  r  r  r  r  r  __static_attributes____classdictcell____classdict__s   @r   r*   r*   4   s     D"	9 
(6
('"R(< (D+#Zo dK2Z	LB#$'#
J u%B &B.M*>>,,7;? ?r   r*   c                   8   a  ] tR tRt o R tR tR tR tRtV t	R# )TestBugletsi-  c                    R  pV P                  \        4      ;_uu_ 4        V! 4        RRR4       R#   + '       g   i     R# ; i)c                      ^^0w  rW3# r   r=   r]  s     r   r
   %TestBuglets.test_bug_11510.<locals>.f3  s    q6DA4Kr   N)assertRaisesr  r  s   & r   test_bug_11510TestBuglets.test_bug_11510/  s.    	 z**C +***s	   3A	c                t    \        ^
4       F  p \        h	  R#   \        ;'       g    \         d     K*  i ; i)
   N)r   	Exception)r4   r&   s   & r   test_bpo_42057TestBuglets.test_bpo_420579  s6    rA  ))	 s   777c                     \        R RR4       R# )zwhile True or spam: pass<test>r   Nrk   r  s   &r   test_bpo_45773_pop_jump_if_true+TestBuglets.test_bpo_45773_pop_jump_if_true@  s    *Hf=r   c                     \        R RR4       R# )zwhile True or not spam: passr  r   Nr  r  s   &r    test_bpo_45773_pop_jump_if_false,TestBuglets.test_bpo_45773_pop_jump_if_falseC  s    .&Ar   r=   N)
r  r  r  r  r  r  r  r  r  r  r  s   @r   r  r  -  s      >B Br   r  c                      a  ] tR tRt o R tR tR tR tR tR t	R t
R	 tR
 tR tR tR tR tR tR tR tRtV tR# )TestMarkingVariablesAsUnKnowniG  c                    V P                  \        P                  \        P                  ! 4       4       \        P                  ! R 4       R # rr   )
addCleanupsyssettracegettracer  s   &r   setUp#TestMarkingVariablesAsUnKnown.setUpI  s&    clln5Tr   c                0    R  pV P                  VR4       R# )c                      ^p W ,           pR# rh   Nr=   r]  s     r   r
   DTestMarkingVariablesAsUnKnown.test_load_fast_known_simple.<locals>.fN  s    AAr   !LOAD_FAST_BORROW_LOAD_FAST_BORROWNr^   r  s   & r   test_load_fast_known_simple9TestMarkingVariablesAsUnKnown.test_load_fast_known_simpleM  s    	 	a!DEr   c                T    R  pV P                  VR4       V P                  VR4       R# )c                  @    \        4       '       d   ^p \        X 4       R# r  	conditionr%  rU   s    r   r
   FTestMarkingVariablesAsUnKnown.test_load_fast_unknown_simple.<locals>.fT  s    {{!Hr   LOAD_FAST_CHECK	LOAD_FASTNr^   r]   r  s   & r   test_load_fast_unknown_simple;TestMarkingVariablesAsUnKnown.test_load_fast_unknown_simpleS  *    	 	a!23  K0r   c                T    R  pV P                  VR4       V P                  VR4       R# )c                  "    ^p ? \        X 4       R# r  r%  rU   s    r   r
   KTestMarkingVariablesAsUnKnown.test_load_fast_unknown_because_del.<locals>.f\  s    A!Hr   r  r  Nr  r  s   & r   "test_load_fast_unknown_because_del@TestMarkingVariablesAsUnKnown.test_load_fast_unknown_because_del[  r  r   c                   R  pV P                  VR4       V P                  VR4       R pV P                  VR4       V P                  VR4       R pV P                  VR4       V P                  VR4       R pV P                  VR4       V P                  VR4       RR lpV P                  VR4       V P                  VR4       R# )	c                     \        V 4       R # rr   r   rU   s   &r   f1PTestMarkingVariablesAsUnKnown.test_load_fast_known_because_parameter.<locals>.f1d  	    !Hr   LOAD_FAST_BORROWr  c                     \        V 4       R # rr   r   rU   s   $r   f2PTestMarkingVariablesAsUnKnown.test_load_fast_known_because_parameter.<locals>.f2i  r  r   c                      \        V 4       R # rr   r   )r  s   *r   f3PTestMarkingVariablesAsUnKnown.test_load_fast_known_because_parameter.<locals>.f3n  s	    $Kr   c                      \        V 4       R # rr   r   )kwargss   ,r   f4PTestMarkingVariablesAsUnKnown.test_load_fast_known_because_parameter.<locals>.f4s  s	    &Mr   c                     \        V 4       R # rr   r   rU   s   &r   f5PTestMarkingVariablesAsUnKnown.test_load_fast_known_because_parameter.<locals>.f5x  r  r   Nr   r  )r4   r  r  r  r  r  s   &     r   &test_load_fast_known_because_parameterDTestMarkingVariablesAsUnKnown.test_load_fast_known_because_parameterc  s    	b"45  %67	b"45  %67	b"45  %67	b"45  %67	b"45  %67r   c                T    R  pV P                  VR4       V P                  VR4       R# )c                  V    \        4       '       d   ^p \        X 4       \        V 4       R# r  r  rU   s    r   r
   TTestMarkingVariablesAsUnKnown.test_load_fast_known_because_already_loaded.<locals>.f~  s    {{!H!Hr   r  r	  Nr  r  s   & r   +test_load_fast_known_because_already_loadedITestMarkingVariablesAsUnKnown.test_load_fast_known_because_already_loaded}  s+    	
 	a!23a!34r   c                T    R  pV P                  VR4       V P                  VR4       R# )c                  F    \        4       '       d   ^p M^p \        V 4       R# r  r  rU   s    r   r
   OTestMarkingVariablesAsUnKnown.test_load_fast_known_multiple_branches.<locals>.f  s    {{!Hr   r	  r  Nr  r  s   & r   &test_load_fast_known_multiple_branchesDTestMarkingVariablesAsUnKnown.test_load_fast_known_multiple_branches  s+    	 	a!34  $56r   c                0    R  pV P                  VR4       R# )c                  >     ^^ ,          p V #   \          d     X # i ; ir   )ZeroDivisionError)ress    r   r
   KTestMarkingVariablesAsUnKnown.test_load_fast_unknown_after_error.<locals>.f  s0    !e J % Js   	 r  Nr  r  s   & r   "test_load_fast_unknown_after_error@TestMarkingVariablesAsUnKnown.test_load_fast_unknown_after_error  s    	 	a!23r   c                T    R  pV P                  VR4       V P                  VR4       R# )c            
      x     ^^ ,           ^;p ;p;p;p;p;rVR#   \          d    \        X XXXXXX4        L-i ; ir  )r&  r%  )r   r   r   r  er
   rv   s          r   r
   MTestMarkingVariablesAsUnKnown.test_load_fast_unknown_after_error_2.<locals>.f  sX    +A )*)A))A))A)A % +aAq!Q*+s   	 99r  r  Nr  r  s   & r   $test_load_fast_unknown_after_error_2BTestMarkingVariablesAsUnKnown.test_load_fast_unknown_after_error_2  s*    	* 	a!23  K0r   c                `   R  pV P                  VRR4       V P                  VRR4       V P                  VRR4       R F1  pV P                  VRRVR 24       V P                  VRRVR 24       K3  	  R F1  pV P                  VRRVR 24       V P                  VRRVR 24       K3  	  R F1  pV P                  VRRVR 24       V P                  VRRVR 24       K3  	  V P                  VRR	4       V P                  VRR	4       V P                  VRR
4       V P                  VRR
4       R# )c                     ^;p ;p;p;p;p;p;p;p;r^;p
;p;p;p;p;p;p;p;pp^;p;p;p;p;p;p;p;p;pp^;p;p;p ;p!;p";p#;p$;p%;p&p'^;p(;p);p*;p+;p,;p-;p.;p/;p0p1^;p2;p3;p4;p5;p6;p7;p8;p9;p:p;^;p<;p=;p>;p?;p@;pA;pB;pC;pDpE^;pF;pG;pH;pI;pJ;pK;pL;pM;pNpO?H?I\        XI4       \        VFVGXHVI4        \        WV>V?4       \        X@XAXNXO4       K  r   r   )Pa00a01a02a03a04a05a06a07a08a09a10a11a12a13a14a15a16a17a18a19a20a21a22a23a24a25a26a27a28a29a30a31a32a33a34a35a36a37a38a39a40a41a42a43a44a45a46a47a48a49a50a51a52a53a54a55a56a57a58a59a60a61a62a63a64a65a66a67a68a69a70a71a72a73a74a75a76a77a78a79sP                                                                                   r   r
   GTestMarkingVariablesAsUnKnown.test_load_fast_too_many_locals.<locals>.f  s   HIICI#IIcICI#IIcICHIICI#IIcICI#IIcIC#HIICI#IIcICI#IIcIC#HIICI#IIcICI#IIcIC#HIICI#IIcICI#IIcIC#HIICI#IIcICI#IIcIC#HIICI#IIcICI#IIcIC#HIICI#IIcICI#IIcIC#S#J#sC%cS)c3S)r   r  r3  r4  r  r	  r   02r  r{  r|  N)r3  r4  )>   ?   )@   A   N   O   )F   G   r  )r4   r
   r&   s   &  r   test_load_fast_too_many_locals<TestMarkingVariablesAsUnKnown.test_load_fast_too_many_locals  sR   	*  	a!DnU  $5u=  $5u=A!!!%71QrFD$$Q(9Qqf:F   A!!!%6!Ab6
C$$Qq2Z@   A!!!%71QrFD$$Q(9Qqf:F 
 	a!2E:  K7a!2E:a!3U;r   c                  a \         P                  ! R 4      p/ p\        W4       VR,          pV P                  VR4       V P	                  VR4       VP
                  P                  pV3R lo\        P                  ! S4       V! 4       pV P                  V4       V P                  VR4       V P	                  VR4       V P                  VP
                  P                  V4       R# )a              def f():
                x = y = 2
                if not x:
                    return 4
                for i in range(55):
                    x + 6
                L = 7
                L = 8
                L = 9
                L = 10
        r
   r	  r  c                 v   < VR 8X  d1   V P                   ^	8X  d    ^V n         \        P                  ! R4       R# S# rd   Nf_linenor  r  frameeventr%   traces   &&&r   r  MTestMarkingVariablesAsUnKnown.test_setting_lineno_no_undefined.<locals>.trace  0    5>>Q#6!"T"Lr   N)r   r   r   r^   r]   r   r   r  r  assertIsNoner   )r4   r5   nsr
   r   resultr  s   &     @r    test_setting_lineno_no_undefined>TestMarkingVariablesAsUnKnown.test_setting_lineno_no_undefined  s        TsGa!34  $56**$$	 	U&!a!34  $56++W5r   c                J  a \         P                  ! R 4      p/ p\        W4       VR,          pV P                  VR4       V P	                  VR4       VP
                  P                  pV3R loRpV P                  \        V4      ;_uu_ 4        \        P                  ! S4       V! 4       pRRR4       V P                  X^4       V P                  VR4       V P	                  VR4       V P                  VP
                  P                  V4       R#   + '       g   i     Ln; i)a              def f():
                x = y = 2
                if not x:
                    return 4
                for i in range(55):
                    x + 6
                del x
                L = 8
                L = 9
                L = 10
        r
   r	  r  c                 v   < VR 8X  d1   V P                   ^	8X  d    ^V n         \        P                  ! R4       R# S# r  r  r  s   &&&r   r  NTestMarkingVariablesAsUnKnown.test_setting_lineno_one_undefined.<locals>.trace  r  r   z!assigning None to 1 unbound localNr   r   r   r^   r]   r   r   assertWarnsRegexRuntimeWarningr  r  r   r4   r5   r  r
   r   r-  r  r  s   &      @r   !test_setting_lineno_one_undefined?TestMarkingVariablesAsUnKnown.test_setting_lineno_one_undefined  s        TsGa!34  $56**$$	 1"">155LLSF 6 	#a!34  $56++W5 65   DD"	c                J  a \         P                  ! R 4      p/ p\        W4       VR,          pV P                  VR4       V P	                  VR4       VP
                  P                  pV3R loRpV P                  \        V4      ;_uu_ 4        \        P                  ! S4       V! 4       pRRR4       V P                  X^4       V P                  VR4       V P	                  VR4       V P                  VP
                  P                  V4       R#   + '       g   i     Ln; i)a              def f():
                x = y = 2
                if not x:
                    return 4
                for i in range(55):
                    x + 6
                del x, y
                L = 8
                L = 9
                L = 10
        r
   r	  r  c                 v   < VR 8X  d1   V P                   ^	8X  d    ^V n         \        P                  ! R4       R# S# r  r  r  s   &&&r   r  NTestMarkingVariablesAsUnKnown.test_setting_lineno_two_undefined.<locals>.trace$  r  r   z"assigning None to 2 unbound localsNr  r  s   &      @r   !test_setting_lineno_two_undefined?TestMarkingVariablesAsUnKnown.test_setting_lineno_two_undefined  s        TsGa!34  $56**$$	 2"">155LLSF 6 	#a!34  $56++W5 65r  c                    \         P                  ! R 4      p/ p\        W4       VR,          pV P                  VR4       V P	                  VR4       V# )z            def f():
                x = 2
                L = 3
                L = 4
                L = 5
                if not L:
                    x + 7
                    y = 2
        r
   r	  r  )r   r   r   r^   r]   )r4   r5   r  r
   s   &   r   make_function_with_no_checks:TestMarkingVariablesAsUnKnown.make_function_with_no_checks3  sS     	  	 TsGa!34  $56r   c                   a V P                  4       pV3R  lo\        P                  ! S4       V! 4        V P                  VR4       V P	                  VR4       R# )c                    < VR 8X  d9   V P                   ^8X  d(   ^*V P                  R&   \        P                  ! R4       R# S# )rd   rV   Nr  f_localsr  r  r  s   &&&r   r  TTestMarkingVariablesAsUnKnown.test_modifying_local_does_not_add_check.<locals>.traceG  7    5>>Q#6&(s#T"Lr   r	  r  Nr  r  r  r^   r]   r4   r
   r  s   & @r   'test_modifying_local_does_not_add_checkETestMarkingVariablesAsUnKnown.test_modifying_local_does_not_add_checkE  K    --/	 	U	a!34  $56r   c                   a V P                  4       pV3R  lo\        P                  ! S4       V! 4        V P                  VR4       V P	                  VR4       R# )c                    < VR 8X  d9   V P                   ^8X  d(   ^*V P                  R&   \        P                  ! R4       R# S# )rd   r^  Nr  r  s   &&&r   r  WTestMarkingVariablesAsUnKnown.test_initializing_local_does_not_add_check.<locals>.traceT  r  r   r	  r  Nr  r  s   & @r   *test_initializing_local_does_not_add_checkHTestMarkingVariablesAsUnKnown.test_initializing_local_does_not_add_checkR  r  r   r=   N)r  r  r  r  r  r  r  r  r  r  r"  r)  r/  r  r  r  r  r  r  r  r  r  r  s   @r   r  r  G  s_     F118457	41(<T6@ 6D 6D$77 7r   r  c                      a  ] tR tRt o RR ltR tR tR tR tR t	R	 t
R
 tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tRtV t R# ) DirectCfgOptimizerTestsi`  Nc                "   V P                  V4       V P                  V4       Vf   TpV P                  V4      pV P                  WcV4      w  rxV P                  V4      P                  4       pV P	                  Wr4       V P                  W4       R # rr   )check_instructionsseq_from_instsget_optimizedr   assertInstructionsMatchr   )	r4   instsexpected_instsconstsexpected_constsnlocalsseq	opt_insts
opt_constss	   &&&&&&   r   cfg_optimization_test-DirectCfgOptimizerTests.cfg_optimization_testb  s     	&/"$O!!%( $ 2 23 H	,,^<MMO$$Y?5r   c                    RRV P                  4       ;p^3RRVRR.pRRV P                  4       ;p^3R	RVR
R.pV P                  VV. RO^ .R7       R# )r   r[   Nr  r  r   rh      r}   rT      r-   Nr  r}   r      r-   Nr  )r   rT   r  r   r   r  r   rh   rT   r   r   Labelr  r4   lblr  r  s   &   r   1test_conditional_jump_forward_non_const_conditionIDirectCfgOptimizerTests.test_conditional_jump_forward_non_const_conditionq  s     

!4b9!&!&
 !

!4b9%&%&
 	""5#1*9453 	# 	8r   c                ^    R  pV P                  V! 4       \        \        ^(4      4      4       R# )c                      . ^ N^N^N^N^N^N^N^N^N^	N^
N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^ N^!N^"N^#N^$N^%N^&N^'N# r  r=   r=   r   r   r
   JDirectCfgOptimizerTests.test_list_exceeding_stack_use_guideline.<locals>.f     											 	 	 	 	 !#	 		 		 		 		 !#		
 	
 	
 	
 	
 !#	 	 	 	 	 !#	 	 	 	 	 !#	 	 	 	 	 !#	 	r   N)r   r0   r   r  s   & r   'test_list_exceeding_stack_use_guideline?DirectCfgOptimizerTests.test_list_exceeding_stack_use_guideline  s#    
	 	d59o.r   c                ^    R  pV P                  V! 4       \        \        ^(4      4      4       R# )c                      0 ^ k^k^k^k^k^k^k^k^k^	k^
k^k^k^k^k^k^k^k^k^k^k^k^k^k^k^k^k^k^k^k^k^k^ k^!k^"k^#k^$k^%k^&k^'k# r  r=   r=   r   r   r
   IDirectCfgOptimizerTests.test_set_exceeding_stack_use_guideline.<locals>.f  r  r   N)r   r   r   r  s   & r   &test_set_exceeding_stack_use_guideline>DirectCfgOptimizerTests.test_set_exceeding_stack_use_guideline  s$    
	 	ib	23r   c                j   ^p. R
NRNRNRNRNRNRNRNRNRV^ 3NRNRV^ 3NR\        R4      3NRNRNR\        R4      3NRNRNR\        R4      3NRNRNRNR\        R4      3NRNRNRNR\        R4      ^ 3NRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNpRR.pV P                  W#. RR.R	7       R# )r   Nr   r   r   r   r   r   r   r  r   rh   r   r   Nr   r   rT   r   r   Nr   )r   rh   r   r   r   r   r   r   r   r   Nr   rY   Nr   )r   r   r   r-   Nr   r}   rh   r   r   )rh   rT   r   Tr(   r  )r4   r   beforeafters   &   r   test_nested_const_foldings2DirectCfgOptimizerTests.test_nested_const_foldings  sH   ,
$,
,
 %,
 (	,

 ,
 (,
 ,
 ,
 %,
  !3Q7,
 ,
  !3Q7,
 *=9:,
 %,
 ,
  *+<=>!,
" #,
$ %%,
& *845',
( ),
* %+,
, -,
. *=9:/,
0 1,
2 "3,
4 %5,
6 *;7;7,
8 9,
: %;,
< =,
> &?,
@ A,
B &C,
D E,
F %G,
H I,
J #K,
L M,
N #O,
P Q,
R "S,
T U,
V &W,
\ !%
 	""6bRaMb"cr   c                @    RR.pRR.pV P                  W. R.R7       R# )r   Nr  )r   r   r   r  r}   r   r   r=   r  r4   r  r  s   &  r   test_build_empty_tuple.DirectCfgOptimizerTests.test_build_empty_tuple  s7    !%

 !%
 	""6bT"Rr   c                n    . ROpRR.pV P                  W. R.R7       . ROpV P                  W3. R7       R# )	r   Nr  r  r  )
r  r  r  r  r  r  r  r  r   r   r   r  r   r   )r  r   r   r   r  r  r  r  r4   r  r  sames   &   r   test_fold_tuple_of_constants4DirectCfgOptimizerTests.test_fold_tuple_of_constants  sM    
 !%
 	""6i["Y
 	""4b"9r   c                   ^pRpR	.R
R.V,          ,           RV^ 3R.,           pRR.p\        R.V,          4      pV P                  W4R.RV.R7       R	RV^ 3R.pR
R.pV P                  W4. R.R7       R	R	RRRR	RRRRV^ 3R.pV P                  Wf. R7       R	RRRRR\        R4      ^ 3RRRRV^ 3R.pR
R.pV P                  W4. R.R7       R	RRRRRRRRRRRRRRRRV^ 3R.pR
R.pV P                  W4. R.R7       R# )r   r   r   Ntestr  r  r   r   r   r   r   r   )LIST_APPENDrh   r   r  r  r=   r  r  r  r   r  )r   r  r(   )r4   INTRINSIC_LIST_TO_TUPLEr  r  r  result_constr
  s   &      r   *test_fold_constant_intrinsic_list_to_tupleBDirectCfgOptimizerTests.test_fold_constant_intrinsic_list_to_tuple  s   "# !"!#89FBC "91=?XYZ 	 !%
 fX./""6&TZ\hSi"j !!8!<%
 !%
 	""6bT"R ! !$! !$!!8!<%
 	""4b"9 !$!$$*84a8!$!!8!<%
 !%
 	""6i["Y !$!$!$!!8!<%%
* !%
 	""6i["Yr   c                    . ROp. ROpV P                  W. R.R7       . ROpV P                  W3. R7       . ROpV P                  W3. R7       R# )	r   Nr  r  )
r  r  r  r  r  r  r  r  r   r   r   r  )r  r   )LIST_EXTENDrh   r   r  r   )r  r  r   rT   r   r  )r  r  r  r  r  r  r	  s   &   r   test_optimize_if_const_list3DirectCfgOptimizerTests.test_optimize_if_const_list_  sa    

 	""6i["Y
 	""4b"9
 	""4b"9r   c           	         . ROp. ROpV P                  W. \        0 Rm4      .R7       . ROpV P                  W3. R7       . ROpV P                  W3. R7       R# )	r   Nr  r  )
r  r  r  r  r  r  r  r  r   r   r   r  ))r   r   r   r   )
SET_UPDATErh   r   r  r   )r  r  r   rT   r   r  )r  r  r  r  r  r  r   r	  s   &   r   test_optimize_if_const_set2DirectCfgOptimizerTests.test_optimize_if_const_set  sh    

 	""6iXaNbMc"d
 	""4b"9
 	""4b"9r   c                   RRRRV P                  4       ;pRV P                  4       ;p^ 3R	RV^ 3VR
RRR.pRRV P                  4       ;pRV P                  4       ;p^ 3R	RV^ 3VR
RRR.pV P                  W4R.RR.R7       RRRRV P                  4       ;pRV P                  4       ;p^ 3R	RV^ 3VR
RRR.pRRRRV P                  4       ;pRV P                  4       ;p^ 3R	RV^ 3VR
RRR.pV P                  W4R.R.R7       R# )r   Nrc  JUMPr  r  r  r  GET_ITERNr   
STORE_FASTr   r   END_FORNr   POP_ITERNr   r   r  r  r   r  r   rT   r   r  )r4   startendr  r  s   &    r   #test_optimize_literal_list_for_iter;DirectCfgOptimizerTests.test_optimize_literal_list_for_iter  s    %$ !ZZ\!E

,a0 UA ! %
  !!ZZ\!E

,a0 UA ! %
 	""6$RVX^Q_"` % !ZZ\!E

,a0 UA ! %
  %!!ZZ\!E

,a0 UA ! %
 	""6$RVQW"Xr   c                   RRRRV P                  4       ;pRV P                  4       ;p^ 3R	RV^ 3VR
RRR.pRRV P                  4       ;pRV P                  4       ;p^ 3R	RV^ 3VR
RRR.pV P                  W4R.R\        ^^04      .R7       RRRRV P                  4       ;pRV P                  4       ;p^ 3R	RV^ 3VR
RRR.pV P                  WUR.R.R7       R# )r   Nrc  r#  r  r  r  r  r$  r&  r(  r*  r   r  r  r  )r  r  r   )r4   r-  r.  r  r  r
  s   &     r   "test_optimize_literal_set_for_iter:DirectCfgOptimizerTests.test_optimize_literal_set_for_iter  s?    %$!ZZ\!E

,a0 UA ! %
  !!ZZ\!E

,a0 UA ! %
 	""6$RVXacdfgbhXiQj"k
 %!ZZ\!E

,a0 UA ! %
 	""4tftf"Ur   c                    . ROp. ROpV P                  WR.RR.R7       . ROp. ROpV P                  WR.R.R7       R# )r   Nr  )r  r  r  r  ri   r   r   POP_TOPNr   r   r  r  r  r5  r6  r   r  r   )r  r  r   rh   r   r  r5  r6  r   r  )r  r  r9  r,  r5  r6  r   r  r  r  s   &  r   #test_optimize_literal_list_contains;DirectCfgOptimizerTests.test_optimize_literal_list_contains#  s[    	

 	""6$RVX^Q_"`	
	
 	""6$RVQW"Xr   c           
         . ROp. ROpV P                  WR.R\        ^^04      .R7       . ROpV P                  W3R.R.R7       R# )r   Nr  )r  r  r  r  r5  r6  r   r  r8  )r  r  r9  r  r5  r6  r   r  r  r	  s   &   r   "test_optimize_literal_set_contains:DirectCfgOptimizerTests.test_optimize_literal_set_containsP  s^    	

 	""6$RVXacdfgbhXiQj"k	
 	""4tftf"Ur   c           	        . R
OpRR	.pV P                  W. RR.R7       . ROp. ROpV P                  W. . R7       . ROp. ROpV P                  W. . R7       . ROpRR	.pV P                  W. R.R7       . ROpRR	.pV P                  W. RR.R7       . ROp. ROpV P                  W. . R7       ^ ;r4^;rVRRRV^ 3RR	.pRRRV^ 3R	.pV P                  W. . R7       RRRV^ 3RRR	.pRRRV^ 3R	.pV P                  W. . R7       RRRV^ 3RRRRR	.pRRRV^ 3R	.pV P                  W. . R7       RRRV^ 3RRRRRR	.	pRRRV^ 3R	.pV P                  W. . R7       RRRV^ 3RR	.pRRRV^ 3R	.pV P                  W. . R7       RRRV^ 3RRR	.pRRRV^ 3R	.pV P                  W. . R7       RRRV^ 3RRRRR	.pRRRV^ 3R	.pV P                  W. . R7       RRRV^ 3RRRR	.pRRRV^ 3R	.pV P                  W. . R7       R# )r   NTFr  rg   ri   TO_BOOLNr   r  r  )r  r@  r  r  r  r  )r  r@  r  r  r  r  r  )r  r@  r  )r  r@  r  r@  r@  r@  r  )r  r@  r  r  )r  r@  r  r  r  r  r  r   )r  r@  r  r@  r@  r@  r  )r  r@  r  r  r  r  r@  r  )r  r@  r@  r  r9  r  )r4   r  r  is_in_isnotnotins   &      r   test_optimize_unary_not/DirectCfgOptimizerTests.test_optimize_unary_nott  s   
 !%
 	""6dTY]"[


 	""6R"P

 	""6R"P
 !%
 	""6dV"T
 !%
 	""6dTY]"[	

 	""6R"P  c1"%
  eQ%	
 	""6R"P  c1""%
  c1%	
 	""6R"P  c1"   %	
  eQ%	
 	""6R"P  c1""   %

  c1%	
 	""6R"P  C#"%
  E1%%	
 	""6R"P  C#""%
  C#%	
 	""6R"P  C#"   %	
  E1%%	
 	""6R"P  C#"" %
  C#%	
 	""6R"Pr   c                    . ROpRR.pV P                  W. R.R7       . ROpRR.pV P                  W. R.R7       . R	OpRR.pV P                  W. . R7       R# )
r   Nr  r  r  )r  r  r  r  r   )r  r  r  r  )r  r   r   r   rJ  r  r  r  s   &  r   test_optimize_if_const_unaryop6DirectCfgOptimizerTests.test_optimize_if_const_unaryopi  s    
 %%
 	""6bT"R
 %%
 	""6bT"R
 %%
 	""6R"Pr   c                
   \        R 4      p\        R4      p\        R4      p\        R4      p\        R4      p\        R4      p\        R4      p\        R4      p\        R4      p	\        R	4      p
\        R
4      p\        R4      p\        R4      pRRRV^ 3RRV^ 3R.pRR.pV P                  W. . R7       RRRV^ 3RRV^ 3R.pRR.pV P                  W. R.R7       RRRV^ 3RRV^ 3R.pRR.pV P                  W. . R7       RRRV^ 3RRV^ 3R.pRR.pV P                  W. RR.R7       RRRV^ 3RRV^ 3R.pRR.pV P                  W. . R7       RRRV^ 3RRV^ 3R.pRR.pV P                  W. . R7       RRRV^ 3RRV^ 3R.pRR.pV P                  W. . R7       RRRV^ 3RRV^ 3R.pRR.pV P                  W. . R7       RRRV	^ 3RRV	^ 3R.pRR.pV P                  W. . R7       RRRV
^ 3RRV
^ 3R.pRR.pV P                  W. . R7       RRRV^ 3RRV^ 3R.pRR.pV P                  W. . R7       RRRV^ 3RRV^ 3R.pRR.pV P                  W. . R7       RRRV^ 3RRV^ 3R.pRR.pV P                  WR.R.R7       R# ) r   r   r   r   r   r   r   r   r   r   r   r   r   r   Nr  r   r   r  r  )r   r   r   r   r   )r   r   r   r  r  )r   r   r   r  )r   r   r   )r      r   r  )rh   r   r  )r4   addsubmuldivfloorrempowlshiftrshiftor_and_xorsubscrr  r  s   &               r   test_optimize_if_const_binop4DirectCfgOptimizerTests.test_optimize_if_const_binop  s   x(}-}-/0 !23~.z*!+.!+.w')x(!+. %$#q!$#q!%
 %%
 	""6R"P %$#q!$#q!%
 !%
 	""6bT"R %$#q!$#q!%
 %%
 	""6R"P %$#q!$#q!%
 !%
 	""6cSVZ"X %$%#$%#%
 %%
 	""6R"P %$#q!$#q!%
 %%
 	""6R"P %$#q!$#q!%
 &%
 	""6R"P %$&!$$&!$%
 %%
 	""6R"P %$&!$$&!$%
 %%
 	""6R"P %$#q!$#q!%
 %%
 	""6R"P %$$"$$"%
 %%
 	""6R"P %$#q!$#q!%
 %%
 	""6R"P !$&!$$&!$%
 %%
 	""6.9I\j[k"lr   c                t    RRV P                  4       ;p^3RVRR.p. ROpV P                  VV. R	O^ .R7       R# )
r}   r[   Nr  r}   r   r  r  r  r  )r   Nr  )r   N   r  r  r  r  r  s   &   r   -test_conditional_jump_forward_const_conditionEDirectCfgOptimizerTests.test_conditional_jump_forward_const_conditiond  sX    
 "

!4b9!!&

 	""5#1*9453 	# 	8r   c           	         V P                  4       ;pRRV^3RR.pV P                  4       ;pRRV^3RR.pV P                  W$\        \        ^4      4      R7       R# )r   r[   Nr  r  )r   rT   r  r  r  r  r0   r   )r4   lbl1r  r  expecteds   &    r   2test_conditional_jump_backward_non_const_conditionJDirectCfgOptimizerTests.test_conditional_jump_backward_non_const_condition{  sq    JJL D r* &
 ::<C b) &
 	""54a>"Jr   c           	         V P                  4       ;pRRV^3RR.pV P                  4       ;pRRV^3.pV P                  W$\        \        ^4      4      R7       R# )	r}   r[   Nr#  r  r_  r  r  r`  re  )r4   rf  r  r  r  s   &    r   .test_conditional_jump_backward_const_conditionFDirectCfgOptimizerTests.test_conditional_jump_backward_const_condition  sm     JJL D!r*!&
 ::<CS"

 	""5eAh"Pr   c           	         R V P                  4       ;p^
3RRRVRR.pR V P                  4       ;p^
3RRVR	R.pV P                  W#\        \        ^4      4      R7       R# )
SETUP_FINALLYNr  )	POP_BLOCKNr   )r}   rh   r  r-   Nr  )r}   rT   ra  )r-   Nra  )r   rh   r  )r   rT   ra  re  )r4   handlerr  r  s   &   r   test_except_handler_label1DirectCfgOptimizerTests.test_except_handler_label  sz    5gr:#!&!&
 5gr:%&%&
 	""5eAh"Pr   c           	     b    . ROp. ROpV P                  W\        \        ^4      4      ^R7       R# )r}   Nr  r  )	r}   r   rh   r}   rh   rT   r}   rT   r   )r   r   r   r'  rh   r   ry  r7  Nr   r}   r   r   r-   Nr   )r   r   rh   r   rh   rT   r   Nr   ry  rz  r   r   r   r|  r  r0   r   r4   r  r  s   &  r   test_no_unsafe_static_swap2DirectCfgOptimizerTests.test_no_unsafe_static_swap  s0    


 	""5eAhYZ"[r   c           	     b    . ROp. ROpV P                  W\        \        ^4      4      ^R7       R# )r}   Nru  )rv  rw  rx  ry  ry  ry  r{  r|  )r}  r~  r  rz  ry  r  r|  r  r  s   &  r   *test_dead_store_elimination_in_same_linenoBDirectCfgOptimizerTests.test_dead_store_elimination_in_same_lineno  s0    	

 	""5eAhYZ"[r   c           	     b    . ROp. ROpV P                  W\        \        ^4      4      ^R7       R# )r}   Nru  )rv  rw  rx  ry  r'  rh   r   r'  rh   r   r{  r|  )r}  r~  )r   rT   r   ry  r  r  r  r|  r  r  s   &  r   2test_no_dead_store_elimination_in_different_linenoJDirectCfgOptimizerTests.test_no_dead_store_elimination_in_different_lineno  s0    	
	
 	""5eAhYZ"[r   c                p  a  V 3R  lpR EF   pR F  p^^rTS P                  WE3W#3R7      ;_uu_ 4        V! WEW#4      pRW#39   d   RMRpRRR	V^ ^3.pS P                  Wh\        \        ^4      4      R7       RRR4       R F  w  rES P                  WE3W#3R7      ;_uu_ 4        V! WEW#4      pVR
8w  d   TMTp	V	R
8X  d   ^
p	RW#39   d   RMRpRRV^ V	3.pS P                  Wh\        \        ^4      4      R7       RRR4       K  	  K  	  EK  	  R#   + '       g   i     L; i  + '       g   i     K  ; i)c           	      ^   < SP                  4       ;pRRVSP                  4       ;qP3RVW4V3.# )r   r   r   r  r7  Nr  )r   rh      )r  )lno1lno2op1op2lbl2rf  r4   s   &&&&  r   	get_instsLDirectCfgOptimizerTests.test_unconditional_jump_threading.<locals>.get_insts  sB    #zz|+t+,TZZ\1T8+4( r   r#  JUMP_NO_INTERRUPT)lnoopsNr  )r#  r  r  r  )r   Nr   r   ))r   r   )r   r   )r   r   )rN  rN  )rj   r  r0   r   )
r4   r  r  r  r  r  r  opr  r  s
   f         r   !test_unconditional_jump_threading9DirectCfgOptimizerTests.test_unconditional_jump_threading  sM   		 1C4d\\SJ\GG%d#;E#)cZ#7=PB,-(Q
	&N ..uTRWXYRZ^.\ H #GJDTL
KK )$c ?&*bjdd"9"$C'-#';VAT01CL*
 225QUV[\]V^Q_2` LK #G 5 1 HG LKKs   AD	#AD$D!$D5c                   ^pRRRR	R
RV^3RV P                  4       ;pRV P                  4       ;p^3RRV^
3VRRRR.pRRRRR
RRV P                  4       ;pRV P                  4       ;p^3RRV^
3VRRRR.pV P                  WER.R7       R# )r   r   Nrc  r#  r  )r   r   rh   r  r   rT   )r  rh   r   )r  rh   r   )r  rh   r   )r%  NrN  )r'  rT   	   )r)  Nr  )r7  Nra  )r}   r   r  r  r	  r   rT   )r	  rh   r   )r   Nr   r  )r4   r  topr.  r  r  s   &     r   test_list_to_tuple_get_iter3DirectCfgOptimizerTests.test_list_to_tuple_get_iter!	  s    "# !!!8!<!::<C

,a0 S"!!!&!
& !&!&!!::<C

,a0 S"!!!&!
$ 	""5$"Hr   c                    . . r!. . RO;pO F3  pVP                  V4       VP                  VP                  4       4       K5  	  V P                  V. RO4       V P                  V. RO4       V P                  V. 4       R# )r   N)r   rh   rT   r   )r   rT   rh   r   )appendpopr   )r4   r   r   itemsitems   &    r   #test_list_to_tuple_get_iter_is_safe;DirectCfgOptimizerTests.test_list_to_tuple_get_iter_is_safeJ	  sl    21/,u/DHHTNHHUYY[! 0 	L)L)#r   r=   )NNr   )!r  r  r  r  r  r  r  r  r  r  r  r  r  r   r/  r2  r:  r=  rF  rK  r\  rb  rh  rk  rr  r  r  r  r  r  r  r  r  r  s   @r   r  r  `  s     680/44dl	S::ZZx&:P&:P?YB1Vf+YZ"VHsQj&QPPmf8.K"Q Q(\0\,\.*aX'IR$ $r   r  c                      a  ] tR tRt o R tRR ltR tR tR tR t	R	 t
R
 tR tR tR tR tR tR tR tR tR tR tR tR tRtV tR# )OptimizeLoadFastTestCaseiT	  c                    VR,          ^,          p^ pV F  w  rEpVR8X  g   K  \        W54      pK  	  \        V^,           4       Uu. uF  pRNK  	  ppVR^ V^,           3RRV^,           3.,           V3# u upi )rh   r}   Nr-   r   )rI   r   )r4   r  last_locmaxconstr  r%   _r  s   &&      r   make_bb OptimizeLoadFastTestCase.make_bbU	  s    9Q<JBQ\!x-   !&hl 34 31$ 341hl+T8a<0
 
  	 5s   A5Nc                x    V P                  V4      w  rEV P                  V4      w  rgV P                  WFWWR 7       R# )r  N)r  r  )r4   r  r  r  insts_bbinsts_constsexpected_insts_bb
exp_constss   &&&&    r   checkOptimizeLoadFastTestCase.checka	  s>    !%e!4(,^(D%""8*6 	# 	Tr   c                j    . ROp. ROpV P                  W4       . ROp. ROpV P                  W4       R# )r  N)r  r   rh   r  rh   rT   r   rT   r   )r	  r   rh   r	  rh   rT   r  )r  rw  r   rT   r   rz  )r  rw  r  rz  r  r4   r  rg  s   &  r   test_optimized'OptimizeLoadFastTestCase.test_optimizedg	  s:    



 	

5#

 	

5#r   c                j    . ROp. ROpV P                  W4       . ROp. ROpV P                  W4       R# )r  N)r  r  r7  Nr   )r  r  r  )r  )COPYrh   rT   r  )r  )r   NrT   r  r  r  s   &  r   test_unoptimized_if_unconsumed7OptimizeLoadFastTestCase.test_unoptimized_if_unconsumed	  s:    



 	

5#



 	

5#r   c                    . ROpV P                  W4       . ROpV P                  W4       . ROpV P                  W4       R# )r  N)r  r}   r   rT   )r'  r   r   rz  )r  r  r}   r   r   STORE_FAST_STORE_FASTrh   r   )r7  Nr   )r  )DELETE_FASTr   rT   r  r  r4   r  s   & r   "test_unoptimized_if_support_killed;OptimizeLoadFastTestCase.test_unoptimized_if_support_killed	  sA    
 	

5 
 	

5 

 	

5 r   c                Z    RR.pV P                  W4       . ROpV P                  W4       R# )r  Nr  )r'  rh   rT   )r  r  r  r  r  s   & r   test_unoptimized_if_aliased4OptimizeLoadFastTestCase.test_unoptimized_if_aliased	  s2     
 	

5 

 	

5 r   c                0    . ROpV P                  W4       R# )r  N)r  GET_LENNrT   r'  rh   r   )r'  rT   r   r  r  s   & r   test_consume_no_inputs/OptimizeLoadFastTestCase.test_consume_no_inputs	  s    
 	

5 r   c                0    . ROpV P                  W4       R# )r  N)r  r  )r  r   r   r  r  s   & r   #test_consume_some_inputs_no_outputs<OptimizeLoadFastTestCase.test_consume_some_inputs_no_outputs	  s    

 	

5 r   c                8    . ROp. ROpV P                  W4       R# )r  N)r  r  CHECK_EXC_MATCHNr   )r  r  r  r  r  s   &  r   test_check_exc_match-OptimizeLoadFastTestCase.test_check_exc_match	  s    



 	

5#r   c           
         RV P                  4       ;pRV P                  4       ;p^3RRV^3VRRR	R
.
pV P                  W3R.R7       R# )r  rc  r#  Nr  r  )r'  rT   r   )r)  Nr   )r7  Nr   )r}   r   rN  )r-   Nr   r  )r4   r  r.  r  s   &   r   test_for_iter&OptimizeLoadFastTestCase.test_for_iter	  sb    ::<C

,a0 S!   %
 	""5"?r   c                j    RR.pRR.pV P                  W4       RR.pRR.pV P                  W4       R# )r  Nr  )	LOAD_ATTRr   rT   r  )r  rh   rT   r  r  s   &  r   test_load_attr'OptimizeLoadFastTestCase.test_load_attr	  sX    

 '
 	

5#  

  
 	

5#r   c                j    . ROp. ROpV P                  W4       . ROp. ROpV P                  W4       R# )r  N)r  r  r  rT   r   LOAD_SUPER_ATTRr   r   )r  r  )r	  rT   r   r  )r  r  r  r  rh   r   )r  r  r  r  r  r  s   &  r   test_super_attr(OptimizeLoadFastTestCase.test_super_attr
  s:    

 	

5#

 	

5#r   c                    RRRV P                  4       ;p^3RRVRR	.pRR
RV P                  4       ;p^3RRVRR	.pV P                  W#R.R7       R# )r  SENDNr  r  r  )r}   r   r   r|  )r}   r   r   )r-   NrN  r  r  )r4   r.  r  rg  s   &   r   	test_send"OptimizeLoadFastTestCase.test_send#
  s}    DJJL(S!, % %	
  &DJJL(S!, % %	
 	""5D6"Br   c                b    . ROpV P                  W4       . ROp. ROpV P                  W4       R# )r  N)r  FORMAT_SIMPLENrT   r  )r  r  r  )r  r  r  r  r  s   &  r   test_format_simple+OptimizeLoadFastTestCase.test_format_simple:
  s3    

 	

5 



 	

5#r   c                n    . ROpV P                  WR.R7       . ROp. ROpV P                  WR.R7       R# )r}   Nr  )rv  r  SET_FUNCTION_ATTRIBUTErT   r   ry  r{  )r-   Nr   )rv  r  r  r-   Nr   )rv  r  r  r   r  r  s   &  r   test_set_function_attribute4OptimizeLoadFastTestCase.test_set_function_attributeQ
  sE    
 	""5"?

 	""5D6"Br   c                    RRRV P                  4       ;pRV P                  4       ;p^3RR	RV^3VR
RR.pV P                  W3R.R7       R# )r  Nr  r#  r  r  )GET_YIELD_FROM_ITERNrT   r  )YIELD_VALUErh   r   )RESUMErT   rN  )END_SENDNr  )r}   r   r  rp  r  )r4   sendr.  r  s   &   r   test_get_yield_from_iter1OptimizeLoadFastTestCase.test_get_yield_from_iterk
  sj      , JJL DDJJL(S!,!T1!!&
 	""5"?r   c                0    RR.pV P                  W4       R# )r  Nr  )PUSH_EXC_INFONrT   r  r  s   & r   test_push_exc_info+OptimizeLoadFastTestCase.test_push_exc_info}
  s    &
 	

5 r   c                0    . ROpV P                  W4       R# )r  N)r  )LOAD_SPECIALr   rT   r  r  r  s   & r   test_load_special*OptimizeLoadFastTestCase.test_load_special
  s    

 	

5 r   c                j    R  pV! 4       p\         P                  ! 4        V P                  V^*.4       R# )c                      ^*.p  T ? #   ? i ; i)*   r=   )objs    r   
create_obj@OptimizeLoadFastTestCase.test_del_in_finally.<locals>.create_obj
  s    $CCs    N)gccollectr   )r4   r  r  s   &  r   test_del_in_finally,OptimizeLoadFastTestCase.test_del_in_finally
  s-    	 l 	

rd#r   c                :    R  pV P                  V! 4       R4       R# )c                      ^ p T  p V # r   r=   )vars    r   r
   >OptimizeLoadFastTestCase.test_format_simple_unicode.<locals>.f
  s    CCECJr   r}  Nr  r  s   & r   test_format_simple_unicode3OptimizeLoadFastTestCase.test_format_simple_unicode
  s    	 	c"r   r=   rr   )r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r	  r  r  r  r!  r  r  r  s   @r   r  r  T	  ss     
T$6$2!2!!!$@$,$<C.$.C4@$!!$ # #r   r  __main__)r   r  	itertoolsr   r   r#   r  r   unittest_testinternalcapiImportErrorr  r   test.support.bytecode_helperr   r   r   r   r   r(   r*   TestCaser  r  r  r  r  mainr=   r   r   <module>r+     s    
 	 +  
   H H#
>v?$ v?rB(## B4V7$4 V7rq$5 q$h'P#6 P#h
 zMMO }T  s   B 	B('B(