AlkantarClanX12

Your IP : 18.225.255.196


Current Path : /opt/alt/python37/lib64/python3.7/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/__pycache__/dis.cpython-37.opt-2.pyc

B

YI~d�M�@s�ddlZddlZddlZddlZddlTddlmZdddddd	d
ddd
dgeZ[ejejej	e
eefZ
edZdd�ZdOddd�dd�ZdPdd�dd�Zddddddddddd �
Zd!d"�Zd#d$�Zd%d�Zd&d'�Zdd�d(d�Ze�d)d*�Zd+ej_d,ej_d-ej_d.ej_d/ej_d0ej _d1ej!_d2ej"_d3Z#d4Z$Gd5d
�d
e�Z%dd6�d7d�Z&d8d9�Z'd:d;�Z(dQd<d=�Z)dRdd�d?d�Z*ddd�d@dA�Z+dSdddB�dCdD�Z,dEdF�Z-e*Z.dGdH�Z/dId
�Z0dJd	�Z1GdKd�d�Z2dLdM�Z3e4dNk�r�e3�dS)T�N)�*)�__all__�	code_info�dis�disassemble�distb�disco�findlinestarts�
findlabels�	show_code�get_instructions�Instruction�Bytecode�FORMAT_VALUEcCs6yt||d�}Wn tk
r0t||d�}YnX|S)N�eval�exec)�compile�SyntaxError)�source�name�c�r�(/opt/alt/python37/lib64/python3.7/dis.py�_try_compiles
r)�file�depthcCsn|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��rt|j�	��}x�|D]p\}}t
|t�r�td||d�yt
|||d	�Wn0tk
r�}ztd
||d�Wdd}~XYnXt|d�q�Wnht|d��rt|||d	�nLt
|ttf��r<t||d�n.t
|t��rXt|||d	�ntdt|�j��dS)
N)r�__func__�__code__�gi_code�ag_code�cr_code�__dict__zDisassembly of %s:)rrzSorry:�co_codez(don't know how to disassemble %s objects)r�hasattrrrrrr �sortedr!�items�
isinstance�
_have_code�printr�	TypeError�_disassemble_recursive�bytes�	bytearray�_disassemble_bytes�str�_disassemble_str�type�__name__)�xrrr%rZx1�msgrrrr"s>	






 )rcCs\|dkrDy
tj}Wntk
r0td�d�YnXx|jrB|j}q4Wt|jj|j|d�dS)Nz no last traceback to disassemble)r)	�sys�last_traceback�AttributeError�RuntimeError�tb_nextr�tb_frame�f_code�tb_lasti)�tbrrrrrOs

Z	OPTIMIZEDZ	NEWLOCALSZVARARGSZVARKEYWORDSZNESTEDZ	GENERATORZNOFREEZ	COROUTINEZITERABLE_COROUTINEZASYNC_GENERATOR)
������ �@��icCsbg}xRtd�D]8}d|>}||@r|�t�|t|���||N}|sPqW|�t|��d�|�S)NrBr=z, )�range�append�COMPILER_FLAG_NAMES�get�hex�join)�flags�names�i�flagrrr�pretty_flagsisrPcCs�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)	Nrrrrr z
<disassembly>r"z(don't know how to disassemble %s objects)r#rrrrr r&r.rr)r0r1)r2rrr�_get_code_objectws 







rQcCstt|��S)N)�_format_code_inforQ)r2rrrr�scCs�g}|�d|j�|�d|j�|�d|j�|�d|j�|�d|j�|�d|j�|�dt|j��|j	r�|�d�x t
|j	�D]}|�d	|�q�W|jr�|�d
�x t
|j�D]}|�d|�q�W|j�r|�d�x t
|j�D]}|�d|�q�W|j
�rF|�d
�x"t
|j
�D]}|�d|��q.W|j�r||�d�x"t
|j�D]}|�d|��qdWd�|�S)NzName:              %szFilename:          %szArgument count:    %szKw-only arguments: %szNumber of locals:  %szStack size:        %szFlags:             %sz
Constants:z%4d: %rzNames:z%4d: %szVariable names:zFree variables:zCell variables:�
)rG�co_name�co_filename�co_argcount�co_kwonlyargcount�
co_nlocals�co_stacksizerP�co_flags�	co_consts�	enumerate�co_names�co_varnames�co_freevars�co_cellvarsrK)�co�linesZi_cZi_nrrrrR�s:




rRcCstt|�|d�dS)N)r)r(r)rarrrrr�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
�Fr?cCs�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_linerG�is_jump_target�repr�offset�rjust�opname�ljust�
_OPNAME_WIDTH�arg�_OPARG_WIDTH�argreprrK�rstrip)�self�lineno_widthZmark_as_current�offset_widthZfieldsZ
lineno_fmtrrr�_disassemble�s&



