+
    :iUv              0       T   R t ^ RIt^ RIHtHtHtHtHt ^ RIH	t	 ^ RI
Ht ^ RIHt ^ RIHtHtHt ]^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ 3/R l4       t ! R R	]]4      t ! R
 R]]4      t ! R R]]4      t]R8X  d   ]P.                  ! 4        R# R# )z0
Test bytecode fixes provided in interpreter.py
N)jitnjitobjmodetypeof	literally)overload)types)UnsupportedBytecodeError)TestCaseMemoryLeakMixinskip_unless_py10_or_laterc/                    V V,           V,           V,           V,           V,           V,           V,           V,           V	,           V
,           V,           V,           V,           V,           V,           V,           V,           V,           V,           V,           V,           V,           V,           V,           V,           V,           V,           V,           V,           V,           V,           V ,           V!,           V",           V#,           V$,           V%,           V&,           V',           V(,           V),           V*,           V+,           V,,           V-,           V.,           # N )/arg0arg1arg2arg3arg4arg5arg6arg7arg8arg9arg10arg11arg12arg13arg14arg15arg16arg17arg18arg19arg20arg21arg22arg23arg24arg25arg26arg27arg28arg29arg30arg31arg32arg33arg34arg35arg36arg37arg38arg39arg40arg41arg42arg43arg44arg45arg46s/   &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&Z/var/www/html/photoedit/myenv/lib/python3.14/site-packages/numba/tests/test_interpreter.pysum_jit_funcr@      s   f 	
	
	 	 		
 	 	 	 	 		 
	 	 	 	 	 	  !	" #	$ %	& '	( )	* +	, -	. /	0 1	2 3	4 5	6 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+	X Y,	Z [-	\ ].	0    c                     a  ] tR t^ut o Rt^t^tR t]R 4       t	]R 4       t
]R 4       t]R 4       t]R 4       t]R 4       t]R	 4       t]R
 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       tRtV tR# )TestCallFunctionExPeepHoleaz  
gh #7812

Tests that check a peephole optimization for Function calls
in Python 3.10. The bytecode changes when
(n_args / 2) + n_kws > 15, which moves the arguments from
the stack into a tuple and dictionary.

This peephole optimization updates the IR to use the original format.
There are different paths when n_args > 30 and n_args <= 30 and when
n_kws > 15 and n_kws <= 15.
c                   \        W,           4       Uu. uF  pRV 2NK
  	  pp. p\        W,           4       F.  pV^,          ^ 8X  d   RV R2pMRV 2pVP                  V4       K0  	  RP                  V4      pRV R2pVR,          p\        V4       F  pVRWS,           R	2,          pK  	  \        WV,           4       F  pVRWC,           R
WS,           R	2,          pK!  	  VR,          p/ p	\        VR\        /V	4       V	R,          # u upi )zW
Generates a function that calls sum_jit_func
with the desired number of args and kws.
argzpow(argz, 2)z, z	def impl(z):
z    return sum_jit_func(
z        z,
=z    )
r@   impl)rangeappendjoinexecr@   )
selfn_argsn_kwsi
param_list	args_listarg_valtotal_params	func_text
local_varss
   &&&       r?   gen_func#TestCallFunctionExPeepHole.gen_func   s   
 */v~)>?)>AA3i)>
