
jWc           @   s  d  Z  d d l Z d d l Z d d l Z d d l m Z d d l m Z m Z m	 Z	 m
 Z
 d f  d     YZ d   Z d f  d	     YZ d
 Z d Z d Z d Z d e f d     YZ d   Z d f  d     YZ d   Z d   Z d f  d     YZ d f  d     YZ e   j Z d S(   s/   A flow graph representation for Python bytecodeiN(   t   misc(   t   CO_OPTIMIZEDt   CO_NEWLOCALSt
   CO_VARARGSt   CO_VARKEYWORDSt	   FlowGraphc           B   s}   e  Z d    Z d   Z d d  Z d   Z d   Z d Z d   Z	 d   Z
 d   Z d	   Z d
   Z d   Z d   Z RS(   c         C   s[   t    |  _ |  _ t  d  |  _ t j   |  _ |  j j |  j  |  j j |  j  d  S(   Nt   exit(   t   Blockt   currentt   entryR   R    t   Sett   blockst   add(   t   self(    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyt   __init__   s
    c         C   sr   |  j  re |  j rW d Gt |  j  GHd G|  j j GHd G|  j j GHd G|  j j   GHn  t |  GHn  | |  _ d  S(   Nt   ends       nexts       prevs      (   t   _debugR   t   reprt   nextt   prevt   get_children(   R   t   block(    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyt
   startBlock   s    		c         C   s<   | d  k r |  j   } n  |  j j |  |  j |  d  S(   N(   t   Nonet   newBlockR   t   addNextR   (   R   R   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyt	   nextBlock   s    c         C   s   t    } |  j j |  | S(   N(   R   R   R   (   R   t   b(    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyR   5   s    	c         C   s   |  j  |  j  d  S(   N(   R   R   (   R   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyt   startExitBlock:   s    i    c         C   s   d |  _  d  S(   Ni   (   R   (   R   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyt   _enable_debug?   s    c         C   s   d |  _  d  S(   Ni    (   R   (   R   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyt   _disable_debugB   s    c         G   se   |  j  r d G| GHn  t |  d k rQ t | d t  rQ |  j j | d  n  |  j j |  d  S(   Ns   	i   i   (   R   t   lent
   isinstanceR   R   t
   addOutEdget   emit(   R   t   inst(    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyR"   E   s
    	%c         C   s   t  |  j |  j  } | S(   sl   Return the blocks in reverse postorder

        i.e. each node appears before all of its successors
        (   t   order_blocksR	   R   (   R   t   order(    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyt   getBlocksInOrderL   s    c         C   s   |  j  j   S(   N(   R   t   elements(   R   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyt	   getBlocksT   s    c         C   s   |  j  S(   s/   Return nodes appropriate for use with dominator(   R	   (   R   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyt   getRootW   s    c         C   s4   g  } x' |  j    D] } | j | j    q W| S(   N(   R(   t   extendt   getContainedGraphs(   R   t   lR   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyR+   [   s    N(   t   __name__t
   __module__R   R   R   R   R   R   R   R   R   R"   R&   R(   R)   R+   (    (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyR      s   		
								c            s  g  } t      |  g } xh | r | j   } |   k r? q n    j |  x0 | j   D]" } |   k rY | j |  qY qY Wq Wi   x   D] } t r | j r n   j | t     xc | j   D]U } xL  j | t     j |  | j	 r| j	 d | k	 r| j	 d } q Pq q Wq W   f d   } |  } xu | j |    j
 |  | j rv| j d } q@n) | | k	 r| j   r| j |  n    sPn  |   } q@| S(   s8   Order blocks so that they are emitted in the right orderi    c             s>   x7  D]/ }  x&   |  D] } |  k r Pq q W|  Sq Wd  S(   N(    (   R   t   c(   t
   dominatorst	   remaining(    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyt	   find_next   s    (   t   sett   popR   R   t   appendt	   __debug__R   t
   setdefaultt   get_followersR   t   discardt   has_unconditional_transfer(   t   start_blockt
   exit_blockR%   t   todoR   R/   R2   (    (   R1   R0   sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyR$   b   sH    			
	R   c           B   sz   e  Z d  Z d d  Z d   Z d   Z d   Z d   Z d   Z d   Z	 d Z
 d   Z d   Z d   Z d   Z RS(   i    t    c         C   sP   g  |  _  t   |  _ | |  _ t j |  _ g  |  _ g  |  _ t j d t _ d  S(   Ni   (	   t   instsR3   t   outEdgest   labelR   t   _countt   bidR   R   (   R   RA   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyR      s    				c         C   s,   |  j  r d |  j  |  j f Sd |  j Sd  S(   Ns   <block %s id=%d>s   <block id=%d>(   RA   RC   (   R   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyt   __repr__   s    	c         C   s2   t  t |  j  } d |  j |  j d j |  f S(   Ns   <block %s %d:
%s>s   
(   t   mapt   strR?   RA   RC   t   join(   R   R?   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyt   __str__   s    c         C   s   | d } |  j  j |  d  S(   Ni    (   R?   R5   (   R   R#   t   op(    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyR"      s    
c         C   s   |  j  S(   N(   R?   (   R   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyt   getInstructions   s    c         C   s   |  j  j |  d  S(   N(   R@   R   (   R   R   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyR!      s    c         C   s$   |  j  j |  | j j |   d  S(   N(   R   R5   R   (   R   R   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyR      s    t   RETURN_VALUEt   RAISE_VARARGSt   JUMP_ABSOLUTEt   JUMP_FORWARDt   CONTINUE_LOOPc         C   s?   y |  j  d \ } } Wn t t f k
 r1 d SX| |  j k S(   s   Returns True if there is an unconditional transfer to an other block
        at the end of this block. This means there is no risk for the bytecode
        executer to go past this block's bytecode.iN(   R?   t
   IndexErrort
   ValueErrort   _uncond_transfer(   R   RI   t   arg(    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyR:      s
    c         C   s   t  |  j  |  j S(   N(   t   listR@   R   (   R   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyR      s    c         C   sN   t  |  j  } x8 |  j D]- } | d t j k r | j | d  q q W| S(   s:   Get the whole list of followers, including the next block.i    i   (   R3   R   R?   t   PyFlowGrapht   hasjrelR   (   R   t	   followersR#   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyR8      s
    c         C   sb   g  } xU |  j  D]J } t |  d k r. q n  | d } t | d  r | j | j  q q W| S(   s   Return all graphs contained within this block.

        For example, a MAKE_FUNCTION block will contain a reference to
        the graph for the function body.
        i   t   graph(   R?   R   t   hasattrR5   RX   (   R   t	   containedR#   RI   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyR+      s    
(   RK   RL   RM   RN   RO   (   R-   R.   RB   R   RD   RH   R"   RJ   R!   R   RR   R:   R   R8   R+   (    (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyR      s   							 	
		
t   RAWt   FLATt   CONVt   DONERU   c           B   sA  e  Z e j Z d d  d d  Z d   Z d   Z d   Z d   Z	 d   Z
 d   Z d d  Z d	   Z d
   Z e   Z x% e j D] Z e j e j e  q We   Z x% e j D] Z e j e j e  q Wd   Z d   Z d   Z i  Z d   Z d   Z e Z e Z d   Z d   Z e Z  e Z! e Z" e Z# e Z$ e Z% e Z& e Z' e Z( e Z) d   Z* e* Z+ e* Z, d   Z- e. e j/  Z0 d   Z1 xD e2   j3   D]3 \ Z4 Z5 e4 d  d k re4 d Z e5 e e <qqW[4 [5 [ d   Z6 i  Z7 x. e8 e9 e j   D] Z: e: e7 e j e: <qW[: d   Z; d   Z< RS(   i    c         C   s  |  j    | |  _ | |  _ d  |  _ | |  _ t |  |  _ | |  _ | r\ t	 t
 B|  _ n	 d |  _ g  |  _ g  |  _ g  |  _ g  |  _ g  |  _ t |  p g  |  _ xO t t |  j   D]8 } |  j | } t | t  r | j   |  j | <q q Wt |  _ d  S(   Ni    (   t
   super_initt   namet   filenameR   t	   docstringt   argst   getArgCountt   argcountt   klassR   R   t   flagst   constst   namest   freevarst   cellvarst   closureRT   t   varnamest   rangeR   R    t   TupleArgt   getNameR[   t   stage(   R   R`   Ra   Rc   t	   optimizedRf   t   it   var(    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyR     s*    
											c         C   s   | |  _  d  S(   N(   Rb   (   R   t   doc(    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyt   setDocstring  s    c         C   s3   |  j  | B|  _  | t k r/ |  j d |  _ n  d  S(   Ni   (   Rg   R   Re   (   R   t   flag(    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyt   setFlag"  s    c         C   s   |  j  | @r d Sd  S(   Ni   (   Rg   (   R   Rw   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyt	   checkFlag'  s    c         C   s   t  |  |  _ d  S(   N(   RT   Rj   (   R   Ri   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyt   setFreeVars+  s    c         C   s   | |  _  d  S(   N(   Rk   (   R   Ri   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyt   setCellVars.  s    c         C   s2   |  j    |  j   |  j   |  j   |  j   S(   s   Get a Python code object(   t   computeStackDeptht   flattenGrapht   convertArgst   makeByteCodet   newCodeObject(   R   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyt   getCode1  s
    



c         C   s   | r t  j } | t  _ n  d } x~ |  j D]s } | d } | d k rK Hn  t |  d k r{ d Gd | G| GH| d } q+ d Gd | G| G| d GH| d } q+ W| r | t  _ n  d  S(   Ni    t
   SET_LINENOi   s   	s   %3di   (   t   syst   stdoutR?   R   (   R   t   iot   savet   pct   tt   opname(    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyt   dump=  s    	
c            sp   i   d } x*   j   D] } t | j     | <q Wi        f d       j d    _ d S(   s   Compute the max stack depth.

        Approach is to compute the stack effect of each basic block.
        Then find the path through the code with the largest total
        effect.
        c            s   |   k r | Sd  |  <|  |  } |  j    } | r` t g  | D] }  | |  ^ qD  S|  j d k s    j |  S| Sd  S(   Ni   R   (   R   t   maxRA   R   (   R   t   dt   childrenR/   (   R   t	   max_deptht   deptht   seen(    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyR   ]  s    
&i    N(   R   R(   t	   findDepthRJ   R	   t	   stacksize(   R   R   R   (    (   R   R   R   R   sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyR|   O  s    c         C   s  g  |  _  } d } i  } i  } x |  j   D]z } | | | <x] | j   D]O } | j |  t |  d k r{ | d } qI | d d k rI | d } qI qI W| | | <q, Wd } x t t |   D] } | | } t |  d k r | d } n | d d k r| d } n  | d } | |  j k rS| d }	 | |	 | }
 | |
 f | | <q | |  j k r | | | d f | | <q q Wt |  _	 d S(   s-   Arrange the blocks in order and resolve jumpsi    i   R   i   N(
   R?   R&   RJ   R5   R   Rn   RV   t   hasjabsR\   Rq   (   R   R?   R   t   beginR   R   R#   Rs   R   t   opargt   offset(    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyR}   m  s8    



c         C   s   |  j  j d |  j  |  j   x t t |  j   D]n } |  j | } t |  d k r6 | \ } } |  j j | d  } | r | | |  |  f |  j | <q q6 q6 Wt
 |  _ d S(   s0   Convert arguments from symbolic to concrete formi    i   N(   Rh   t   insertRb   t   sort_cellvarsRn   R   R?   t   _converterst   getR   R]   Rq   (   R   Rs   R   R   R   t   conv(    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyR~     s    
&c         C   s   i  } x |  j  D] } d | | <q Wg  |  j D] } | | k r. | ^ q. |  _  x |  j  D] } | | =qY W|  j  | j   |  _  |  j  |  j |  _ d S(   sH   Sort cellvars in the order of varnames and prune from freevars.
        i   N(   Rk   Rm   t   keysRj   Rl   (   R   t   cellsR`   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyR     s    c         C   sp   t  |  } xD t t |   D]0 } | t  | |  k r | | | k r | Sq Wt |  } | j |  | S(   s  Return index of name in list, appending if necessary

        This routine uses a list instead of a dictionary, because a
        dictionary can't store two different keys if the keys have the
        same value but different types, e.g. 2 and 2L.  The compiler
        must treat these two separately, so it does an explicit type
        comparison before comparing the values.
        (   t   typeRn   R   R5   (   R   R`   RT   R   Rs   R   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyt   _lookupName  s    	&c         C   s1   t  | d  r | j   } n  |  j | |  j  S(   NR   (   RY   R   R   Rh   (   R   RS   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyt   _convert_LOAD_CONST  s    c         C   s&   |  j  | |  j  |  j  | |  j  S(   N(   R   Ri   Rm   (   R   RS   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyt   _convert_LOAD_FAST  s    c         C   s8   |  j  d  k r% |  j | |  j  n  |  j | |  j  S(   N(   Rf   R   R   Rm   Ri   (   R   RS   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyt   _convert_LOAD_NAME  s    c         C   s8   |  j  d  k r% |  j | |  j  n  |  j | |  j  S(   N(   Rf   R   R   Rm   Ri   (   R   RS   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyt   _convert_NAME  s    c         C   s9   |  j  | |  j  |  j  | |  j  |  j  | |  j  S(   N(   R   Ri   Rm   Rl   (   R   RS   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyt   _convert_DEREF  s    c         C   s&   |  j  | |  j  |  j  | |  j  S(   N(   R   Rm   Rl   (   R   RS   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyt   _convert_LOAD_CLOSURE  s    c         C   s   |  j  j |  S(   N(   t   _cmpt   index(   R   RS   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyt   _convert_COMPARE_OP  s    i	   t	   _convert_c         C   s   t    |  _ } x |  j D] } | d } t |  d k rS | j |  j |  q | d } | d k r| | j |  q n  t |  \ } } y | j |  j | | |  Wq t k
 r | G| GH|  j | G| G| GH  q Xq Wt	 |  _
 d  S(   Ni    i   R   (   t   LineAddrTablet   lnotabR?   R   t   addCodet   opnumt   nextLinet   twobyteRQ   R^   Rq   (   R   R   R   R   R   t   hit   lo(    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyR     s"    

	c         C   s   |  j  t @d k r d } n t |  j  } |  j } |  j  t @rN | d } n  t j | | |  j |  j  |  j	 j
   |  j   t |  j  t |  j  |  j |  j |  j	 j |  j	 j   t |  j  t |  j   S(   Ni    i   (   Rg   R   R   Rm   Re   R   t   typest   CodeTypeR   R   R   t	   getConstst   tupleRi   Ra   R`   t	   firstlinet   getTableRj   Rk   (   R   t   nlocalsRe   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyR     s    		c         C   sO   g  } x< |  j  D]1 } t | t  r4 | j   } n  | j |  q Wt |  S(   s   Return a tuple for the const slot of the code object

        Must convert references to code (MAKE_FUNCTION) to code
        objects recursively.
        (   Rh   R    RU   R   R5   R   (   R   R,   t   elt(    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyR   "  s    (    N(=   R-   R.   R   R   R_   R   Rv   Rx   Ry   Rz   R{   R   R   R|   R}   R3   RV   t   disRs   R   R   R   R~   R   R   R   R   R   t   _convert_STORE_FASTt   _convert_DELETE_FASTR   R   t   _convert_STORE_NAMEt   _convert_DELETE_NAMEt   _convert_IMPORT_NAMEt   _convert_IMPORT_FROMt   _convert_STORE_ATTRt   _convert_LOAD_ATTRt   _convert_DELETE_ATTRt   _convert_LOAD_GLOBALt   _convert_STORE_GLOBALt   _convert_DELETE_GLOBALR   t   _convert_LOAD_DEREFt   _convert_STORE_DEREFR   RT   t   cmp_opR   R   t   localst   itemsR`   t   objR   R   Rn   R   t   numR   R   (    (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyRU      sn   									!												
			c         C   s   |  d  d k r d Sd  S(   Ni   t   JUMPi   (    (   R   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyt   isJump/  s    Ro   c           B   s)   e  Z d  Z d   Z d   Z d   Z RS(   s:   Helper for marking func defs with nested tuples in arglistc         C   s   | |  _  | |  _ d  S(   N(   t   countRi   (   R   R   Ri   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyR   5  s    	c         C   s   d |  j  |  j f S(   Ns   TupleArg(%s, %s)(   R   Ri   (   R   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyRD   8  s    c         C   s   d |  j  S(   Ns   .%d(   R   (   R   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyRp   :  s    (   R-   R.   t   __doc__R   RD   Rp   (    (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyRo   3  s   		c         C   s^   t  |   } |  rZ xE |  D]: } t | t  r t  t j | j   } | | } q q Wn  | S(   N(   R   R    Ro   R    t   flattenRi   (   Rc   Re   RS   t   numNames(    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyRd   =  s    c         C   s   t  |  d  S(   s/   Convert an int argument into high and low bytesi   (   t   divmod(   t   val(    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyR   F  s    R   c           B   s;   e  Z d  Z d   Z d   Z d   Z d   Z d   Z RS(   s(  lnotab

    This class builds the lnotab, which is documented in compile.c.
    Here's a brief recap:

    For each SET_LINENO instruction after the first one, two bytes are
    added to lnotab.  (In some cases, multiple two-byte entries are
    added.)  The first byte is the distance in bytes between the
    instruction for the last SET_LINENO and the current SET_LINENO.
    The second byte is offset in line numbers.  If either offset is
    greater than 255, multiple two-byte entries are added -- see
    compile.c for the delicate details.
    c         C   s:   g  |  _  d |  _ d |  _ d |  _ d |  _ g  |  _ d  S(   Ni    (   t   codet
   codeOffsetR   t   lastlinet   lastoffR   (   R   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyR   Z  s    					c         G   sA   x$ | D] } |  j  j t |   q W|  j t |  |  _ d  S(   N(   R   R5   t   chrR   R   (   R   Rc   RS   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyR   b  s    c         C   s  |  j  d k r$ | |  _  | |  _ n |  j |  j } | |  j } | d k r|  j j } x. | d k r | d  | d  | d 8} q\ Wx4 | d k r | |  | d  | d 8} d } q W| d k s | d k r | |  | |  n  | |  _ |  j |  _ n  d  S(   Ni    i   (   R   R   R   R   R   R5   (   R   t   linenot   addrt   linet   push(    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyR   g  s*    	
 

 



 	c         C   s   d j  |  j  S(   NR>   (   RG   R   (   R   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyR     s    c         C   s   d j  t t |  j   S(   NR>   (   RG   RE   R   R   (   R   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyR     s    (   R-   R.   R   R   R   R   R   R   (    (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyR   K  s   			 	t   StackDepthTrackerc           B   s  e  Z d  d  Z i& d d 6d d 6d d 6d d 6d d	 6d d
 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d  6d d! 6d d" 6d d# 6d d$ 6d d% 6d d& 6d  d' 6d( d) 6d( d* 6d d+ 6d d, 6Z d; d< g Z d/   Z d0   Z d1   Z d2   Z d3   Z	 d4   Z
 d5   Z d6   Z d7   Z d8   Z d9   Z d:   Z RS(=   i    c         C   s  d } d } x| D] } | d } | r0 | Gn  |  j  j | d   } | d  k	 r^ | | } n xA |  j D]6 \ } }	 | t |   | k rh |	 } | | } Pqh qh W| d  k r t |  | d   }
 |
 d  k	 r | |
 | d  } q n  | | k r | } n  | r | G| GHq q W| S(   Ni    i   (   t   effectR   R   t   patternsR   t   getattr(   R   R?   t   debugR   t   maxDepthRs   R   t   deltat   patt	   pat_deltat   meth(    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyR     s.    

	it   POP_TOPi   t   DUP_TOPt   LIST_APPENDt   SET_ADDit   MAP_ADDs   SLICE+1s   SLICE+2s   SLICE+3s   STORE_SLICE+0s   STORE_SLICE+1s   STORE_SLICE+2is   STORE_SLICE+3s   DELETE_SLICE+0s   DELETE_SLICE+1s   DELETE_SLICE+2s   DELETE_SLICE+3t   STORE_SUBSCRt   DELETE_SUBSCRt
   PRINT_ITEMRK   t   YIELD_VALUEt	   EXEC_STMTt   BUILD_CLASSt
   STORE_NAMEt
   STORE_ATTRt   DELETE_ATTRt   STORE_GLOBALt	   BUILD_MAPt
   COMPARE_OPt
   STORE_FASTt   IMPORT_STARt   IMPORT_NAMEt   IMPORT_FROMt	   LOAD_ATTRi   t   SETUP_EXCEPTt   SETUP_FINALLYt   FOR_ITERt   WITH_CLEANUPt   BINARY_t   LOAD_c         C   s   | d S(   Ni   (    (   R   R   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyt   UNPACK_SEQUENCE  s    c         C   s	   | d S(   Ni   (    (   R   R   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyt   BUILD_TUPLE  s    c         C   s	   | d S(   Ni   (    (   R   R   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyt
   BUILD_LIST  s    c         C   s	   | d S(   Ni   (    (   R   R   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyt	   BUILD_SET  s    c         C   s"   t  | d  \ } } | | d S(   Ni   i   (   R   (   R   t   argcR   R   (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyt   CALL_FUNCTION  s    c         C   s   |  j  |  d S(   Ni   (   R
  (   R   R	  (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyt   CALL_FUNCTION_VAR  s    c         C   s   |  j  |  d S(   Ni   (   R
  (   R   R	  (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyt   CALL_FUNCTION_KW  s    c         C   s   |  j  |  d S(   Ni   (   R
  (   R   R	  (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyt   CALL_FUNCTION_VAR_KW  s    c         C   s   | S(   N(    (   R   R	  (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyt   MAKE_FUNCTION  s    c         C   s   | S(   N(    (   R   R	  (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyt   MAKE_CLOSURE  s    c         C   s$   | d k r d S| d k r  d Sd  S(   Ni   ii   i(    (   R   R	  (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyt   BUILD_SLICE  s    c         C   s   | S(   N(    (   R   R	  (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyt   DUP_TOPX  s    (   R  i(   R  i   (   R-   R.   R   R   R   R  R  R  R  R
  R  R  R  R  R  R  R  (    (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyR     sl   
												(   R   R   R   R   t   compilerR    t   compiler.constsR   R   R   R   R   R$   R   R[   R\   R]   R^   RU   R   Ro   Rd   R   R   R   R   (    (    (    sB   /home/wilkie/.pyenv/versions/2.7/lib/python2.7/compiler/pyassem.pyt   <module>   s*   "W	CT 2	
			Bn