§
    1@Äj7!  ã                   ó¦   — d Z ddlmZ ddlZddlmZmZ ddlmZm	Z	 dddœd„Z
d	„ Z G d
„ de¦  «        Z G d„ de¦  «        Z G d„ de¦  «        ZdS )z
Function descriptors.
é    )ÚdefaultdictN)ÚtypesÚitanium_mangler)Ú_dynamic_modnameÚ_dynamic_module© ©Úabi_tagsÚuidc                ó2   — t          j        | |||¬¦  «        S )Nr	   )r   Úmangle)ÚnameÚargtypesr
   r   s       úDC:\Projects\Historical\venv\Lib\site-packages\numba/core/funcdesc.pyÚdefault_manglerr      s   € ÝÔ! $¨¸8ÈÐMÑMÔMÐMó    c                 ó6   — | rd                      | |¦  «        n|S )zS
    Returns a new string that is used for the first half of the mangled name.
    z{}.{})Úformat)ÚmodnameÚqualnames     r   Úqualifying_prefixr      s"   € ð
 18ÐEˆ7�>Š>˜' 8Ñ,Ô,Ð,¸XÐEr   c                   ó°   — e Zd ZdZdZ	 	 	 dd„Zd„ Zd„ Zd	„ Ze	d
„ ¦   «         Z
e	d„ ¦   «         Ze	d„ ¦   «         Zd„ Zed„ ¦   «         Ze	 	 dd„¦   «         ZdS )ÚFunctionDescriptora"  
    Base class for function descriptors: an object used to carry
    useful metadata about a natively callable function.

    Note that while `FunctionIdentity` denotes a Python function
    which is being concretely compiled by Numba, `FunctionDescriptor`
    may be more "abstract".
    )Únativer   r   ÚdocÚtypemapÚ	calltypesÚargsÚkwsÚrestyper   Úmangled_nameÚunique_nameÚenv_nameÚglobal_dictÚinlineÚnoaliasr
   r   NFr   c                 óH  ‡ — |‰ _         |‰ _        |‰ _        |‰ _        |‰ _        |‰ _        |‰ _        |‰ _        |	‰ _        |
‰ _	        |‰ _
        |�'t          |t          ¦  «        s
J |¦   «         ‚|‰ _        n t          ˆ fd„|	D ¦   «         ¦  «        ‰ _        |€t          n|}t          ‰ j        ‰ j        ¦  «        }|‰ _         ||‰ j        ||¬¦  «        ‰ _        |€' |d                     |¦  «        ‰ j        ||¬¦  «        }|‰ _        |‰ _        |‰ _        |‰ _        d S )Nc              3   ó8   •K  — | ]}‰j         d |z            V — ŒdS )zarg.N)r   )Ú.0ÚaÚselfs     €r   ú	<genexpr>z.FunctionDescriptor.__init__.<locals>.<genexpr>>   s.   øè è € Ð!IÐ!I¸q $¤,¨v¸©zÔ":Ð!IÐ!IÐ!IÐ!IÐ!IÐ!Ir   r	   z.NumbaEnv.{})r   r   r$   r   r"   r   r   r   r   r   r    Ú
isinstanceÚtupler   r   r   r   r!   r   r#   r%   r&   r
   )r+   r   r   r   r"   r   r   r    r   r   r   Úmanglerr   r%   r&   r#   r$   r
   r   Ú