?	v~&A 1uz#A3d+s)W% ' yy,~T2	11	vA8IL>55I v~.A8JM?!IL>EEI /Y	
Y6
C&!!) @s   D
c                    \        V P                  4       Uu. uF  qNK  	  ppV P                  V P                  ^ 4      pTp\        4       ! V4      pV! V!  pV! V!  pV P	                  Wg4       R# u upi )zx
Tests calling a function when n_args > 30 and
n_kws = 0. This shouldn't use the peephole, but
it should still succeed.
N)rH   THRESHOLD_ARGSrV   r   assertEqualrL   rO   
total_argsfpy_funccfuncabs   &       r?   test_all_args(TestCallFunctionExPeepHole.test_all_args   sr     "'t':':!;<!;Aa!;
<MM$--q1q	Z : =   
A1c                    \        V P                  4       Uu. uF  qNK  	  ppV P                  ^ V P                  4      pTp\        4       ! V4      pV! V!  pV! V!  pV P	                  Wg4       R# u upi )z:
Tests calling a function when n_kws > 15 and
n_args = 0.
N)rH   THRESHOLD_KWSrV   r   rZ   r[   s   &       r?   test_all_kws'TestCallFunctionExPeepHole.test_all_kws   sr     "'t'9'9!:;!:Aa!:
;MM!T//0q	Z : <rd   c                   V P                   ^,
          pV P                  ^,
          p\        W,           4       Uu. uF  q3NK  	  ppV P                  W4      pTp\	        4       ! V4      pV! V!  pV! V!  p	V P                  W4       R# u upi )z[
Tests calling a function when (n_args / 2) + n_kws > 15,
but n_args <= 30 and n_kws <= 15
NrY   rf   rH   rV   r   rZ   
rL   	used_argsused_kwsrO   r\   r]   r^   r_   r`   ra   s
   &         r?   test_small_args_small_kws4TestCallFunctionExPeepHole.test_small_args_small_kws   s     ''!+	%%)!&	'?!@A!@Aa!@
AMM).q	Z : Bs   
Bc                   V P                   ^,
          pV P                  p\        W,           4       Uu. uF  q3NK  	  ppV P                  W4      pTp\	        4       ! V4      pV! V!  pV! V!  p	V P                  W4       R# u upi )zZ
Tests calling a function when (n_args / 2) + n_kws > 15,
but n_args <= 30 and n_kws > 15
Nrj   rk   s
   &         r?   test_small_args_large_kws4TestCallFunctionExPeepHole.test_small_args_large_kws   s     ''!+	%%!&	'?!@A!@Aa!@
AMM).q	Z : B   
Bc                   V P                   pV P                  ^,
          p\        W,           4       Uu. uF  q3NK  	  ppV P                  W4      pTp\	        4       ! V4      pV! V!  pV! V!  p	V P                  W4       R# u upi )zZ
Tests calling a function when (n_args / 2) + n_kws > 15,
but n_args > 30 and n_kws <= 15
Nrj   rk   s
   &         r?   test_large_args_small_kws4TestCallFunctionExPeepHole.test_large_args_small_kws   s     ''	%%)!&	'?!@A!@Aa!@
AMM).q	Z : Brs   c                    V P                   pV P                  p\        W,           4       Uu. uF  q3NK  	  ppV P                  W4      pTp\	        4       ! V4      pV! V!  pV! V!  p	V P                  W4       R# u upi )zY
Tests calling a function when (n_args / 2) + n_kws > 15,
but n_args > 30 and n_kws > 15
Nrj   rk   s
   &         r?   test_large_args_large_kws4TestCallFunctionExPeepHole.test_large_args_large_kws   s~     ''	%%!&	'?!@A!@Aa!@
AMM).q	Z : Bs   
A:c                   a R o\         V3R l4       p\        \        S! 4       4      4      pV! 4       pV P                  W#4       R# )z?
Tests calling an objectmode function with > 15 return values.
c                      R# )    )r|                           	   
                  r   r   rA   r?   r^   BTestCallFunctionExPeepHole.test_large_kws_objmode.<locals>.py_func  s     rA   c                   < \        R/ RRbRRbRRbRRbRRbRRbRRbR	RbR
RbRRbRRbRRbRRbRRbRRbRRb ;_uu_ 4        S! 4       w  p ppppppppp	p
pppppRRR4       X X,           X,           X,           X,           X,           X,           X,           X,           X	,           X
,           X,           X,           X,           X,           X,           #   + '       g   i     L{; i)z
Wrapper to call py_func from objmode. This tests
large kws with objmode. If the definition for the
call is not properly updated this test will fail.
r`   int64ra   cder]   ghrO   jklmnopNr   )r   )r`   ra   r   r   r   r]   r   r   rO   r   r   r   r   r   r   r   r^   s                   r?   objmode_funcGTestCallFunctionExPeepHole.test_large_kws_objmode.<locals>.objmode_func  s       	
             ! F I#EJ   	
     	 
     I s   CC	N)r   sumlistrZ   )rL   r   r`   ra   r^   s   &   @r?   test_large_kws_objmode1TestCallFunctionExPeepHole.test_large_kws_objmode   sD    
	( 
;	 
;	z WY NrA   c                    R pV P                  \        4      ;_uu_ 4       p\        4       ! V4      ! R4       RRR4       V P                  R\	        XP
                  4      4       R#   + '       g   i     L7; i)zM
Tests generating large args when one of the inputs
has inlined controlflow.
c                     \        . ^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^NV '       d   ^M^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N5R^/ # r}   r9   r@   flags   &r?   inline_funcRTestCallFunctionExPeepHole.test_large_args_inline_controlflow.<locals>.inline_func^  s    &&& & 	&
 & & & & & & & & & & &  !&" #&$ %&& '&( )&* +&, q-&. /&0 1&2 3&4 5&6 7&8 9&: ;&< =&> ?&@ A&B C&D E&F G&H I&J K& &rA   FN9You can resolve this issue by moving the control flow outassertRaisesr	   r   assertInstr	exceptionrL   r   raisess   &  r?   "test_large_args_inline_controlflow=TestCallFunctionExPeepHole.test_large_args_inline_controlflowX  sX    '	R 788FF;& 9G  !	
 98   A''A7	c                r    R pTp\        4       ! V4      pV! R4      pV! R4      pV P                  WE4       R# )|
Tests generating large args when one of the inputs
has the change suggested in the error message
for inlined control flow.
c                     V '       d   ^M^p\        . ^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^NVN^N^N^N^N^N^N^N^N^N^N^N^N^N^N5R^/ # r   r   r   a_vals   & r?   r   VTestCallFunctionExPeepHole.test_large_args_noninlined_controlflow.<locals>.inline_func  s   A1E &&& & 	&
 & & & & & & & & & & &  !&" #&$ %&& '&( )&* +&, -&. /&0 1&2 3&4 5&6 7&8 9&: ;&< =&> ?&@ A&B C&D E&F G&H I&J K& &rA   FNr   rZ   rL   r   r^   r_   r`   ra   s   &     r?   &test_large_args_noninlined_controlflowATestCallFunctionExPeepHole.test_large_args_noninlined_controlflow  s;    (	T {#EN%LrA   c                    R pV P                  \        4      ;_uu_ 4       p\        4       ! V4      ! R4       RRR4       V P                  R\	        XP
                  4      4       R#   + '       g   i     L7; i)z
Tests generating only large args when one of the inputs
has inlined controlflow. This requires a special check
inside peep_hole_call_function_ex_to_call_function_kw
because it usually only handles varkwargs.
c                     \        . ^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^NV '       d   ^M^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N5!  # r}   r   r   s   &r?   r   PTestCallFunctionExPeepHole.test_all_args_inline_controlflow.<locals>.inline_func  s    %%% % 	%
 % % % % % % % % % % %  !%" #%$ %%& '%( )%* +%, q-%. /%0 1%2 3%4 5%6 7%8 9%: ;%< =%> ?%@ A%B C%D E%F G%H I% %rA   FNr   r   r   s   &  r?    test_all_args_inline_controlflow;TestCallFunctionExPeepHole.test_all_args_inline_controlflow  sX    &	P 788FF;& 9G  !	
 98r   c                r    R pTp\        4       ! V4      pV! R4      pV! R4      pV P                  WE4       R# )r   c                     V '       d   ^M^p\        . ^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^NVN^N^N^N^N^N^N^N^N^N^N^N^N^N^N5!  # r   r   r   s   & r?   r   TTestCallFunctionExPeepHole.test_all_args_noninlined_controlflow.<locals>.inline_func  s   A1E %%% % 	%
 % % % % % % % % % % %  !%" #%$ %%& '%( )%* +%, -%. /%0 1%2 3%4 5%6 7%8 9%: ;%< =%> ?%@ A%B C%D E%F G%H I% %rA   FNr   r   s   &     r?   $test_all_args_noninlined_controlflow?TestCallFunctionExPeepHole.test_all_args_noninlined_controlflow  s;    '	R {#EN%LrA   c                    R pV P                  \        4      ;_uu_ 4       p\        4       ! V4      ! R4       RRR4       V P                  R\	        XP
                  4      4       R#   + '       g   i     L7; i)zL
Tests generating large kws when one of the inputs
has inlined controlflow.
c                     \        R/ R ^bR^bR^bR^bR^bR^bR^bR^bR^bR	^bR
^bR^bR^bR^bR^bRV '       d   ^b # ^b # )r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   s   &r?   r   QTestCallFunctionExPeepHole.test_large_kws_inline_controlflow.<locals>.inline_func8  s       	
              a!   &'! rA   FNr   r   r   s   &  r?   !test_large_kws_inline_controlflow<TestCallFunctionExPeepHole.test_large_kws_inline_controlflow2  sW    	( 788FF;& 9G  !	
 98r   c                r    R pTp\        4       ! V4      pV! R4      pV! R4      pV P                  WE4       R# )z{
Tests generating large kws when one of the inputs
has the change suggested in the error message
for inlined control flow.
c                     V '       d   ^M^p\        R/ R^bR^bR^bR^bR^bR^bR^bR^bR	^bR
^bR^bR^bR^bR^bR^bRVb # )r}   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   s   & r?   r   UTestCallFunctionExPeepHole.test_large_kws_noninlined_controlflow.<locals>.inline_funcZ  s    A1E   	
             ! rA   FNr   r   s   &     r?   %test_large_kws_noninlined_controlflow@TestCallFunctionExPeepHole.test_large_kws_noninlined_controlflowS  s:    	* {#EN%LrA   r   N)__name__
__module____qualname____firstlineno____doc__rY   rf   rV   r   rb   rg   rn   rq   ru   rx   r   r   r   r   r   r   r   __static_attributes____classdictcell____classdict__s   @r?   rC   rC   u   s'     NM"6             X Xt 3
 3
j 4 4l 4
 4
l 3 3j 
 
@  rA   rC   c                      a  ] tR tRt o Rt]R 4       t]R 4       t]R 4       t]R 4       t	]R 4       t
]R 4       t]R	 4       t]R
 4       tRtV tR# )TestLargeConstDictiv  a  
