§
    .@Äj`,  ã                   ó�  — d dl Z d dlmZmZmZmZmZmZmZm	Z	m
Z
mZmZmZ d dlmZmZmZ ej        j         dd„Zd„ Z G d„ dej        ¦  «        Z G d„ d	ej        ¦  «        Zej        ej        e ee¦  «        gej        j        _        ej        ej        j        _        ej        ej         ee¦  «        gej        j        _        eej        j        _        ej        ej        gej        j         _        ej        ej!        egej        j"        _        ej        gej        j#        _        ej        gej        j$        _        ej%        ej        j$        _        g ej        j&        _        eej        j&        _        ej        egej        j'        _        eej        j'        _        ej        egej        j(        _        eej        j(        _        ej        ej)        gej        j*        _         G d
„ de¦  «        Z+ e	de ee+¦  «        ¦  «        Z, e	de ee+¦  «        ¦  «        Z- e,ej.        ¦  «        Z/ e-ej0        ¦  «        Z1e,e-egej        j2        _        ej3        ej        j2        _        ej3        gej        j4        _        ej        ej3        gej        j5        _        eej        j6        _        eegej        j6        _        dS )é    N)ÚPOINTERÚc_char_pÚc_boolÚc_void_pÚc_intÚc_uint64Úc_size_tÚ	CFUNCTYPEÚ	string_atÚcastÚ	py_objectÚ	Structure)ÚffiÚtargetsÚobject_filec                 ó\  — |€'t          j        ¦   «                              ¦   «         dv }t          j        ¦   «         5 }t          j                             | |||¦  «        }|st          t          |¦  «        ¦  «        ‚	 ddd¦  «         n# 1 swxY w Y   d|_	        t          || ¬¦  «        S )a  
    Create a MCJIT ExecutionEngine from the given *module* and
    *target_machine*.

    *lmm* controls whether the llvmlite memory manager is used. If not supplied,
    the default choice for the platform will be used (``True`` on 64-bit ARM
    systems, ``False`` otherwise).
    N)Úarm64Úaarch64T)Úmodule)ÚplatformÚmachineÚlowerr   ÚOutputStringÚlibÚLLVMPY_CreateMCJITCompilerÚRuntimeErrorÚstrÚ_ownedÚExecutionEngine)r   Útarget_machineÚuse_lmmÚouterrÚengines        úQC:\Projects\Historical\venv\Lib\site-packages\llvmlite/binding/executionengine.pyÚcreate_mcjit_compilerr%      sè   € ð €ÝÔ"Ñ$Ô$×*Ò*Ñ,Ô,Ð0DÐDˆå	Ô	Ñ	Ô	ð ,˜vÝ”×3Ò3Ø�N G¨Vñ5ô 5ˆàð 	,Ý�s 6™{œ{Ñ+Ô+Ð+ð	,ð,ð ,ð ,ñ ,ô ,ð ,ð ,ð ,ð ,ð ,ð ,øøøð ,ð ,ð ,ð ,ð !€NÔÝ˜6¨&Ð1Ñ1Ô1Ð1s   ½ABÂBÂBc                  ón   — t           j                             ¦   «         } | dk    rt          | d¦  «        ‚dS )zp
    Check the system allows execution of in-memory JITted functions.
    An exception is raised otherwise.
    r   z‚cannot allocate executable memory. This may be due to security restrictions on your system, such as SELinux or similar mechanisms.N)r   r   Ú"LLVMPY_TryAllocateExecutableMemoryÚOSError)Úerrnos    r$   Úcheck_jit_executionr*   #   sA   € õ
 ŒG×6Ò6Ñ8Ô8€EØ�‚z€zÝ�eðGñô ð 	ð €zó    c                   óŽ   — e Zd ZdZdZd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
d	„ Zd
„ Zd„ Zed„ ¦   «         Zd„ Zd„ Zd„ Zdd„Zd„ Zd„ Zd„ ZdS )r   z­An ExecutionEngine owns all Modules associated with it.
    Deleting the engine will remove all associated modules.
    It is an error to delete the associated modules.
    Nc                 óŒ   — t          |g¦  «        | _        d| _        d|_        t          j                             | |¦  «         dS )z;
        Module ownership is transferred to the EE
        NT)ÚsetÚ_modulesÚ_tdr   r   Ú	ObjectRefÚ__init__)ÚselfÚptrr   s      r$   r2   zExecutionEngine.__init__8   s?   € õ ˜V˜H™œˆŒØˆŒØˆŒÝŒ×Ò˜t SÑ)Ô)Ð)Ð)Ð)r+   c                 óh   — t           j                             | |                     d¦  «        ¦  «        S )z›
        Return the address of the function named *name* as an integer.

        It's a fatal error in LLVM if the symbol of *name* doesn't exist.
        Úascii)r   r   ÚLLVMPY_GetFunctionAddressÚencode©r3   Únames     r$   Úget_function_addressz$ExecutionEngine.get_function_addressA   s(   € õ Œw×0Ò0°°t·{²{À7Ñ7KÔ7KÑLÔLÐLr+   c                 óh   — t           j                             | |                     d¦  «        ¦  «        S )zŸ
        Return the address of the global value named *name* as an integer.

        It's a fatal error in LLVM if the symbol of *name* doesn't exist.
        r6   )r   r   ÚLLVMPY_GetGlobalValueAddressr8   r9   s     r$   Úget_global_value_addressz(ExecutionEngine.get_global_value_addressI   s(   € õ Œw×3Ò3°D¸$¿+º+ÀgÑ:NÔ:NÑOÔOÐOr+   c                 óH   — t           j                             | ||¦  «         d S ©N)r   r   ÚLLVMPY_AddGlobalMapping)r3   ÚgvÚaddrs      r$   Úadd_global_mappingz"ExecutionEngine.add_global_mappingQ   s"   € ÝŒ×'Ò'¨¨b°$Ñ7Ô7Ð7Ð7Ð7r+   c                 ó¸   — || j         v rt          d¦  «        ‚t          j                             | |¦  «         d|_        | j                              |¦  «         dS )zL
        Ownership of module is transferred to the execution engine
        z#module already added to this engineTN)r/   ÚKeyErrorr   r   ÚLLVMPY_AddModuler   Úadd)r3   r   s     r$   Ú
add_modulezExecutionEngine.add_moduleT   s[   € ð �T”]Ð"Ð"ÝÐ@ÑAÔAÐAÝŒ× Ò   vÑ.Ô.Ð.ØˆŒØŒ×Ò˜&Ñ!Ô!Ð!Ð!Ð!r+   c                 óD   — t           j                             | ¦  «         dS )z}
        Make sure all modules owned by the execution engine are fully processed
        and "usable" for execution.
        N)r   r   ÚLLVMPY_FinalizeObject©r3   s    r$   Úfinalize_objectzExecutionEngine.finalize_object^   s    € õ
 	Œ×%Ò% dÑ+Ô+Ð+Ð+Ð+r+   c                 óD   — t           j                             | ¦  «         dS )zW
        Run static constructors which initialize module-level static objects.
        N)r   r   ÚLLVMPY_RunStaticConstructorsrL   s    r$   Úrun_static_constructorsz'ExecutionEngine.run_static_constructorse   s    € õ 	Œ×,Ò,¨TÑ2Ô2Ð2Ð2Ð2r+   c                 óD   — t           j                             | ¦  «         dS )zh
        Run static destructors which perform module-level cleanup of static
        resources.
        N)r   r   ÚLLVMPY_RunStaticDestructorsrL   s    r$   Úrun_static_destructorsz&ExecutionEngine.run_static_destructorsk   s    € õ
 	Œ×+Ò+¨DÑ1Ô1Ð1Ð1Ð1r+   c                 ó  — t          j        ¦   «         5 }t           j                             | ||¦  «        rt	          t          |¦  «        ¦  «        ‚	 ddd¦  «         n# 1 swxY w Y   | j                             |¦  «         d|_        dS )z1
        Ownership of module is returned
        NF)	r   r   r   ÚLLVMPY_RemoveModuler   r   r/   Úremover   )r3   r   r"   s      r$   Úremove_modulezExecutionEngine.remove_moduler   s½   € õ ÔÑÔð 	0 6ÝŒw×*Ò*¨4°¸Ñ@Ô@ð 0Ý"¥3 v¡;¤;Ñ/Ô/Ð/ð0ð	0ð 	0ð 	0ñ 	0ô 	0ð 	0ð 	0ð 	0ð 	0ð 	0ð 	0øøøð 	0ð 	0ð 	0ð 	0ð 	Œ×Ò˜VÑ$Ô$Ð$ØˆŒˆˆs   ”>AÁA#Á&A#c                 ó´   — | j         �| j         S t          j                             | ¦  «        }t	          j        |¦  «        | _         d| j         _        | j         S )z;
        The TargetData for this execution engine.
        NT)r0   r   r   Ú#LLVMPY_GetExecutionEngineTargetDatar   Ú
TargetDatar   )r3   r4   s     r$   Útarget_datazExecutionEngine.target_data|   sJ   € ð
 Œ8ÐØ”8ˆOÝŒg×9Ò9¸$Ñ?Ô?ˆÝÔ% cÑ*Ô*ˆŒØˆŒŒØŒxˆr+   c                 óD   — t           j                             | ¦  «        }|S )z 
        Enable JIT events for profiling of generated code.
        Return value indicates whether connection to profiling tool
        was successful.
        )r   r   ÚLLVMPY_EnableJITEvents)r3   Úrets     r$   Úenable_jit_eventsz!ExecutionEngine.enable_jit_eventsˆ   s   € õ Œg×,Ò,¨TÑ2Ô2ˆØˆ
r+   c                 óœ   — t          |t          ¦  «        j        }| j        D ])}t          |j        t          ¦  «        j        |k    r|c S Œ*dS )zH
        Find the ModuleRef corresponding to the given pointer.
        N)r   r   Úvaluer/   Ú_ptr)r3   Ú
module_ptrr4   r   s       r$   Ú_find_module_ptrz ExecutionEngine._find_module_ptr‘   sT   € õ �:�xÑ(Ô(Ô.ˆØ”mð 	ð 	ˆFÝ�F”K¥Ñ*Ô*Ô0°CÒ7Ð7Ø���ð 8àˆtr+   c                 ó®   — t          |t          ¦  «        rt          j                             |¦  «        }t
          j                             | |¦  «         dS )z�
        Add object file to the jit. object_file can be instance of
        :class:ObjectFile or a string representing file system path
        N)Ú
isinstancer   r   ÚObjectFileRefÚ	from_pathr   r   ÚLLVMPY_MCJITAddObjectFile)r3   Úobj_files     r$   Úadd_object_filezExecutionEngine.add_object_file›   sK   € õ
 �h¥Ñ$Ô$ð 	EÝ"Ô0×:Ò:¸8ÑDÔDˆHåŒ×)Ò)¨$°Ñ9Ô9Ð9Ð9Ð9r+   c                 ó”   — || _         || _        t          | ¦  «        | _        t          j                             | | j        ¦  «         dS )z~
        Set the object cache "notifyObjectCompiled" and "getBuffer"
        callbacks to the given Python functions.
        N)Ú_object_cache_notifyÚ_object_cache_getbufferÚ_ObjectCacheRefÚ_object_cacher   r   ÚLLVMPY_SetObjectCache)r3   Únotify_funcÚgetbuffer_funcs      r$   Úset_object_cachez ExecutionEngine.set_object_cache¥   sG   € ð
 %0ˆÔ!Ø'5ˆÔ$å,¨TÑ2Ô2ˆÔõ 	Œ×%Ò% d¨DÔ,>Ñ?Ô?Ð?Ð?Ð?r+   c                 óþ   — | j         €dS |j        j        }|j        j        }|j        j        }t          ||¦  «        }|                      |¦  «        }|€t          d|›�¦  «        ‚|                       ||¦  «         dS )z(
        Low-level notify hook.
        Nú3object compilation notification for unknown module )rm   Úcontentsrc   Úbuf_ptrÚbuf_lenr   rd   r   )r3   Údatarc   rx   ry   Úbufr   s          r$   Ú_raw_object_cache_notifyz(ExecutionEngine._raw_object_cache_notify²   s—   € ð Ô$Ð,ØˆFØ”]Ô-ˆ
Ø”-Ô'ˆØ”-Ô'ˆÝ˜ Ñ)Ô)ˆØ×&Ò& zÑ2Ô2ˆØˆ>õ �,Ø:D¸*ð Gñ Hô Hð Hà×!Ò! &¨#Ñ.Ô.Ð.Ð.Ð.r+   c                 óX  — | j         €dS |j        j        }|                      |¦  «        }|€t	          d|›�¦  «        ‚|                       |¦  «        }|�Tt
          j                             |t          |¦  «        ¦  «        |d         _	        t          |¦  «        |d         _
        dS dS )z+
        Low-level getbuffer hook.
        Nrv   r   )rn   rw   rc   rd   r   r   r   ÚLLVMPY_CreateByteStringÚlenrx   ry   )r3   rz   rc   r   r{   s        r$   Ú_raw_object_cache_getbufferz+ExecutionEngine._raw_object_cache_getbufferÄ   s±   € ð Ô'Ð/ØˆFØ”]Ô-ˆ
Ø×&Ò& zÑ2Ô2ˆØˆ>õ �,Ø:D¸*ð Gñ Hô Hð Hð ×*Ò*¨6Ñ2Ô2ˆØˆ?å!œg×=Ò=¸cÅ3ÀsÁ8Ä8ÑLÔLˆD�ŒGŒOÝ! #™hœhˆD�ŒGŒOˆOˆOð ˆ?r+   c                 óö   — | j         D ]}|                     ¦   «          Œ| j        �| j                             ¦   «          | j                              ¦   «          d | _        | j                             | ¦  «         d S r@   )r/   Údetachr0   Úclearrp   Ú_capiÚLLVMPY_DisposeExecutionEngine)r3   Úmods     r$   Ú_disposezExecutionEngine._disposeØ   st   € à”=ð 	ð 	ˆCØ�JŠJ‰LŒLˆLˆLØŒ8ÐØŒH�OŠOÑÔÐØŒ×ÒÑÔÐØ!ˆÔØŒ
×0Ò0°Ñ6Ô6Ð6Ð6Ð6r+   )NN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__rp   r2   r;   r>   rD   rI   rM   rP   rS   rW   Úpropertyr[   r_   rd   rk   rt   r|   r€   r‡   © r+   r$   r   r   1   s?  € € € € € ðð ð €Mð*ð *ð *ðMð Mð MðPð Pð Pð8ð 8ð 8ð"ð "ð "ð,ð ,ð ,ð3ð 3ð 3ð2ð 2ð 2ðð ð ð ð	ð 	ñ „Xð	ðð ð ðð ð ð:ð :ð :ð@ð @ð @ð @ð/ð /ð /ð$'ð 'ð 'ð(7ð 7ð 7ð 7ð 7r+   r   c                   ó   — e Zd ZdZd„ Zd„ ZdS )ro   zN
    Internal: an ObjectCache instance for use within an ExecutionEngine.
    c                 óœ   — t           j                             t          t          |¦  «        }t           j                             | |¦  «         d S r@   )r   r   ÚLLVMPY_CreateObjectCacheÚ_notify_c_hookÚ_getbuffer_c_hookr1   r2   )r3   Úobjr4   s      r$   r2   z_ObjectCacheRef.__init__è   sA   € ÝŒg×.Ò.­~Ý/@Ø/2ñ4ô 4ˆõ 	Œ×Ò˜t SÑ)Ô)Ð)Ð)Ð)r+   c                 ó:   — | j                              | ¦  «         d S r@   )r„   ÚLLVMPY_DisposeObjectCacherL   s    r$   r‡   z_ObjectCacheRef._disposeî   s   € ØŒ
×,Ò,¨TÑ2Ô2Ð2Ð2Ð2r+   N)rˆ   r‰   rŠ   r‹   r2   r‡   r�   r+   r$   ro   ro   ã   s<   € € € € € ðð ð*ð *ð *ð3ð 3ð 3ð 3ð 3r+   ro   c                   ó.   — e Zd Zdej        fdefdefgZdS )Ú_ObjectCacheDatarc   rx   ry   N)rˆ   r‰   rŠ   r   ÚLLVMModuleRefr   r	   Ú_fields_r�   r+   r$   r—   r—   *  s0   € € € € € à	�sÔ(Ð)Ø	�HÐØ	�HÐð€H€H€Hr+   r—   r@   )7r   Úctypesr   r   r   r   r   r   r	   r
   r   r   r   r   Úllvmlite.bindingr   r   r   r   ÚLLVMPY_LinkInMCJITr%   r*   r1   r   ro   r˜   ÚLLVMTargetMachineRefr   ÚargtypesÚLLVMExecutionEngineRefÚrestyperU   rG   ÚLLVMValueRefrA   rK   rY   ÚLLVMTargetDataRefr'   r7   r=   ÚLLVMObjectFileRefri   r—   Ú_ObjectCacheNotifyFuncÚ_ObjectCacheGetBufferFuncr|   r‘   r€   r’   r�   ÚLLVMObjectCacheRefr•   rq   r~   r�   r+   r$   ú<module>r§      só  ðØ €€€ð*ð *ð *ð *ð *ð *ð *ð *ð *ð *ð *ð *ð *ð *ð *ð *ð *ð *ð *ð *ð *ð *ð *ð *ð *ð *ð *ð *ð 7Ð 6Ð 6Ð 6Ð 6Ð 6Ð 6Ð 6Ð 6Ð 6ð „Ô Ð ð2ð 2ð 2ð 2ð,ð ð ðo7ð o7ð o7ð o7ð o7�c”mñ o7ô o7ð o7ðd3ð 3ð 3ð 3ð 3�c”mñ 3ô 3ð 3ð( ÔØÔØ
Ø€GˆHÑÔð	/€„Ô "Ô +ð .1Ô-G€„Ô "Ô *ð ÔØÔØ€GˆHÑÔð(€„Ô Ô $ð
 '-€„Ô Ô #ð ÔØÔð%€„Ô Ô !ð
 -0Ô,FØ,/Ô,<Ø,4ð,6€„Ô Ô (ð +.Ô*DÐ)E€„Ô Ô &ð Ôð8€„Ô +Ô 4ð 7:Ô6K€„Ô +Ô 3à68€„Ô *Ô 3Ø5:€„Ô *Ô 2ð ÔØð.€„Ô !Ô *ð -5€„Ô !Ô )ð ÔØð1€„Ô $Ô -ð 08€„Ô $Ô ,ð ÔØÔð.€„Ô !Ô *ðð ð ð ð �yñ ô ð ð #˜ 4¨Ø#* 7Ð+;Ñ#<Ô#<ñ>ô >Ð à%˜I d¨IØ&- gÐ.>Ñ&?Ô&?ñAô AÐ ð (Ð'ØÔ,ñ.ô .€à-Ð-ØÔ/ñ1ô 1Ð ð .DØ-FØ-6ð-8€„Ô  Ô )ð ,/Ô+A€„Ô  Ô (à.1Ô.DÐ-E€„Ô !Ô *à*-Ô*DØ*-Ô*@ð*B€„Ô Ô &ð +3€„Ô Ô 'Ø,4°hÐ+?€„Ô Ô (Ð (Ð (r+   