U
    |e	                     @   s|   d Z ddlmZmZmZ ddlmZmZ edZej	Z	e	dej
dd Ze	dejdd Ze	eeejd	d
 ZdS )z7
This file implements print functionality for the CPU.
    )typestypingcgutils)Registryimpl_ret_untracked	printimpl
print_itemc           	      C   sT   |j \}|j}| |}|||}|| || |  }t| ||j	|S )z(
    Print a single constant value.
    )
argsliteral_valueget_python_apiunserializeserialize_objectprint_objectdecrefget_dummy_valuer   return_type)	contextbuildersigr	   tyvalpyapistrobjres r   T/var/www/website-v5/atlas_env/lib/python3.8/site-packages/numba/cpython/printimpl.pyprint_item_impl   s    


r   c              
   C   s   |j \}|\}| |}| |}| jr8| j||| ||||}|jt	||ddj\}	}
|	 |
| || W 5 Q R X |
2 | |jd}||}|| || W 5 Q R X W 5 Q R X |  }t| ||j|S )z~
    Print a single native value by boxing it in a Python object and
    invoking the Python interpreter's print routine.
    T)likelyzthe print() function)r	   r   get_env_manager
enable_nrtnrtincreffrom_native_valueif_elser   is_not_nullr   r   insert_const_stringmodulestring_from_stringerr_write_unraisabler   r   r   )r   r   r   r	   r   r   r   env_managerobjif_okif_errorcstrr   r   r   r   r   r   !   s(    




c                 C   s   |  |}| }tt|j|D ]L\}\}}ttj|}	| 	d|	}
|
||g |t
|d k r"|d q"|d || |  }t| ||j|S )z 
    A entire print() call.
    r       
)r   
gil_ensure	enumeratezipr	   r   	signaturer   noneget_functionlenprint_stringgil_releaser   r   r   )r   r   r   r	   r   giliZargtypeargvalr4   impr   r   r   r   print_varargs_impl@   s    


r>   N)__doc__
numba.corer   r   r   numba.core.imputilsr   r   registrylowerLiteralr   AnyprintVarArgr>   r   r   r   r   <module>   s   