gh #7894

Tests that check a peephole optimization for constant
dictionaries in Python 3.10. The bytecode changes when
number of elements > 15, which splits the constant dictionary
into multiple dictionaries that are joined by a DICT_UPDATE
bytecode instruction.

This optimization modifies the IR to rejoin dictionaries
and remove the DICT_UPDATE generated code. This then allows
code that depends on literal dictionaries or literal keys
to succeed.
c                n    R pTp\        4       ! V4      pV! 4       pV! 4       pV P                  WE4       R# )Z
Tests that a function with a large heterogeneous constant
dictionary remains a constant.
c                      / R ^bR^bR^bR^bR^bR^bR^bR^bR^bR	^bR
^bR^bR^bR^bR^bR^bR^bR^RR/Cp V R,          # )ABCDEFGHIJKLMNOPQRSr`   r   r   s    r?   
const_funcJTestLargeConstDict.test_large_heterogeneous_const_dict.<locals>.const_func  s    QQ Q Q	
 Q Q Q Q Q Q Q Q Q Q Q  Q!" Q#$ QS'A* S6MrA   Nr   )rL   r   r^   r_   r`   ra   s   &     r?   #test_large_heterogeneous_const_dict6TestLargeConstDict.test_large_heterogeneous_const_dict  s6    	6 z"IGrA   c                d   a a R o\        S4      V 3R l4       p\        V3R l4       pV! 4        R# )zfCheck the literal values for a LiteralStrKeyDict requiring
