ok

Mini Shell

Direktori : /opt/alt/python38/lib64/python3.8/__pycache__/
Upload File :
Current File : //opt/alt/python38/lib64/python3.8/__pycache__/dis.cpython-38.opt-2.pyc

U

.��cZP�@sddlZddlZddlZddlZddlTddlmZdddddd	d
ddd
dgeZ[ejejej	e
eefZ
edZdedfedfedffZedZdZdd�ZdUddd�dd�ZdVdd�dd�Zddddd d!d"d#d$d%d&�
Zd'd(�Zd)d*�Zd+d�Zd,d-�Zdd�d.d�Ze�d/d0�Z d1e j!_"d2e j_"d3e j#_"d4e j$_"d5e j%_"d6e j&_"d7e j'_"d8e j(_"d9Z)d:Z*Gd;d
�d
e �Z+dd<�d=d�Z,d>d?�Z-d@dA�Z.dWdBdC�Z/dXdd�dEd�Z0ddd�dFdG�Z1dYdddH�dIdJ�Z2dKdL�Z3e0Z4dMdN�Z5dOd
�Z6dPd	�Z7GdQd�d�Z8dRdS�Z9e:dTk�re9�dS)Z�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
kwdefaultsZannotationsZclosurecCs6zt||d�}Wn tk
r0t||d�}YnX|S)N�eval�exec)�compile�SyntaxError)�source�name�c�r�(/opt/alt/python38/lib64/python3.8/dis.py�_try_compiles
r��file�depthcCsh|dkrt|d�dSt|d�r&|j}t|d�r8|j}n4t|d�rJ|j}n"t|d�r\|j}nt|d�rl|j}t|d�r�t|j�	��}|D]p\}}t
|t�r�td||d�zt
|||d	�Wn0tk
r�}ztd
||d�W5d}~XYnXt|d�q�nht|d��rt|||d	�nLt
|ttf��r6t||d�n.t
|t��rRt|||d	�ntdt|�j��dS)
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+s@	







 �r#cCsX|dkr@z