qualprefixs   `                   r   Ú__init__zFunctionDescriptor.__init__&   sP  ø€ ð ˆŒØˆŒØ&ˆÔØ ˆŒØ&ˆÔØˆŒð ˆŒØ"ˆŒØˆŒ	ØˆŒØˆŒàÐÝ˜h­Ñ.Ô.Ð8Ð8°Ñ8Ô8Ð.Ø$ˆDŒMˆMõ "Ð!IÐ!IÐ!IÐ!IÀDÐ!IÑ!IÔ!IÑIÔIˆDŒMØ%, _•/�/¸'ˆõ ' t¤|°T´]ÑCÔCˆ
ØˆŒØ#˜GØ˜œ°¸cð
ñ 
ô 
ˆÔð ÐØ�w˜~×4Ò4°ZÑ@Ô@Ø#œ}°xÀSðJñ Jô JˆHà ˆŒØˆŒØˆŒØ ˆŒˆˆr   c                 óB   — | j         p|                      ¦   «         j        S )z¨
        Return the global dictionary of the function.
        It may not match the Module's globals if the function is created
        dynamically (i.e. exec)
        )r$   Úlookup_moduleÚ__dict__©r+   s    r   Úlookup_globalsz!FunctionDescriptor.lookup_globalsO   s!   € ð ÔÐ@ 4×#5Ò#5Ñ#7Ô#7Ô#@Ð@r   c                 ó’   — | j         t          k    rt          S 	 t          j        | j         ¦  «        S # t
          $ r
 t          cY S w xY w)zÃ
        Return the module in which this function is supposed to exist.
        This may be a dummy module if the function was dynamically
        generated or the module can't be found.
        )r   r   r   Ú	importlibÚimport_moduleÚImportErrorr5   s    r   r3   z FunctionDescriptor.lookup_moduleW   sW   € ð Œ<Õ+Ò+Ð+Ý"Ð"ð'å Ô.¨t¬|Ñ<Ô<Ð<øÝð 'ð 'ð 'Ý&Ð&Ð&Ð&ð'øøøs   ™2 ²AÁAc                 óP   — t          |                      ¦   «         | j        ¦  «        S )zO
        Return the original function object described by this object.
        )Úgetattrr3   r   r5   s    r   Úlookup_functionz"FunctionDescriptor.lookup_functionf   s"   € õ �t×)Ò)Ñ+Ô+¨T¬]Ñ;Ô;Ð;r   c                 ó   — | j         S )z@
        The LLVM-registered name for the raw function.
        ©r!   r5   s    r   Úllvm_func_namez!FunctionDescriptor.llvm_func_namel   s   € ð
 Ô Ð r   c                 ó8   — t          j        | j        d¬¦  «        S )z‰
        The LLVM-registered name for a CPython-compatible wrapper of the
        raw function (i.e. a PyCFunctionWithKeywords).
        Úcpython)Úns)r   Úprepend_namespacer!   r5   s    r   Úllvm_cpython_wrapper_namez,FunctionDescriptor.llvm_cpython_wrapper_nameu   s&   € õ Ô0°Ô1BØ4=ð?ñ ?ô ?ð 	?r   c                 ó   — d| j         z   S )zb
        The LLVM-registered name for a C-compatible wrapper of the
        raw function.
        zcfunc.r?   r5   s    r   Úllvm_cfunc_wrapper_namez*FunctionDescriptor.llvm_cfunc_wrapper_name~   s   € ð ˜$Ô+Ñ+Ð+r   c                 ó   — d| j         z  S )Nz<function descriptor %r>)r"   r5   s    r   Ú__repr__zFunctionDescriptor.__repr__†   s   € Ø)¨TÔ-=Ñ>Ð>r   c                 óà   — |j         j        }|j         j        }|j        }|j        pd}t          |j        ¦  «        }d}d}|€t          }|j         j        j        }|j         j	        }	||	|||||fS )z™
        Returns
        -------
        qualname, unique_name, modname, doc, args, kws, globals

        ``unique_name`` must be a unique name.
        Ú r   N)
Úfunc_idÚfuncÚfunc_qualnameÚ
__module__Ú__doc__r.   Ú	arg_namesr   Ú__globals__r"   )
ÚclsÚfunc_irrM   r   r   r   r   r   r$   r"   s
             r   Ú_get_function_infoz%FunctionDescriptor._get_function_info‰   s}   € ð ŒÔ#ˆØ”?Ô0ˆà”/ˆØŒlÐ ˜bˆÝ�WÔ&Ñ'Ô'ˆØˆØˆàˆ?å&ˆGð "œ/Ô.Ô:ˆKà”oÔ1ˆà˜ g¨s°D¸#¸{ÐJÐJr   c
                 óŠ   — |                       |¦  «        \  }
}}}}}} | |||
||||||||||||	|j        j        ¬¦  «        }|S )N)r/   r%   r&   r$   r
   r   )rU   rL   Ú	unique_id)rS   rT   r   r    r   r   r/   r%   r&   r
   r   r"   r   r   r   r   r$   r+   s                     r   Ú_from_python_functionz(FunctionDescriptor._from_python_function¦   sp   € ð
 ×#Ò# GÑ,Ô,ñ	ˆ�; ¨¨d°C¸ð ˆs�6˜7 H¨k¸3Ø˜G YØ˜ g°fÀgØ*°XØ”Ô0ð	2ñ 2ô 2ˆð
 ˆr   )NNFFNNr   N)NFFr   )Ú__name__rO   Ú__qualname__rP   Ú	__slots__r1   r6   r3   r=   Úpropertyr@   rE   rG   rI   ÚclassmethodrU   rX   r   r   r   r   r      s  € € € € € ðð ð9€Ið BFØFJØ48ð'!ð '!ð '!ð '!ðRAð Að Að'ð 'ð 'ð<ð <ð <ð ð!ð !ñ „Xð!ð ð?ð ?ñ „Xð?ð ð,ð ,ñ „Xð,ð?ð ?ð ?ð ðKð Kñ „[ðKð8 à9=ØDFðð ð ñ „[ðð ð r   r   c                   óB   — e Zd ZdZdZed„ ¦   «         Zed„ ¦   «         ZdS )ÚPythonFunctionDescriptorzE
    A FunctionDescriptor subclass for Numba-compiled functions.
    r   c	                 ó>   — |                       ||||d||||¬¦	  «	        S )zx
        Build a FunctionDescriptor for a given specialization of a Python
        function (in nopython mode).
        T)r   r/   r%   r&   r
   )rX   )	rS   rT   r   r    r   r/   r%   r&   r
   s	            r   Úfrom_specialized_functionz2PythonFunctionDescriptor.from_specialized_function»   s6   € ð ×(Ò(¨°'¸7ÀIØ04¸gØ06ÀØ2:ð )ñ <ô <ð 	<r   c                 ó–   — t          d„ ¦  «        }|                     ¦   «         }t          j        }|                      ||||d¬¦  «        S )ze
        Build a FunctionDescriptor for an object mode variant of a Python
        function.
        c                  ó   — t           j        S ©N)r   Úpyobjectr   r   r   ú<lambda>zDPythonFunctionDescriptor.from_object_mode_function.<locals>.<lambda>Í   s   € ¥e¤n€ r   F)r   )r   Úcopyr   re   rX   )rS   rT   r   r   r    s        r   Úfrom_object_mode_functionz2PythonFunctionDescriptor.from_object_mode_functionÇ   sQ   € õ Ð4Ð4Ñ5Ô5ˆØ—L’L‘N”Nˆ	Ý”.ˆØ×(Ò(¨°'¸7ÀIØ05ð )ñ 7ô 7ð 	7r   N)rY   rO   rZ   rP   r[   r]   ra   rh   r   r   r   r_   r_   µ   sY   € € € € € ðð ð €Iàð	<ð 	<ñ „[ð	<ð ð	7ð 	7ñ „[ð	7ð 	7ð 	7r   r_   c                   ó&   ‡ — e Zd ZdZdZˆ fd„Zˆ xZS )ÚExternalFunctionDescriptorza
    A FunctionDescriptor subclass for opaque external functions
    (e.g. raw C functions).
    r   c                 óÄ   •— d„ t          t          |¦  «        ¦  «        D ¦   «         }dd„}t          t          | ¦  «                             dd ||dd |d |d ||¬¦  «         d S )Nc                 ó   — g | ]}d |z  ‘ŒS )zarg%dr   )r)   Úis     r   ú
<listcomp>z7ExternalFunctionDescriptor.__init__.<locals>.<listcomp>Ü   s   € Ð:Ð:Ð: �˜!‘Ð:Ð:Ð:r   c                 ó   — | S rd   r   )r*   Úxr
   r   s       r   r/   z4ExternalFunctionDescriptor.__init__.<locals>.manglerÞ   s   € ØˆHr   TrK   )r   r   r   r"   r   r   r    r   r   r   r/   r   rd   )ÚrangeÚlenÚsuperrj   r1   )r+   r   r    r   r   r/   Ú	__class__s         €r   r1   z#ExternalFunctionDescriptor.__init__Û   sŠ   ø€ Ø:Ð:¥U­3¨x©=¬=Ñ%9Ô%9Ð:Ñ:Ô:ˆð	ð 	ð 	ð 	åÕ(¨$ñ 	ô 	ß’ ¨d¸TØ%)¨r¸4Ø!(°D¸tØ!Ø!(Ø"*ð ñ ,ô ,ð ,ð ,ð ,r   )rY   rO   rZ   rP   r[   r1   Ú__classcell__)rt   s   @r   rj   rj   Ô   sI   ø€ € € € € ðð ð €Ið,ð ,ð ,ð ,ð ,ð ,ð ,ð ,ð ,r   rj   )rP   Úcollectionsr   r8   Ú
numba.corer   r   Únumba.core.utilsr   r   r   r   Úobjectr   r_   rj   r   r   r   ú<module>rz      s)  ððð ð $Ð #Ð #Ð #Ð #Ð #Ø Ð Ð Ð à -Ð -Ð -Ð -Ð -Ð -Ð -Ð -Ø >Ð >Ð >Ð >Ð >Ð >Ð >Ð >ð 13¸ð Nð Nð Nð Nð NðFð Fð FðZð Zð Zð Zð Z˜ñ Zô Zð Zðz7ð 7ð 7ð 7ð 7Ð1ñ 7ô 7ð 7ð>,ð ,ð ,ð ,ð ,Ð!3ñ ,ô ,ð ,ð ,ð ,r   