optimizations because it is heterogeneous.
c                     R # r   r   r   s   &r?   barYTestLargeConstDict.test_large_heterogeneous_LiteralStrKeyDict_literal_values.<locals>.bar      rA   c                   < / R ^bR^bR^bR^bR^bR^bR^bR^bR^bR	^bR
^bR^bR^bR^bR^bR^bR^bR^RR/CpR pVP                  4        UUu/ uF"  w  r4\        P                  ! V4      V! V4      bK$  	  pppSP                  \	        V \        P
                  4      4       SP                  V P                  V4       SP                  \        V R4      R4       R # u uppi )r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r`   c                 |    \         P                  ! V 4      '       d   \         P                  ! V 4      # \        V 4      # r   )r   maybe_literalliteralr   )zs   &r?   specific_tyqTestLargeConstDict.test_large_heterogeneous_LiteralStrKeyDict_literal_values.<locals>.ol_bar.<locals>.specific_ty  s*    +0+>+>q+A+Au}}Q'PvayPrA   initial_valueFc                     V # r   r   r   s   &r?   <lambda>nTestLargeConstDict.test_large_heterogeneous_LiteralStrKeyDict_literal_values.<locals>.ol_bar.<locals>.<lambda>      QrA   )	itemsr   r  
assertTrue
isinstanceLiteralStrKeyDictrZ   literal_valuehasattr)r   r`   r  xyexpectedrL   s   &     r?   ol_bar\TestLargeConstDict.test_large_heterogeneous_LiteralStrKeyDict_literal_values.<locals>.ol_bar  sg   QQ Q Q	
 Q Q Q Q Q Q Q Q Q Q Q  Q!" Q#$ QS'A,QEFWWYOYTQa(+a.8YHOOOJq%*A*ABCQ__h7WQ8%@	 Ps   (C"c                     < / R ^bR^bR^bR^bR^bR^bR^bR^bR^bR	^bR
^bR^bR^bR^bR^bR^bR^bR^RR/Cp S! V 4       R# )r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r`   Nr   r   r   s    r?   fooYTestLargeConstDict.test_large_heterogeneous_LiteralStrKeyDict_literal_values.<locals>.foo  s    
QQ Q Q	
 Q Q Q Q Q Q Q Q Q Q Q  Q!" Q#$ QS'A* FrA   Nr   r   rL   r  r  r   s   f  @r?   9test_large_heterogeneous_LiteralStrKeyDict_literal_valuesLTestLargeConstDict.test_large_heterogeneous_LiteralStrKeyDict_literal_values  s;    	 
