ó
    „ñ:iC  ã                   ód   • S r SSKJrJrJr  SSKJr  SSKJr  \S 5       r	\S 5       r
\S 5       rg)	z™
This file provides internal compiler utilities that support certain special
operations with tuple and workarounds for limitations enforced in userland.
é    )ÚtypesÚtypingÚerrors)Úalloca_once)Ú	intrinsicc                 ó4   • S nU" XUR                   5      nXT4$ )a  Return a copy of the tuple with item at *idx* replaced with *val*.

Operation: ``out = tup[:idx] + (val,) + tup[idx + 1:]

**Warning**

- No boundchecking.
- The dtype of the tuple cannot be changed.
  *val* is always cast to the existing dtype of the tuple.
c                 óÞ   • Uu  pEn[        XR                  5      nUR                  XG5        UR                  XuR                  S5      U/SS9nUR                  Xh5        UR	                  U5      $ )Nr   T)Úinbounds)r   ÚtypeÚstoreÚgepÚload)	ÚcontextÚbuilderÚ	signatureÚargsÚtupÚidxÚvalÚstackÚoffptrs	            Ú]/srv/projetos/modelo_ml_acdoc/venv/lib/python3.13/site-packages/numba/cpython/unsafe/tuple.pyÚcodegenÚtuple_setitem.<locals>.codegen   s_   € Ø‰ˆ�#Ü˜G§X¡XÓ.ˆØ�‰�cÔ!à—‘˜U§X¡X¨a£[°#Ð$6À�ÐFˆØ�‰�cÔ"Ø�|‰|˜EÓ"Ð"ó    )Údtype)Ú	typingctxr   r   r   r   Úsigs         r   Útuple_setitemr      s!   € ò#ñ ˆc˜Ÿ	™	Ó
"€CØˆ<Ðr   c                 ó  ^^• [        U[        R                  5      (       d  [        R                  " U5      e[        UR                  5      m[        R                  " [        R                  TS9mT" U5      nUU4S jnX#4$ )z"Creates a sz-tuple of full slices.)r   Úcountc                 óø   >• S n[         R                  T/n[        R                  " T/UQ76 nU R	                  [         R                  5      nU R                  T5      nU" T5      U/n	U R                  XXi5      n
U
$ )Nc           	      óZ   • Un[        U 5       H  n[        X#[        S S 5      5      nM     U$ )N)Úranger   Úslice)ÚlengthÚempty_tupleÚoutÚis       r   ÚimplÚ5build_full_slice_tuple.<locals>.codegen.<locals>.impl/   s-   € ØˆCÜ˜6–]�Ü# C¬E°$¸Ó,=Ó>’ñ #àˆJr   )r   Úintpr   r   Úget_value_typeÚget_constant_undefÚcompile_internal)r   r   r   r   r*   Úinner_argtypesÚ	inner_sigÚll_idx_typer'   Ú
inner_argsÚresÚsizeÚ
tuple_types              €€r   r   Ú'build_full_slice_tuple.<locals>.codegen.   sw   ø€ ò	ô  Ÿ*™* jÐ1ˆÜ×$Ò$ ZÐA°.ÒAˆ	Ø×,Ñ,¬U¯Z©ZÓ8ˆà×0Ñ0°Ó<ˆÙ! $Ó'¨Ð5ˆ
à×&Ñ& w°iÓLˆØˆ
r   )	Ú
isinstancer   ÚIntegerLiteralr   ÚRequireLiteralValueÚintÚliteral_valueÚUniTupleÚslice2_type)ÚtyctxÚszr   r   r5   r6   s       @@r   Úbuild_full_slice_tuplerA   $   sg   ù€ ô �bœ%×.Ñ.×/Ñ/Ü×(Ò(¨Ó,Ð,äˆr×ÑÓ €DÜ—’¤e×&7Ñ&7¸tÑD€JÙ
�R‹.€Cöð" ˆ<Ðr   c                 ó’   • [        U[        R                  5      (       d  SU 3n[        R                  " U5      eU" U5      nS nX44$ )a>  This exists to handle the situation y = (*x,), the interpreter injects a
call to it in the case of a single value unpack. It's not possible at
interpreting time to differentiate between an unpack on a variable sized
container e.g. list and a fixed one, e.g. tuple. This function handles the
situation should it arise.
zBOnly tuples are supported when unpacking a single item, got type: c                 ó   • US   $ )Nr   © )r   r   r   r   s       r   r   Ú$unpack_single_tuple.<locals>.codegenR   s   € Ø�A‰wˆr   )r8   r   Ú	BaseTupler   ÚUnsupportedError)r?   r   Úmsgr   r   s        r   Úunpack_single_tuplerI   B   sM   € ô �cœ5Ÿ?™?×+Ñ+ðØ˜5ð"ˆä×%Ò% cÓ*Ð*á
ˆc‹(€Còàˆ<Ðr   N)Ú__doc__Ú
numba.corer   r   r   Únumba.core.cgutilsr   Únumba.core.extendingr   r   rA   rI   rD   r   r   Ú<module>rN      sT   ðñ÷
 -Ñ ,Ý *Ý *ð ñó ðð0 ñó ðð: ñó ñr   