Your IP : 18.117.254.202


Current Path : /opt/alt/python310/lib64/python3.10/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/__pycache__/dis.cpython-310.opt-2.pyc

o

6��f4N�@s	ddlZddlZddlZddlZddlTddlmZgd�eZ[ejejej	e
eefZ
edZdedfedfed	ffZed
ZdZdd
�ZdUddd�dd�ZdUdd�dd�Zddddddddddd�
Zdd �Zd!d"�Zd#d$�Zd%d&�Zdd�d'd(�Ze�d)d*�Z d+e j!_"d,e j_"d-e j#_"d.e j$_"d/e j%_"d0e j&_"d1e j'_"d2e j(_"d3Z)d4Z*Gd5d6�d6e �Z+dd7�d8d9�Z,d:d;�Z-d<d=�Z.		dVd>d?�Z/dWdd�dAdB�Z0ddd�dCdD�Z1		dXdddE�dFdG�Z2dHdI�Z3e0Z4dJdK�Z5dLdM�Z6dNdO�Z7GdPdQ�dQ�Z8dRdS�Z9e:dTk�re9�dSdS)Y�N)�*)�__all__)�	code_info�dis�disassemble�distb�disco�findlinestarts�
findlabels�	show_code�get_instructions�Instruction�Bytecode�FORMAT_VALUE)N��str�repr�ascii�
MAKE_FUNCTION)�defaultsZ
kwdefaultsZannotationsZclosurecCs6	z	t||d�}W|Styt||d�}Y|Sw)N�eval�exec)�compile�SyntaxError)�source�name�c�r�*/opt/alt/python310/lib64/python3.10/dis.py�_try_compiles��r��file�depthcCsj	|durt|d�dSt|d�r|j}t|d�r|j}nt|d�r&|j}nt|d�r/|j}nt|d�r7|j}t|d�r�t|j�	��}|D]9\}}t
|t�r~td||d�z	t
|||d	�Wntyx}z
td
||d�WYd}~nd}~wwt|d�qEdSt|d�r�t|||d	�dSt
|ttf�r�t||d�dSt
|t�r�t|||d	�dStdt|�j��)
N�r!�__func__�__code__�gi_code�ag_code�cr_code�__dict__zDisassembly of %s:r zSorry:�co_code�(don't know how to disassemble %s objects)r�hasattrr$r%r&r'r(�sortedr)�items�
isinstance�
_have_code�printr�	TypeError�_disassemble_recursive�bytes�	bytearray�_disassemble_bytesr�_disassemble_str�type�__name__)�xr!r"r.rZx1�msgrrrr+sJ







��
��

�rr#cCsX	|dur ztj}Wntytd�d�w|jr |j}|jst|jj|j|d�dS)Nz no last traceback to disassembler#)	�sys�last_traceback�AttributeError�RuntimeError�tb_nextr�tb_frame�f_code�tb_lasti)�tbr!rrrrXs

�rZ	OPTIMIZEDZ	NEWLOCALSZVARARGSZVARKEYWORDSZNESTEDZ	GENERATORZNOFREEZ	COROUTINEZITERABLE_COROUTINEZASYNC_GENERATOR)
������ �@��icCsb	g}td�D]}d|>}||@r$|�t�|t|���||N}|s$nq|�t|��d�|�S)NrJrE�, )�range�append�COMPILER_FLAG_NAMES�get�hex�join)�flags�names�i�flagrrr�pretty_flagsrs�
rYcCs�	t|d�r	|j}t|d�r|j}nt|d�r|j}nt|d�r$|j}nt|d�r,|j}t|t�r6t|d�}t|d�r=|St	dt
|�j��)	Nr$r%r&r'r(z
<disassembly>r*r+)r,r$r%r&r'r(r/rrr2r8r9�r:rrr�_get_code_object�s$