#	 
	> 
	 
	6 	rA   c                v    R pTp\        4       ! V4      pRpV! V4      pV! V4      pV P                  WV4       R# )r   c                     / R ^bR^bR^bR^bR^bR^bR^bR^bR^bR	^bR
^bR^bR^bR^bR^bR^bR^bR^RV /CpV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?   const_keys_funcTTestLargeConstDict.test_large_heterogeneous_const_keys_dict.<locals>.const_keys_func  s    QQ Q Q	
 Q Q Q Q Q Q Q Q Q Q Q  Q!" Q#$ QQ'A* S6MrA   a_stringNr   )rL   r   r^   r_   valuer`   ra   s   &      r?   (test_large_heterogeneous_const_keys_dict;TestLargeConstDict.test_large_heterogeneous_const_keys_dict  s?    	6 "'EN%LrA   c                d   a a R o\        S4      V 3R l4       p\        V3R l4       pV! 4        R# )zuChecks that the optimization for large dictionaries
do not incorrectly update initial values due to other
mutations.
c                     R # r   r   r   s   &r?   r   DTestLargeConstDict.test_large_dict_mutation_not_carried.<locals>.bar#  r   rA   c                 ,  < / R ^bR^bR^bR^bR^bR^bR^bR^bR^bR	^bR
^bR^bR^bR^bR^bR^bR^bR^R^/CpV P                   f   R # SP                  \        V \        P                  4      4       SP                  V P                   V4       R # )r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   c                     \        V 4      # r   r   r   s   &r?   r  YTestLargeConstDict.test_large_dict_mutation_not_carried.<locals>.ol_bar.<locals>.<lambda>>      1rA   c                     V # r   r   r   s   &r?   r  r,  A  r	  rA   r  r  r  r   DictTyperZ   r   r`   rL   s   & r?   r  GTestLargeConstDict.test_large_dict_mutation_not_carried.<locals>.ol_bar&  s&   QQ Q Q	
 Q Q Q Q Q Q Q Q Q Q Q  Q!" Q#$ QQ'A* &--OOJq%..9:Q__a0rA   c                     < / R ^bR^bR^bR^bR^bR^bR^bR^bR^bR	^bR
^bR^bR^bR^bR^bR^bR^bR^R^/Cp ^V R&   S! V 4       R# )r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   XNr   r  s    r?   r  DTestLargeConstDict.test_large_dict_mutation_not_carried.<locals>.fooC  s    QQ Q Q	
 Q Q Q Q Q Q Q Q Q Q Q  Q!" Q#$ QQ'A* AcFFrA   Nr  r  s   f  @r?   $test_large_dict_mutation_not_carried7TestLargeConstDict.test_large_dict_mutation_not_carried  s;    	 
#	 
	8 
	 
	6 	rA   c                   a aa	a