zInstruction._disassembleN)rfFr?)r1�
__module__�__qualname__ryrrrrr
�s)�
first_linecCsTt|�}|j|j}tt|��}|dk	r4||j}nd}t|j|j|j	|j
|||�S)Nr)rQr`r_�dictr	�co_firstlineno�_get_instructions_bytesr"r^r]r[)r2r|ra�
cell_names�
linestarts�line_offsetrrrr�scCs |}|dk	r||}|t|�fS)N)rl)Zconst_indexZ
const_list�argvalrrr�_get_const_infosr�cCs*|}|dk	r||}|}nt|�}||fS)N)rl)Z
name_indexZ	name_listr�rtrrr�_get_name_infosr�c
csxt|�}d}�xdt|�D�]V\}	}
}|dk	rH|�|	d�}|dk	rH||7}|	|k}d}
d}|dk	�rT|}
|
tkr~t||�\}
}n�|
tkr�t||�\}
}n�|
tkr�|	d|}
dt|
�}n�|
t	kr�t||�\}
}n�|
t
kr�t|}
|
}nn|
tkr�t||�\}
}nV|
t
k�rTdtttf|d@t|d@�f}
d|d@}|
d�rT|�rL|d7}|d	7}tt|
|
||
||	||�VqWdS)
N�r>zto rfr?)r�r.rl�asciir=z, zwith format)r
�_unpack_opargsrIZhasconstr�Zhasnamer��hasjrelrlZhaslocalZ
hascompareZcmp_opZhasfreerr.r��boolr
ro)�code�varnamesrM�	constants�cellsr�r��labelsrjrm�oprrrkr�rtrrrr-sH


 

r���c
Cs<|j|j}tt|��}t|j||j|j|j|||d�dS)N)r)	r`r_r}r	r-r"r^r]r[)ra�lastirr�r�rrrr`scCstt||d�|dks|dkrp|dk	r,|d}xB|jD]8}t|d�r4t|d�td|f|d�t|||d�q4WdS)N)rrr=r"zDisassembly of %r:)rr)rr[r#r(r*)rarrr2rrrr*gs

r*)rr�c	Cs�|dk	}	|	r8t|���|}
|
dkr2tt|
��}q<d}nd}t|�d}|dkr^tt|��}
nd}
xdt|||||||d�D]J}|	o�|jdk	o�|jdk}|r�t|d�|j|k}t|�|||
�|d�qzWdS)	Ni�rfrr>i'r?)r�)r)	�max�values�lenr.rrjrmr(ry)r�r�r�rMr�r�r�rr�Zshow_linenoZ	maxlinenorwZ	maxoffsetrxZinstrZnew_source_lineZis_current_instrrrrr-rs,




r-cKstt|d�f|�dS)Nz<dis>)r*r)r�kwargsrrrr/�sr/ccshd}x^tdt|�d�D]J}||}|tkrP||d|B}|tkrJ|d>nd}nd}|||fVqWdS)Nrr>r=r@)rFr�Z
HAVE_ARGUMENTZEXTENDED_ARG)r�Zextended_argrNr�rrrrrr��sr�cCs`g}xVt|�D]J\}}}|dk	r|tkr6|d|}n|tkr|}nq||kr|�|�qW|S)Nr>)r�r�ZhasjabsrG)r�r�rmr�rrZlabelrrrr
�sccs�|jddd�}|jddd�}d}|j}d}xPt||�D]B\}}|rd||kr\||fV|}||7}|dkrt|d8}||7}q:W||kr�||fVdS)Nrr>r=rDrE)�	co_lnotabr~�zip)r�Zbyte_incrementsZline_incrementsZ
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	|��|_
||_||_dS)Nr)
rQ�codeobjr~r|�_line_offsetr`r_�_cell_namesr}r	�_linestarts�_original_objectr�)rvr2r|r�rarrr�__init__�szBytecode.__init__c	Cs*|j}t|j|j|j|j|j|j|jd�S)N)r�)	r�rr"r^r]r[r�r�r�)rvrarrr�__iter__�s
zBytecode.__iter__cCsd�|jj|j�S)Nz{}({!r}))�format�	__class__r1r�)rvrrr�__repr__�s
zBytecode.__repr__cCs$x|jr|j}qW||jj|jd�S)N)r�)r8r9r:r;)�clsr<rrr�from_traceback�s
zBytecode.from_tracebackcCs
t|j�S)N)rRr�)rvrrr�info�sz
Bytecode.infocCs`|j}|jdk	r|j}nd}t���2}t|j|j|j|j|j	|j
|j||d�	|��SQRXdS)Nr�)r�rMr�r�r�r�rr�)
r�r��io�StringIOr-r"r^r]r[r�r�r��getvalue)rvrarm�outputrrrr�s


zBytecode.dis)
r1rzr{r�r�r��classmethodr�r�rrrrrr�s
c	Csdddl}|��}|jd|��ddd�|��}|j�}|��}WdQRXt||jjd�}t	|�dS)Nr�infile�?�-)r0�nargs�defaultr)
�argparse�ArgumentParser�add_argument�FileType�
parse_argsr��readrrr)r��parser�argsr�rr�rrr�_test
sr��__main__)N)N)NNNNNr)r�)r�NNNNN)5r4�types�collectionsr�ZopcoderZ_opcodes_all�
MethodType�FunctionType�CodeTyper��staticmethodr0r'ZopmaprrrrrHrPrQrrRr�
namedtuplercro�__doc__rrr�rtrmrjrkrqrsr
rr�r�rrr*r-r/rr�r
r	rr�r1rrrr�<module>s|


-4
2=