�r[cCs	tt|��S�N)�_format_code_infor[rZrrrr�srcCsxg}|�d|j�|�d|j�|�d|j�|�d|j�|�d|j�|�d|j�|�d|j�|�dt|j	��|j
r[|�d	�t|j
�D]	}|�d
|�qQ|jrr|�d�t|j�D]	}|�d|�qh|j
r�|�d
�t|j
�D]	}|�d|�q|jr�|�d�t|j�D]	}|�d|�q�|jr�|�d�t|j�D]	}|�d|�q�d�|�S)NzName:              %szFilename:          %szArgument count:    %szPositional-only arguments: %szKw-only arguments: %szNumber of locals:  %szStack size:        %szFlags:             %sz
Constants:z%4d: %rzNames:z%4d: %szVariable names:zFree variables:zCell variables:�
)rP�co_name�co_filename�co_argcount�co_posonlyargcount�co_kwonlyargcount�
co_nlocals�co_stacksizerY�co_flags�	co_consts�	enumerate�co_names�co_varnames�co_freevars�co_cellvarsrT)�co�linesZi_cZi_nrrrr]�s<





r]cCs	tt|�|d�dS�Nr#)r1r)rmr!rrrr�sr�_InstructionzBopname opcode arg argval argrepr offset starts_line is_jump_targetz!Human readable name for operationzNumeric code for operationz6Numeric argument to operation (if any), otherwise Nonez4Resolved arg value (if known), otherwise same as argz0Human readable description of operation argumentz1Start index of operation within bytecode sequencez4Line started by this opcode (if any), otherwise Nonez1True if other code jumps to here, otherwise False��c@seZdZ	ddd�ZdS)r
�FrGcCs�	g}|r|jdurd|}|�||j�n|�d|�|r&|�d�n|�d�|jr4|�d�n|�d�|�t|j��|��|�|j�t��|j	durj|�t|j	��t
��|jrj|�d|jd�d�|��
�S)	Nz%%%dd� z-->z   z>>z  �(�))�starts_linerP�is_jump_targetr�offset�rjust�opname�ljust�
_OPNAME_WIDTH�arg�_OPARG_WIDTH�argreprrT�rstrip)�self�lineno_widthZmark_as_current�offset_widthZfieldsZ
lineno_fmtrrr�_disassemble�s(



zInstruction._disassembleN)rsFrG)r9�
__module__�__qualname__r�rrrrr
�s
r
)�
first_linecCsV	t|�}|j|j}tt|��}|dur||j}nd}t|j|j|j	|j
|||�S�Nr)r[rlrk�dictr	�co_firstlineno�_get_instructions_bytesr*rjrirg)r:r�rm�
cell_names�
linestarts�line_offsetrrrrs
�rcCs"	|}|dur||}|t|�fSr\�r)Zconst_indexZ
const_list�argvalrrr�_get_const_infos
r�cCs2	|}|dur||}|}||fSt|�}||fSr\r�)Z
name_indexZ	name_listr�r�rrr�_get_name_info's�r�c
#s��	t|�}d}t|�D]�\}	}
�|dur#|�|	d�}|dur#||7}|	|v}d}d}
�durÈ}|
tvr=t�|�\}}
n�|
tvrIt�|�\}}
nz|
tvrX�d}dt|�}
nk|
t	vrk|	d�d}dt|�}
nX|
t
vrwt�|�\}}
nL|
tvr�t�}|}
nA|
t
vr�t�|�\}}
n5|
tkr�t�d@\}}
|t�d@�f}|dr�|
r�|
d7}
|
d7}
n|
tkr�d��fd	d
�tt�D��}
tt|
|
�||
|	||�VqdS)NrrFzto rsrGrErNzwith formatc3s$�|]
\}}�d|>@r|VqdS)rENr)�.0rW�s�r~rr�	<genexpr>js�

�z*_get_instructions_bytes.<locals>.<genexpr>)r
�_unpack_opargsrRZhasconstr�Zhasnamer��hasjabsr�hasjrelZhaslocalZ
hascompareZcmp_opZhasfreer�FORMAT_VALUE_CONVERTERS�boolrrTrh�MAKE_FUNCTION_FLAGSr
r{)�code�varnamesrV�	constants�cellsr�r��labelsrwry�oprxr�r�rr�rr�7s\��
��r����c
Cs>	|j|j}tt|��}t|j||j|j|j|||d�dSro)	rlrkr�r	r6r*rjrirg)rm�lastir!r�r�rrrrps