a R o	R oRoRo
\        S	RR7      VV 3R l4       p\        SRR7      V
V 3R l4       pVV	3R lpTp\        4       ! V4      pV! 4       pV! 4       pS P                  Wg4       R	# )
zN
Tests an example using a regular update is
not modified by the optimization.
c                     R # r   r   r  s   &r?   check_beforeDTestLargeConstDict.test_usercode_update_use_d2.<locals>.check_beforeh      rA   c                     R # r   r   r:  s   &r?   check_afterCTestLargeConstDict.test_usercode_update_use_d2.<locals>.check_afterk  r=  rA   FT)prefer_literalc                    < S'       gP   R oR^R^R^/pSP                  \        V \        P                  4      4       SP	                  V P
                  V4       R # )Tr`   ra   r   c                     R # r   r   r   s   &r?   r  YTestLargeConstDict.test_usercode_update_use_d2.<locals>.ol_check_before.<locals>.<lambda>      TrA   )r  r  r   r0  rZ   r  )r   r`   checked_beforerL   s   & r?   ol_check_beforeGTestLargeConstDict.test_usercode_update_use_d2.<locals>.ol_check_beforeq  sV     "!%
 
1enn =>  !4!!rA   c                    < S'       gI   R oSP                  \        V \        P                  4      4       SP                  V P                  RJ 4       R # )TNc                     R # r   r   r   s   &r?   r  XTestLargeConstDict.test_usercode_update_use_d2.<locals>.ol_check_after.<locals>.<lambda>  rE  rA   )r  r  r   r0  r  )r   checked_afterrL   s   &r?   ol_check_afterFTestLargeConstDict.test_usercode_update_use_d2.<locals>.ol_check_after  s?     ! $
1enn =>4 78!!rA   c                    < R^R^R^/p R^R^/pS! V 4       V P                  V4       S! V 4       \        V 4      ^8  d   V# V # )zh
Dictionary update between two constant
dictionaries. This verifies d2 doesn't
get incorrectly removed.
r`   ra   r   r   r   )updatelen)d1d2r?  r;  s     r?   const_dict_funcGTestLargeConstDict.test_usercode_update_use_d2.<locals>.const_dict_func  s_     QQQB QQB IIbMO2w{	IrA   N)r   r   rZ   )rL   rG  rM  rT  r^   r_   r`   ra   r?  r;  rL  rF  s   f       @@@@r?   test_usercode_update_use_d2.TestLargeConstDict.test_usercode_update_use_d2a  s    		 	,t	4	" 
5	"" 
+d	3
	" 
4
	"	. "'IGrA   c                    R pV P                  \        4      ;_uu_ 4       p\        4       ! V4      ! RR4       RRR4       V P                  R\	        XP
                  4      4       R#   + '       g   i     L7; i)z