tj}Wntk
r0td�d�YnX|jr@|j}q2t|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
Z	OPTIMIZEDZ	NEWLOCALSZVARARGSZVARKEYWORDSZNESTEDZ	GENERATORZNOFREEZ	COROUTINEZITERABLE_COROUTINEZASYNC_GENERATOR)
������ �@��icCs`g}td�D]:}d|>}||@r|�t�|t|���||N}|sqVq|�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}n4t|d�r4|j}n"t|d�rF|j}nt|d�rV|j}t|t�rjt|d�}t|d�rx|St	dt
|�j��dS)	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�scCs�g}|�d|j�|�d|j�|�d|j�|�d|j�|�d|j�|�d|j�|�d|j�|�dt|j	��|j
r�|�d	�t|j
�D]}|�d
|�q�|jr�|�d�t|j�D]}|�d|�q�|j
�r|�d
�t|j
�D]}|�d|��q|j�rH|�d�t|j�D]}|�d|��q2|j�rz|�d�t|j�D]}|�d|��qdd�|�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]cCstt|�|d�dS�Nr#)r1r)rmr!rrrr�s�_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@seZdZddd�ZdS)r
�FrGcCs�g}|r:|jdk	r,d|}|�||j�n|�d|�|rJ|�d�n
|�d�|jrf|�d�n
|�d�|�t|j��|��|�|j�t��|j	dk	r�|�t|j	��t
��|jr�|�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)�
first_linecCsTt|�}|j|j}tt|��}|dk	r4||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�cCs |}|dk	r||}|t|�fSr\�r)Zconst_indexZ
const_list�argvalrrr�_get_const_infosr�cCs*|}|dk	r||}|}nt|�}||fSr\r�)Z
name_indexZ	name_listr�r�rrr�_get_name_info'sr�c
#s�t|�}d}t|�D�]r\}	}
�|dk	rD|�|	d�}|dk	rD||7}|	|k}d}d}
�dk	�rl�}|
tkrzt�|�\}}
n�|
tkr�t�|�\}}
n�|
tkr�|	d�}dt|�}
n�|
t	kr�t�|�\}}
n�|
t
kr�t�}|}
n�|
tkr�t�|�\}}
nr|
t
k�rFt�d@\}}
|t�d@�f}|d�rl|
�r<|
d7}
|
d7}
n&|
tk�rld��fd	d
�tt�D��}
tt|
|
�||
|	||�VqdS)NrrFzto rsrGrErNzwith formatc3s"|]\}}�d|>@r|VqdS)rENr)�.0rW�s�r~rr�	<genexpr>gs�z*_get_instructions_bytes.<locals>.<genexpr>)r
�_unpack_opargsrRZhasconstr�Zhasnamer��hasjrelrZhaslocalZ
hascompareZcmp_opZhasfreer�FORMAT_VALUE_CONVERTERS�boolrrTrh�MAKE_FUNCTION_FLAGSr
r{)�code�varnamesrV�	constants�cellsr�r��labelsrwry�oprxr�r�rr�rr�7sV






�r����c
Cs<|j|j}tt|��}t|j||j|j|j|||d�dSro)	rlrkr�r	r6r*rjrirg)rm�lastir!r�r�rrrrms�cCspt||d�|dks|dkrl|dk	r,|d}|jD]8}t|d�r2t|d�td|f|d�t|||d�q2dS)Nr#rrEr*zDisassembly of %r:r )rrgr,r1r3)rmr!r"r:rrrr3ts


r3)r!r�c	Cs�|dk	}	|	r8t|���|}
|
dkr2tt|
��}q<d}nd}t|�d}|dkr^tt|��}
nd}
t|||||||d�D]J}|	o�|jdk	o�|jdk}|r�t|d�|j|k}t|�|||
�|d�qxdS)	Ni�rsrrFi'rG�r�r#)	�max�values�lenrr�rwryr1r�)r�r�r�rVr�r�r�r!r�Zshow_linenoZ	maxlinenor�Z	maxoffsetr�ZinstrZnew_source_lineZis_current_instrrrrr6s8�
��

�r6cKstt|d�f|�dS)Nz<dis>)r3r)r�kwargsrrrr7�sr7ccsdd}tdt|�d�D]J}||}|tkrN||d|B}|tkrH|d>nd}nd}|||fVqdS)NrrFrErH)rOr�Z
HAVE_ARGUMENTZEXTENDED_ARG)r�Zextended_argrWr�r~rrrr��sr�cCs\g}t|�D]J\}}}|dk	r|tkr4|d|}n|tkr|}nq||kr|�|�q|S)NrF)r�r�ZhasjabsrP)r�r�ryr�r~Zlabelrrrr
�sc	cs�|jddd�}|jddd�}t|j�}d}|j}d}t||�D]P\}}|rz||krd||fV|}||7}||krzdS|dkr�|d8}||7}qB||kr�||fVdS)NrrFrErLrM)�	co_lnotabr�r*r��zip)	r�Zbyte_incrementsZline_incrementsZbytecode_lenZ
lastlineno�linenoZaddrZ	byte_incrZ	line_incrrrrr	�s&


c@sHeZdZddd�dd�Zdd�Zdd�Zed	d
��Zdd�Zd
d�Z	dS)rN)r��current_offsetcCsdt|�|_}|dkr&|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}q||jj|jd�S)N)r�)r@rArBrC)�clsrDrrr�from_traceback�szBytecode.from_tracebackcCs
t|j�Sr\)r]r�r�rrr�infosz
Bytecode.infocCsl|j}|jdk	r|j}nd}t���>}t|j|j|j|j|j	|j
|j||d�	|��W5QR�SQRXdS)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

c	Csfddl}|��}|jd|�d�ddd�|��}|j�}|��}W5QRXt||jjd�}t	|�dS)Nr�infile�rb�?�-)r8�nargs�defaultr)
�argparse�ArgumentParser�add_argumentZFileType�
parse_argsr��readrrr)r��parser�argsr�rr�rrr�_testsr��__main__)N)N)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�
6��=


Zerion Mini Shell 1.0