�rcCstt||d�|dus|dkr6|dur|d}|jD]}t|d�r5t|d�td|f|d�t|||d�qdSdS)Nr#rrEr*zDisassembly of %r:r )rrgr,r1r3)rmr!r"r:rrrr3ws


��r3)r!r�c	Cs�t|�}	|	rt|���|}
|
dkrtt|
��}nd}nd}t|�d}|dkr/tt|��}
nd}
t|||||||d�D]%}|	oI|jduoI|jdk}|rQt|d�|j|k}t|�	|||
�|d�q<dS)	Ni�rsrrFi'rG�r�r#)
r��max�values�lenrr�rwryr1r�)r�r�r�rVr�r�r�r!r�Zshow_linenoZ	maxlinenor�Z	maxoffsetr�ZinstrZnew_source_lineZis_current_instrrrrr6�s6
���

��r6cKs	tt|d�fi|��dS)Nz<dis>)r3r)r�kwargsrrrr7�sr7ccsj�d}tdt|�d�D]'}||}|tkr(||d|B}|tkr%|d>nd}nd}d}|||fVqdS)NrrFrErH)rOr�Z
HAVE_ARGUMENTZEXTENDED_ARG)r�Zextended_argrWr�r~rrrr��s��r�cCsf	g}t|�D])\}}}|dur0|tvr|d|d}n
|tvr&|d}nq||vr0|�|�q|S)NrF)r�r�r�rP)r�r�ryr�r~Zlabelrrrr
�s

�r
ccs>�	d}|��D]\}}}|dur||kr|}||fVqdSr\)�co_lines)r�Zlastline�start�end�linerrrr	�s�
�r	c@sJeZdZ	ddd�dd�Zdd�Zdd�Zed	d
��Zdd�Zd
d�Z	dS)rN)r��current_offsetcCsdt|�|_}|dur|j|_d|_n	||_||j|_|j|j|_tt	|��|_
||_||_dSr�)
r[�codeobjr�r��_line_offsetrlrk�_cell_namesr�r	�_linestarts�_original_objectr�)r�r:r�r�rmrrr�__init__�s
zBytecode.__init__c	Cs*|j}t|j|j|j|j|j|j|jd�S)Nr�)	r�r�r*rjrirgr�r�r�)r�rmrrr�__iter__�s�zBytecode.__iter__cCsd�|jj|j�S)Nz{}({!r}))�format�	__class__r9r��r�rrr�__repr__�s
�zBytecode.__repr__cCs&	|jr
|j}|js||jj|jd�S)N)r�)r@rArBrC)�clsrDrrr�from_traceback�s
�zBytecode.from_tracebackcCs	t|j�Sr\)r]r�r�rrr�info�s
z
Bytecode.infocCsz	|j}|jdur
|j}nd}t��� }t|j|j|j|j|j	|j
|j||d�	|��Wd�S1s6wYdS)Nr�)r�rVr�r�r�r�r!r�)
r�r��io�StringIOr6r*rjrirgr�r�r��getvalue)r�rmry�outputrrrr�s 


�$�zBytecode.dis)
r9r�r�r�r�r��classmethodr�r�rrrrrr�s

rcCs|	ddl}|��}|jd|�d�ddd�|��}|j�}|��}Wd�n1s+wYt||jjd�}t	|�dS)Nr�infile�rb�?�-)r8�nargs�defaultr)
�argparse�ArgumentParser�add_argumentZFileType�
parse_argsr��readrrr)r��parser�argsr�rr�rrr�_tests
�r��__main__r\)NNNNNr)r�)r�NNNNN);r<�types�collectionsr�ZopcoderZ_opcodes_all�
MethodType�FunctionType�CodeTyper��staticmethodr8r0Zopmaprrrrr�rr�rrrrQrYr[rr]r�
namedtuplerpr{�__doc__r~r�r�ryrwrxr}rr
rr�r�r�rr3r6r7rr�r
r	rr�r9rrrr�<module>s����
-�
 �4
�9��
=

�

?>