Tests generating a large dictionary when one of
the inputs requires inline control flow
has the change suggested in the error message
for inlined control flow.
c                     / R ^bR^bR^bR^bR^bR^bR^bRV'       d   ^M^bR^bR	^bR
^bR^bR^bR^bR^bR^bR^bR^RV /CpVR,          # r  r   )r`   r   r   s   && r?   r   PTestLargeConstDict.test_large_const_dict_inline_controlflow.<locals>.inline_func  s    QQ Q Q	
 Q Q Q $QA Q Q Q Q Q Q Q  Q!" Q#$ QQ'A* S6MrA   r"  FNr   r   r   s   &  r?   (test_large_const_dict_inline_controlflow;TestLargeConstDict.test_large_const_dict_inline_controlflow  sY    	6 788FF;
E2 9G  !	
 98s   A((A8	c                z    R pTp\        4       ! V4      pRpV! VR4      pV! VR4      pV P                  WV4       R# )z
Tests generating large constant dict when one of the
inputs has the change suggested in the error message
for inlined control flow.
c                     V'       d   ^M^p/ R^bR^bR^bR^bR^bR^bR^bRVbR	^bR
^bR^bR^bR^bR^bR^bR^bR^bR^RV /CpVR,          # )r}   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   )r`   r   valr   s   &&  r?   non_inline_funcWTestLargeConstDict.test_large_const_dict_noninline_controlflow.<locals>.non_inline_func  s     !CQQ Q Q	
 Q Q Q S Q Q Q Q Q Q Q  Q!" Q#$ QQ'A* S6MrA   r"  FNr   )rL   r`  r^   r_   r#  r`   ra   s   &      r?   +test_large_const_dict_noninline_controlflow>TestLargeConstDict.test_large_const_dict_noninline_controlflow  sE    	8 "'E5!%rA   c                d   a a R o\        S4      V 3R l4       p\        V3R l4       pV! 4        R# )z
Tests that the correct literal values are generated
for a dictionary that produces two DICT_UPDATE
bytecode entries for the same dictionary.
c                     R # r   r   r   s   &r?   r   >TestLargeConstDict.test_fuse_twice_literal_values.<locals>.bar  r   rA   c                   < / R ^bR^bR^bR^bR^bR^bR^bR^bR^	bR	^
bR
^bR^bR^bR^bR^bR^bR^b/ R^bR^bR^bR^bR^bR^bR^bR^bR^bR^bR^bR^bR^bR^bR^ bR ^!bR!^"bCR"^#/CpV P                   f   R# # SP                  \        V \        P                  4      4       SP                  V P                   V4       R$ # )%a1a2a3a4a5a6a7a8a9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a35c                     \        V 4      # r   r+  r   s   &r?   r  STestLargeConstDict.test_fuse_twice_literal_values.<locals>.ol_bar.<locals>.<lambda>4  r-  rA   c                     V # r   r   r   s   &r?   r  r  7  r	  rA   r/  r1  s   & r?   r  ATestLargeConstDict.test_fuse_twice_literal_values.<locals>.ol_bar  s   %q%q% q% q	%
 q% q% q% q% q% % % % % % %  !%" #%$ %%& '%( )%* +%, -%. /%0 1%2 3%4 5%6 7%8 9%: ;%< =%> ?%@ A%B C%D E%H I%AL &--OOJq%..9:Q__a0rA   c                     < / R ^bR^bR^bR^bR^bR^bR^bR^bR^	bR	^
bR
^bR^bR^bR^bR^bR^bR^b/ R^bR^bR^bR^bR^bR^bR^bR^bR^bR^bR^bR^bR^bR^bR^ bR ^!bR!^"bCR"^#/Cp S! V 4       R## )$rh  ri  rj  rk  rl  rm  rn  ro  rp  rq  rr  rs  rt  ru  rv  rw  rx  ry  rz  r{  r|  r}  r~  r  r  r  r  r  r  r  r  r  r  r  r  Nr   r  s    r?   r  >TestLargeConstDict.test_fuse_twice_literal_values.<locals>.foo9  s   %q%q% q% q	%
 q% q% q% q% q% % % % % % %  !%" #%$ %%& '%( )%* +%, -%. /%0 1%2 3%4 5%6 7%8 9%: ;%< =%> ?%@ A%B C%D E%H I%AL FrA   Nr  r  s   f  @r?   test_fuse_twice_literal_values1TestLargeConstDict.test_fuse_twice_literal_values  s=    	 
#+	 
+	Z 
)	 
)	V 	rA   r   N)r   r   r   r   r   r   r   r  r$  r6  rV  r[  rb  r  r   r   r   s   @r?   r   r   v  s      $ $L D DL & &P A AF I IV '
 '
R ' 'R c crA   r   c                   *   a  ] tR tRt o RtR tRtV tR# )'TestListExtendInStarArgNonTupleIterableih  aF  Test `fn(pos_arg0, pos_arg1, *args)` where args is a non-tuple iterable.

Python 3.9+ will generate LIST_EXTEND bytecode to combine the positional
arguments with the `*args`.

See #8059

NOTE: At the moment, there are no meaningful tests for NoPython because the
lack of support for `tuple(iterable)` for most iterable types.
c                   a R  o\        RR7      V3R l4       pV! R4      pVP                  R4      pV P                  VR4       V P                  W#4       R# )c                      V # r   r   r:  s   *r?   consumerSTestListExtendInStarArgNonTupleIterable.test_list_extend_forceobj.<locals>.consumert  s    HrA   T)forceobjc                    < S! ^^.V O5!  # r   r   )r  r  s   &r?   r  NTestListExtendInStarArgNonTupleIterable.test_list_extend_forceobj.<locals>.foow  s    Aq%1%%rA   ijoN)r}   r~   rO   r   r   )r   r^   rZ   )rL   r  gotexpectr  s   &   @r?   test_list_extend_forceobjATestListExtendInStarArgNonTupleIterable.test_list_extend_forceobjs  sY    	 
d		& 
	& %jU#34%rA   r   N)r   r   r   r   r   r  r   r   r   s   @r?   r  r  h  s     	& &rA   r  __main__)r   unittestnumbar   r   r   r   r   numba.extendingr   
numba.corer   numba.core.errorsr	   numba.tests.supportr
   r   r   r@   rC   r   r  r   mainr   rA   r?   <module>r     s    7 7 $  6  	
	
	
	
	
	
	
	
	
	





































_a aH~( ~Bo? od&ox &2 zMMO rA   