3
^A                 @   sn  d Z ddlmZmZmZmZmZmZmZm	Z	m
Z
 ddljjZdZdZdZe Zeeee eedd eed	d
 eedd eedddddd eedddd eedddd e	eddd0d eeddd1d eedddd e	eddd2d e	edd ed j Zd!d" Zd#d$ Zd%d& Zd'd( Zd)d* Zd+d, Zd-d. Zeeeeeeed/Ze
e e ee dS )3zn
CPython 3.6 bytecode opcodes

This is a like Python 3.6's opcode.py with some classification
of stack usage.
    )	def_opfinalize_opcodesinit_opdatajrel_opnargs_oprm_opstore_op
varargs_op
update_pj3N   g@CPythonZMAKE_CLOSURE   ZCALL_FUNCTION_VAR   ZCALL_FUNCTION_VAR_KW   STORE_ANNOTATION      name)Zis_typeSETUP_ASYNC_WITH      FORMAT_VALUE   BUILD_CONST_KEY_MAP   CALL_FUNCTION_EXSETUP_ANNOTATIONSU   BUILD_STRING   BUILD_TUPLE_UNPACK_WITH_CALL   z'default keyword-only annotation closurec             C   sL   | dkrdS d}x6t D ].}| d@ }|r<|r8|d| 7 }n|}| dL } qW |S )Nr   z>Neither defaults, keyword-only args, annotations, nor closures r   z, )MAKE_FUNCTION_FLAGS)flagsZpattrflagbit r'   S/home/psgendb/BIRCHDEV/python/lib/python3.6/site-packages/xdis/opcodes/opcode_36.pyformat_MAKE_FUNCTION_argi   s    
r)   c             C   sT   | d@ dkrdS | d@ dkr dS | d@ dkr0dS | d@ dkr@dS | d	@ d	krPdS d S )
N   r   r"   r   z!sr   z!rz!a   r'   )r$   r'   r'   r(   format_value_flagsy   s    r,   c             C   s   t | d S )Nr   r      )str)argr'   r'   r(   format_extended_arg36   s    r0   c             C   s   | dkrd}nd}d| |f S )z1argc indicates the number of positional argumentsr   r"   sz%d positional argument%sr'   )argcpluralr'   r'   r(   format_CALL_FUNCTION   s    r4   c             C   s   d}| d@ rd}nd}|S )Nr"   r   z keyword and positional argumentszpositional arguments onlyr'   )r$   r.   r'   r'   r(   format_CALL_FUNCTION_EX   s
    r5   c             C   s   d|  S )Nz$%d total positional and keyword argsr'   )r2   r'   r'   r(   format_CALL_FUNCTION_KW   s    r6   c             C   s   d|  S )zThe lowest byte of oparg is the count of mappings, the relative
    position of the corresponding callable f is encoded in the second byte
    of oparg.z%d mappingsr'   )countr'   r'   r(   !format_BUILD_MAP_UNPACK_WITH_CALL   s    r8   )BUILD_MAP_UNPACK_WITH_CALLCALL_FUNCTIONCALL_FUNCTION_KWr   MAKE_FUNCTIONr   EXTENDED_ARGr>   r>   )__doc__Zxdis.opcodes.baser   r   r   r   r   r   r   r	   r
   Zxdis.opcodes.opcode_35ZopcodesZ	opcode_35ZEXTENDED_ARG_SHIFTversionpython_implementationlocalsltuplesplitr#   r)   r,   r0   r4   r5   r6   r8   Zopcode_arg_fmtglobalsr'   r'   r'   r(   <module>   sF   ,/