ó
è¾bc           @   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 bytecodeiÿÿÿÿN(   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(    (    s&   /usr/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(    (    s&   /usr/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   (    (    s&   /usr/lib/python2.7/compiler/pyassem.pyt	   nextBlock   s    c         C   s   t  ƒ  } |  j j | ƒ | S(   N(   R   R   R   (   R   t   b(    (    s&   /usr/lib/python2.7/compiler/pyassem.pyR   5   s    	c         C   s   |  j  |  j ƒ d  S(   N(   R   R   (   R   (    (    s&   /usr/lib/python2.7/compiler/pyassem.pyt   startExitBlock:   s    i    c         C   s   d |  _  d  S(   Ni   (   R   (   R   (    (    s&   /usr/lib/python2.7/compiler/pyassem.pyt   _enable_debug?   s    c         C   s   d |  _  d  S(   Ni    (   R   (   R   (    (    s&   /usr/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(    (    s&   /usr/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(    (    s&   /usr/lib/python2.7/compiler/pyassem.pyt   getBlocksInOrderL   s    c         C   s   |  j  j ƒ  S(   N(   R   t   elements(   R   (    (    s&   /usr/lib/python2.7/compiler/pyassem.pyt	   getBlocksT   s    c         C   s   |  j  S(   s/   Return nodes appropriate for use with dominator(   R	   (   R   (    (    s&   /usr/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   (    (    s&   /usr/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+   (    (    (    s&   /usr/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× | | j d j d k s× t | | j f ƒ ‚ n  ˆ  j	 | t  ƒ  ƒ xd | j
 ƒ  D]V } xM ˆ  j	 | t  ƒ  ƒ j | ƒ | j rH| j d | k	 rH| j d } q Pq Wq÷ Wq W‡  ‡ f d †  } |  } xv | j | ƒ ˆ j | ƒ | j r¦| j d } qpn) | | k	 rÏ| j ƒ  rÏ| j | ƒ n  ˆ sÙPn  | ƒ  } qpW| S(   s8   Order blocks so that they are emitted in the right orderi    c             sP   x7 ˆ D]/ }  x& ˆ  |  D] } | ˆ k r Pq q W|  Sq Wd sL t  d ƒ ‚ d  S(   Ni    s+   circular dependency, cannot find next block(   t   AssertionError(   R   t   c(   t
   dominatorst	   remaining(    s&   /usr/lib/python2.7/compiler/pyassem.pyt	   find_nextŒ   s    (   t   sett   popR   R   t   appendt	   __debug__R   R   R/   t
   setdefaultt   get_followerst   discardt   has_unconditional_transfer(   t   start_blockt
   exit_blockR%   t   todoR   R0   R3   (    (   R1   R2   s&   /usr/lib/python2.7/compiler/pyassem.pyR$   b   sH    			2
	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   instsR4   t   outEdgest   labelR   t   _countt   bidR   R   (   R   RB   (    (    s&   /usr/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>(   RB   RD   (   R   (    (    s&   /usr/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@   RB   RD   t   join(   R   R@   (    (    s&   /usr/lib/python2.7/compiler/pyassem.pyt   __str__·   s    c         C   s   | d } |  j  j | ƒ d  S(   Ni    (   R@   R6   (   R   R#   t   op(    (    s&   /usr/lib/python2.7/compiler/pyassem.pyR"   ¼   s    
c         C   s   |  j  S(   N(   R@   (   R   (    (    s&   /usr/lib/python2.7/compiler/pyassem.pyt   getInstructionsÀ   s    c         C   s   |  j  j | ƒ d  S(   N(   RA   R   (   R   R   (    (    s&   /usr/lib/python2.7/compiler/pyassem.pyR!   Ã   s    c         C   s~   |  j  j | ƒ t |  j  ƒ d k s= t t t |  j  ƒ ƒ ‚ | j j |  ƒ t | j ƒ d k sz t t t | j ƒ ƒ ‚ d  S(   Ni   (   R   R6   R   R/   RF   RG   R   (   R   R   (    (    s&   /usr/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.iÿÿÿÿN(   R@   t
   IndexErrort
   ValueErrort   _uncond_transfer(   R   RJ   t   arg(    (    s&   /usr/lib/python2.7/compiler/pyassem.pyR;   Ð   s
    c         C   s   t  |  j ƒ |  j S(   N(   t   listRA   R   (   R   (    (    s&   /usr/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   (   R4   R   R@   t   PyFlowGrapht   hasjrelR   (   R   t	   followersR#   (    (    s&   /usr/lib/python2.7/compiler/pyassem.pyR9   Ý   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   hasattrR6   RY   (   R   t	   containedR#   RJ   (    (    s&   /usr/lib/python2.7/compiler/pyassem.pyR+   ç   s    
(   RL   RM   RN   RO   RP   (   R-   R.   RC   R   RE   RI   R"   RK   R!   R   RS   R;   R   R9   R+   (    (    (    s&   /usr/lib/python2.7/compiler/pyassem.pyR   ¥   s   							 	
		
t   RAWt   FLATt   CONVt   DONERV   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   closureRU   t   varnamest   rangeR   R    t   TupleArgt   getNameR\   t   stage(   R   Ra   Rb   Rd   t	   optimizedRg   t   it   var(    (    s&   /usr/lib/python2.7/compiler/pyassem.pyR     s*    
											c         C   s   | |  _  d  S(   N(   Rc   (   R   t   doc(    (    s&   /usr/lib/python2.7/compiler/pyassem.pyt   setDocstring  s    c         C   s3   |  j  | B|  _  | t k r/ |  j d |  _ n  d  S(   Ni   (   Rh   R   Rf   (   R   t   flag(    (    s&   /usr/lib/python2.7/compiler/pyassem.pyt   setFlag"  s    c         C   s   |  j  | @r d Sd  S(   Ni   (   Rh   (   R   Rx   (    (    s&   /usr/lib/python2.7/compiler/pyassem.pyt	   checkFlag'  s    c         C   s   t  | ƒ |  _ d  S(   N(   RU   Rk   (   R   Rj   (    (    s&   /usr/lib/python2.7/compiler/pyassem.pyt   setFreeVars+  s    c         C   s   | |  _  d  S(   N(   Rl   (   R   Rj   (    (    s&   /usr/lib/python2.7/compiler/pyassem.pyt   setCellVars.  s    c         C   s†   |  j  t k s t ‚ |  j ƒ  |  j ƒ  |  j  t k s> t ‚ |  j ƒ  |  j  t k s] t ‚ |  j ƒ  |  j  t	 k s| t ‚ |  j
 ƒ  S(   s   Get a Python code object(   Rr   R\   R/   t   computeStackDeptht   flattenGraphR]   t   convertArgsR^   t   makeByteCodeR_   t   newCodeObject(   R   (    (    s&   /usr/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(    (    s&   /usr/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   maxRB   R   (   R   t   dt   childrenR0   (   t   deptht	   max_deptht   seenR   (    s&   /usr/lib/python2.7/compiler/pyassem.pyR   ]  s    
&i    N(   R   R(   t	   findDepthRK   R	   t	   stacksize(   R   R   R   (    (   R   R   R‘   R   s&   /usr/lib/python2.7/compiler/pyassem.pyR}   O  s    c         C   s£  |  j  t k s t ‚ g  |  _ } d } i  } i  } xˆ |  j ƒ  D]z } | | | <x] | j ƒ  D]O } | j | ƒ t | ƒ d k r | d } q^ | d d k r^ | d } q^ q^ W| | | <qA Wd } xÎ t t | ƒ ƒ D]º } | | } t | ƒ d k r| d } n | d d k r$| d } n  | d } | |  j	 k rh| 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(   Rr   R\   R/   R@   R&   RK   R6   R   Ro   RW   t   hasjabsR]   (   R   R@   Rˆ   t   beginR   R   R#   Rt   RŠ   t   opargt   offset(    (    s&   /usr/lib/python2.7/compiler/pyassem.pyR~   m  s:    



c         C   sÊ   |  j  t k s t ‚ |  j j d |  j ƒ |  j ƒ  x… t t |  j	 ƒ ƒ D]n } |  j	 | } t | ƒ d k rK | \ } } |  j
 j | d ƒ } | r¹ | | |  | ƒ f |  j	 | <q¹ qK qK Wt |  _  d S(   s0   Convert arguments from symbolic to concrete formi    i   N(   Rr   R]   R/   Ri   t   insertRc   t   sort_cellvarsRo   R   R@   t   _converterst   getR   R^   (   R   Rt   R‰   RŠ   R–   t   conv(    (    s&   /usr/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(   Rl   Rn   t   keysRk   Rm   (   R   t   cellsRa   (    (    s&   /usr/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   typeRo   R   R6   (   R   Ra   RU   R‰   Rt   R   (    (    s&   /usr/lib/python2.7/compiler/pyassem.pyt   _lookupName°  s    	&c         C   s1   t  | d ƒ r | j ƒ  } n  |  j | |  j ƒ S(   NR‚   (   RZ   R‚   R    Ri   (   R   RT   (    (    s&   /usr/lib/python2.7/compiler/pyassem.pyt   _convert_LOAD_CONSTÂ  s    c         C   s&   |  j  | |  j ƒ |  j  | |  j ƒ S(   N(   R    Rj   Rn   (   R   RT   (    (    s&   /usr/lib/python2.7/compiler/pyassem.pyt   _convert_LOAD_FASTÇ  s    c         C   s8   |  j  d  k r% |  j | |  j ƒ n  |  j | |  j ƒ S(   N(   Rg   R   R    Rn   Rj   (   R   RT   (    (    s&   /usr/lib/python2.7/compiler/pyassem.pyt   _convert_LOAD_NAMEÍ  s    c         C   s8   |  j  d  k r% |  j | |  j ƒ n  |  j | |  j ƒ S(   N(   Rg   R   R    Rn   Rj   (   R   RT   (    (    s&   /usr/lib/python2.7/compiler/pyassem.pyt   _convert_NAMEÒ  s    c         C   s9   |  j  | |  j ƒ |  j  | |  j ƒ |  j  | |  j ƒ S(   N(   R    Rj   Rn   Rm   (   R   RT   (    (    s&   /usr/lib/python2.7/compiler/pyassem.pyt   _convert_DEREFá  s    c         C   s&   |  j  | |  j ƒ |  j  | |  j ƒ S(   N(   R    Rn   Rm   (   R   RT   (    (    s&   /usr/lib/python2.7/compiler/pyassem.pyt   _convert_LOAD_CLOSUREè  s    c         C   s   |  j  j | ƒ S(   N(   t   _cmpt   index(   R   RT   (    (    s&   /usr/lib/python2.7/compiler/pyassem.pyt   _convert_COMPARE_OPí  s    i	   t	   _convert_c         C   s  |  j  t k s t ‚ t ƒ  |  _ } xÑ |  j D]Æ } | d } t | ƒ d k rh | 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ƒ   (   Rr   R^   R/   t   LineAddrTablet   lnotabR@   R   t   addCodet   opnumt   nextLinet   twobyteRR   R_   (   R   R¬   R‰   RŠ   R–   t   hit   lo(    (    s&   /usr/lib/python2.7/compiler/pyassem.pyR€   ø  s$    

	c         C   så   |  j  t k s t ‚ |  j t @d k r1 d } n t |  j ƒ } |  j } |  j t @rc | 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   (   Rr   R_   R/   Rh   R   R   Rn   Rf   R   t   typest   CodeTypeR“   R¬   R‚   t	   getConstst   tupleRj   Rb   Ra   t	   firstlinet   getTableRk   Rl   (   R   t   nlocalsRf   (    (    s&   /usr/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.
        (   Ri   R    RV   R‚   R6   R¶   (   R   R,   t   elt(    (    s&   /usr/lib/python2.7/compiler/pyassem.pyRµ   "  s    (    N(=   R-   R.   R   R   R`   R   Rw   Ry   Rz   R{   R|   R‚   R‹   R}   R~   R4   RW   t   disRt   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¦   RU   t   cmp_opR§   R©   t   localst   itemsRa   t   objR€   R®   Ro   R   t   numR   Rµ   (    (    (    s&   /usr/lib/python2.7/compiler/pyassem.pyRV   þ   sn   									!												
			c         C   s   |  d  d k r d Sd  S(   Ni   t   JUMPi   (    (   RŠ   (    (    s&   /usr/lib/python2.7/compiler/pyassem.pyt   isJump/  s    Rp   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   countRj   (   R   RÑ   Rj   (    (    s&   /usr/lib/python2.7/compiler/pyassem.pyR   5  s    	c         C   s   d |  j  |  j f S(   Ns   TupleArg(%s, %s)(   RÑ   Rj   (   R   (    (    s&   /usr/lib/python2.7/compiler/pyassem.pyRE   8  s    c         C   s   d |  j  S(   Ns   .%d(   RÑ   (   R   (    (    s&   /usr/lib/python2.7/compiler/pyassem.pyRq   :  s    (   R-   R.   t   __doc__R   RE   Rq   (    (    (    s&   /usr/lib/python2.7/compiler/pyassem.pyRp   3  s   		c         C   s^   t  |  ƒ } |  rZ xE |  D]: } t | t ƒ r t  t j | j ƒ ƒ } | | } q q Wn  | S(   N(   R   R    Rp   R    t   flattenRj   (   Rd   Rf   RT   t   numNames(    (    s&   /usr/lib/python2.7/compiler/pyassem.pyRe   =  s    c         C   s(   t  |  t t f ƒ s t ‚ t |  d ƒ S(   s/   Convert an int argument into high and low bytesi   (   R    t   intt   longR/   t   divmod(   t   val(    (    s&   /usr/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   (    (    s&   /usr/lib/python2.7/compiler/pyassem.pyR   Z  s    					c         G   sA   x$ | D] } |  j  j t | ƒ ƒ q W|  j t | ƒ |  _ d  S(   N(   RÙ   R6   t   chrRÚ   R   (   R   Rd   RT   (    (    s&   /usr/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¬   R6   (   R   t   linenot   addrt   linet   push(    (    s&   /usr/lib/python2.7/compiler/pyassem.pyR¯   g  s*    	
 

 



 	c         C   s   d j  |  j ƒ S(   NR?   (   RH   RÙ   (   R   (    (    s&   /usr/lib/python2.7/compiler/pyassem.pyR‚   ‡  s    c         C   s   d j  t t |  j ƒ ƒ S(   NR?   (   RH   RF   RÝ   R¬   (   R   (    (    s&   /usr/lib/python2.7/compiler/pyassem.pyR¸   Š  s    (   R-   R.   RÒ   R   R­   R¯   R‚   R¸   (    (    (    s&   /usr/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   maxDepthRt   RŠ   t   deltat   patt	   pat_deltat   meth(    (    s&   /usr/lib/python2.7/compiler/pyassem.pyR’   ‘  s.    

	iÿÿÿÿt   POP_TOPi   t   DUP_TOPt   LIST_APPENDt   SET_ADDiþÿÿÿt   MAP_ADDs   SLICE+1s   SLICE+2s   SLICE+3s   STORE_SLICE+0s   STORE_SLICE+1s   STORE_SLICE+2iýÿÿÿs   STORE_SLICE+3s   DELETE_SLICE+0s   DELETE_SLICE+1s   DELETE_SLICE+2s   DELETE_SLICE+3t   STORE_SUBSCRt   DELETE_SUBSCRt
   PRINT_ITEMRL   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Ñ   (    (    s&   /usr/lib/python2.7/compiler/pyassem.pyt   UNPACK_SEQUENCEÝ  s    c         C   s	   | d S(   Ni   (    (   R   RÑ   (    (    s&   /usr/lib/python2.7/compiler/pyassem.pyt   BUILD_TUPLEß  s    c         C   s	   | d S(   Ni   (    (   R   RÑ   (    (    s&   /usr/lib/python2.7/compiler/pyassem.pyt
   BUILD_LISTá  s    c         C   s	   | d S(   Ni   (    (   R   RÑ   (    (    s&   /usr/lib/python2.7/compiler/pyassem.pyt	   BUILD_SETã  s    c         C   s"   t  | d ƒ \ } } | | d S(   Ni   i   (   R×   (   R   t   argcR±   R²   (    (    s&   /usr/lib/python2.7/compiler/pyassem.pyt   CALL_FUNCTIONå  s    c         C   s   |  j  | ƒ d S(   Ni   (   R  (   R   R  (    (    s&   /usr/lib/python2.7/compiler/pyassem.pyt   CALL_FUNCTION_VARè  s    c         C   s   |  j  | ƒ d S(   Ni   (   R  (   R   R  (    (    s&   /usr/lib/python2.7/compiler/pyassem.pyt   CALL_FUNCTION_KWê  s    c         C   s   |  j  | ƒ d S(   Ni   (   R  (   R   R  (    (    s&   /usr/lib/python2.7/compiler/pyassem.pyt   CALL_FUNCTION_VAR_KWì  s    c         C   s   | S(   N(    (   R   R  (    (    s&   /usr/lib/python2.7/compiler/pyassem.pyt   MAKE_FUNCTIONî  s    c         C   s   | S(   N(    (   R   R  (    (    s&   /usr/lib/python2.7/compiler/pyassem.pyt   MAKE_CLOSUREð  s    c         C   s$   | d k r d S| d k r  d Sd  S(   Ni   iÿÿÿÿi   iþÿÿÿ(    (   R   R  (    (    s&   /usr/lib/python2.7/compiler/pyassem.pyt   BUILD_SLICEó  s    c         C   s   | S(   N(    (   R   R  (    (    s&   /usr/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  (    (    (    s&   /usr/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_   RV   RÐ   Rp   Re   R°   R«   Râ   R’   (    (    (    s&   /usr/lib/python2.7/compiler/pyassem.pyt   <module>   s*   "W	CTÿ 2	
			Bn