
#8Zc           @   s  d  Z  d d k Z d d k Z d d k Z d d k l Z d d k l Z l Z l	 Z	 l
 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   i 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 d   Z d   Z d   Z RS(   c         C   s[   t    |  _ |  _ t  d  |  _ t i   |  _ |  i i |  i  |  i i |  i  d  S(   Nt   exit(   t   Blockt   currentt   entryR   R    t   Sett   blockst   add(   t   self(    (    s&   /usr/lib/python2.6/compiler/pyassem.pyt   __init__   s
    c         C   sg   |  i  oP |  i o7 d Gt |  i  GHd G|  i i GHd G|  i i   GHn t |  GHn | |  _ d  S(   Nt   ends       nexts      (   t   _debugR   t   reprt   nextt   get_children(   R   t   block(    (    s&   /usr/lib/python2.6/compiler/pyassem.pyt
   startBlock   s    

c         C   s>   | d  j o |  i   } n |  i i |  |  i |  d  S(   N(   t   Nonet   newBlockR   t   addNextR   (   R   R   (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyt	   nextBlock   s    	c         C   s   t    } |  i i |  | S(   N(   R   R   R   (   R   t   b(    (    s&   /usr/lib/python2.6/compiler/pyassem.pyR   5   s    	c         C   s   |  i  |  i  d  S(   N(   R   R   (   R   (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyt   startExitBlock:   s    i    c         C   s   d |  _  d  S(   Ni   (   R   (   R   (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyt   _enable_debug?   s    c         C   s   d |  _  d  S(   Ni    (   R   (   R   (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyt   _disable_debugB   s    c         G   s   |  i  o d G| GHn | d d j o |  i i |  i  n t |  d j o, t | d t  o |  i i | d  n |  i i |  d  S(   Ns   	i    t   RETURN_VALUEt   YIELD_VALUEi   i   (   R   R   (   R   R   t
   addOutEdgeR   t   lent
   isinstanceR   t   emit(   R   t   inst(    (    s&   /usr/lib/python2.6/compiler/pyassem.pyR#   E   s    
'c         C   s   xL |  i  i   D]; } | |  i j o q n | i p | i |  i  q q Wt |  i h   } | i   |  i | |  i  |  i | j o | i	 |  i  n | S(   sl   Return the blocks in reverse postorder

        i.e. each node appears before all of its successors
        (
   R   t   elementsR   R   R   t   dfs_postorderR	   t   reverset
   fixupOrdert   append(   R   R   t   order(    (    s&   /usr/lib/python2.6/compiler/pyassem.pyt   getBlocksInOrderN   s     

c         C   s$   |  i  | |  |  i | |  d S(   s"   Fixup bad order introduced by DFS.N(   t   fixupOrderHonorNextt   fixupOrderForward(   R   R   t   default_next(    (    s&   /usr/lib/python2.6/compiler/pyassem.pyR(   c   s    c         C   s  h  } x( t  t |   D] } | | | | <q Wxt  d t |  d  D]p} | | } | | d } | i p( | i d | j p | i d | j o qK n | } g  } | }	 xD |	 i o9 |	 i d | j o% | i |	 i d  |	 i d }	 q Wg  }
 x= | D]5 } | | | j p t  |
 i | | | f  q	W|
 i   |
 i   x |
 D] \ } } | | | =q]W| g | | | | d +x( t  t |   D] } | | | | <qWqK Wd S(   s  Fix one problem with DFS.

        The DFS uses child block, but doesn't know about the special
        "next" block.  As a result, the DFS can order blocks so that a
        block isn't next to the right block for implicit control
        transfers.
        i    i   N(   t   rangeR!   R   R)   t   AssertionErrort   sortR'   (   R   R   R.   t   indext   iR   t   nt   curt   chaint   eltt   lt   j(    (    s&   /usr/lib/python2.6/compiler/pyassem.pyR,   l   s>      
3  

  c      
   C   s  h  } g  } g  } x` | D]X } t  |  | | <| i |  | i o+ | i d | j o | i |  g  } q q W| i |  x3g  } x t t  |   D] } | | }	 x |	 D] } x | i   D] }
 | |
 | j  os d } xA | i D]6 } | d d j o | d |
 j o
 d } q%q q W| p q n | i | |
 | f  q q Wq Wq W| p Pn | d \ } } | | j p t  | | }
 | i |
  | i | |
  q | 2x, | D]$ }
 x |
 D] } | i |  qWqWd S(   s(   Make sure all JUMP_FORWARDs jump forwardi    t   JUMP_FORWARDi   N(	   R!   R)   R   R/   R   t   instsR0   t   removet   insert(   R   R   R.   R2   t   chainsR5   R   t   constraintsR3   R8   t   ct	   forward_pR$   t   goes_beforet   a_chain(    (    s&   /usr/lib/python2.6/compiler/pyassem.pyR-      sV      
  
 '
  c         C   s   |  i  i   S(   N(   R   R%   (   R   (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyt	   getBlocks   s    c         C   s   |  i  S(   s/   Return nodes appropriate for use with dominator(   R	   (   R   (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyt   getRoot   s    c         C   s4   g  } x' |  i    D] } | i | i    q W| S(   N(   RD   t   extendt   getContainedGraphs(   R   R8   R   (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyRG      s
     N(   t   __name__t
   __module__R   R   R   R   R   R   R   R   R   R#   R+   R(   R,   R-   RD   RE   RG   (    (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyR      s    													)	.		c         C   s_   g  } |  | |  <x; |  i    D]- } | | j o q n | t | |  } q W| i |   | S(   s;   Depth-first search of tree rooted at b, return in postorder(   R   R&   R)   (   R   t   seenR*   R@   (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyR&      s    
 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   sY   g  |  _  t i   |  _ t i   |  _ | |  _ t i |  _ g  |  _	 t i d t _ d  S(   Ni   (
   R;   R    R
   t   inEdgest   outEdgest   labelR   t   _countt   bidR   (   R   RN   (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyR      s    			c         C   s.   |  i  o d |  i  |  i f Sd |  i Sd  S(   Ns   <block %s id=%d>s   <block id=%d>(   RN   RP   (   R   (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyt   __repr__   s    
c         C   s2   t  t |  i  } d |  i |  i d i |  f S(   Ns   <block %s %d:
%s>s   
(   t   mapt   strR;   RN   RP   t   join(   R   R;   (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyt   __str__   s    c         C   sG   | d } | d  d j o |  i  i | d  n |  i i |  d  S(   Ni    i   t   JUMPi   (   RM   R   R;   R)   (   R   R$   t   op(    (    s&   /usr/lib/python2.6/compiler/pyassem.pyR#      s    
c         C   s   |  i  S(   N(   R;   (   R   (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyt   getInstructions   s    c         C   s   |  i  i |  d  S(   N(   RL   R   (   R   R   (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyt	   addInEdge   s    c         C   s   |  i  i |  d  S(   N(   RM   R   (   R   R   (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyR       s    c         C   s@   |  i  i |  t |  i   d j p t t t |  i    d  S(   Ni   (   R   R)   R!   R0   RR   RS   (   R   R   (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyR     s    R   t   RAISE_VARARGSR   t   JUMP_ABSOLUTER:   t   CONTINUE_LOOPc         C   sU   y |  i  d \ } } Wn t t f j
 o d SX| |  i j o g  |  _ n d S(   sL  Remove bogus edge for unconditional transfers

        Each block has a next edge that accounts for implicit control
        transfers, e.g. from a JUMP_IF_FALSE to the block that will be
        executed if the test is true.

        These edges must remain for the current assembler code to
        work. If they are removed, the dfs_postorder gets things in
        weird orders.  However, they shouldn't be there for other
        purposes, e.g. conversion to SSA form.  This method will
        remove the next edge when it follows an unconditional control
        transfer.
        iN(   R;   t
   IndexErrort
   ValueErrort   _uncond_transferR   (   R   RW   t   arg(    (    s&   /usr/lib/python2.6/compiler/pyassem.pyt	   pruneNext  s    c         C   sP   |  i  o2 |  i  d |  i j o |  i i |  i  d  n |  i i   |  i  S(   Ni    (   R   RM   R<   R%   (   R   (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyR     s    !c         C   sf   g  } xY |  i  D]N } t |  d j o q n | d } t | d  o | i | i  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   hasattrR)   Rb   (   R   t	   containedR$   RW   (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyRG   "  s    
 
(   s   RETURN_VALUERZ   s   YIELD_VALUER[   s   JUMP_FORWARDR\   (   RH   RI   RO   R   RQ   RU   R#   RX   RY   R    R   R_   Ra   R   RG   (    (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyR      s   								 		t   RAWt   FLATt   CONVt   DONEt   PyFlowGraphc           B   sI  e  Z e i 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 i   Z x% e i D] Z e i e i e  q We i   Z x% e i D] Z e i e i e  q Wd   Z d   Z d   Z h  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 i0  Z1 d   Z2 xF e3   i4   D]5 \ Z5 Z6 e5 d  d j o e5 d Z e6 e e <qqW[5 [6 [ d   Z7 h  Z8 x. e9 e: e i   D] Z; e; e8 e i e; <qW[; d   Z< d   Z= RS(   i    c         C   s  |  i    | |  _ | |  _ d  |  _ | |  _ t |  |  _ | |  _ | o t	 t
 B|  _ n
 d |  _ g  |  _ g  |  _ g  |  _ g  |  _ g  |  _ t |  p g  |  _ xQ t t |  i   D]: } |  i | } t | t  o | i   |  i | <q q Wt |  _ d  S(   Ni    (   t
   super_initt   namet   filenameR   t	   docstringt   argst   getArgCountt   argcountt   klassR   R   t   flagst   constst   namest   freevarst   cellvarst   closuret   listt   varnamesR/   R!   R"   t   TupleArgt   getNameRe   t   stage(   R   Rk   Rl   Rn   t	   optimizedRq   R3   t   var(    (    s&   /usr/lib/python2.6/compiler/pyassem.pyR   <  s,    
											 c         C   s   | |  _  d  S(   N(   Rm   (   R   t   doc(    (    s&   /usr/lib/python2.6/compiler/pyassem.pyt   setDocstringZ  s    c         C   s5   |  i  | B|  _  | t j o |  i d |  _ n d  S(   Ni   (   Rr   R   Rp   (   R   t   flag(    (    s&   /usr/lib/python2.6/compiler/pyassem.pyt   setFlag]  s    c         C   s   |  i  | @o d Sd  S(   Ni   (   Rr   (   R   R   (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyt	   checkFlagb  s    c         C   s   t  |  |  _ d  S(   N(   Rx   Ru   (   R   Rt   (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyt   setFreeVarsf  s    c         C   s   | |  _  d  S(   N(   Rv   (   R   Rt   (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyt   setCellVarsi  s    c         C   s   |  i  t j p t  |  i   |  i   |  i  t j p t  |  i   |  i  t j p t  |  i   |  i  t	 j p t  |  i
   S(   s   Get a Python code object(   R|   Re   R0   t   computeStackDeptht   flattenGraphRf   t   convertArgsRg   t   makeByteCodeRh   t   newCodeObject(   R   (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyt   getCodel  s    



c         C   s   | o t  i } | t  _ n d } x |  i D]w } | d } | d j o Hn t |  d j o d Gd | G| GH| d } q- d Gd | G| G| d GH| d } q- W| o | 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.6/compiler/pyassem.pyt   dumpx  s     	
 
c            sp   h   d } x*   i   D] } t | i     | <q Wh        f d       i 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   |   j o | Sd  |  <|  |  } |  i    } | o/ t g  } | D] } |  | |  qK ~  S|  i d j p    i |  S| Sd  S(   Ni   R   (   R   t   maxRN   R   (   R   t   dt   childrent   _[1]R@   (   R   t	   max_deptht   depthRJ   (    s&   /usr/lib/python2.6/compiler/pyassem.pyR     s    
/i    N(   R   RD   t	   findDepthRX   R	   t	   stacksize(   R   R   R   (    (   R   R   RJ   R   s&   /usr/lib/python2.6/compiler/pyassem.pyR     s     c         C   s  |  i  t j p t  g  |  _ } d } h  } h  } x |  i   D]~ } | | | <xa | i   D]S } | i |  t |  d j o | d } q` | d d j o | d } q` q` W| | | <qC Wd } x t t |   D] } | | } t |  d j o | d } n  | d d j o | d } n | d } |  i	 i
 |  o, | d }	 | |	 | }
 | |
 f | | <q |  i i
 |  o | | | d f | | <q q Wt |  _  d S(   s-   Arrange the blocks in order and resolve jumpsi    i   R   i   N(   R|   Re   R0   R;   R+   RX   R)   R!   R/   t   hasjrelt   has_eltt   hasjabsRf   (   R   R;   R   t   beginR   R   R$   R3   R   t   opargt   offset(    (    s&   /usr/lib/python2.6/compiler/pyassem.pyR     s@     
  


 c         C   s   |  i  t j p t  |  i i d |  i  |  i   x t t |  i	   D]r } |  i	 | } t |  d j oL | \ } } |  i
 i | d  } | o  | | |  |  f |  i	 | <q qM qM Wt |  _  d S(   s0   Convert arguments from symbolic to concrete formi    i   N(   R|   Rf   R0   Rs   R=   Rm   t   sort_cellvarsR/   R!   R;   t   _converterst   getR   Rg   (   R   R3   R   R   R   t   conv(    (    s&   /usr/lib/python2.6/compiler/pyassem.pyR     s    
 (c         C   s   h  } x |  i  D] } d | | <q Wg  } |  i D] } | | j o | | q2 q2 ~ |  _  x |  i  D] } | | =qf W|  i  | i   |  _  |  i  |  i |  _ d S(   sH   Sort cellvars in the order of varnames and prune from freevars.
        i   N(   Rv   Ry   t   keysRu   Rw   (   R   t   cellsRk   R   (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyR     s    
 $
 c         C   ss   t  |  } xG t t |   D]3 } | t  | |  j o | | | j o | Sq Wt |  } | i |  | 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   typeR/   R!   R)   (   R   Rk   Rx   R   R3   R   (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyt   _lookupName  s    	 (	c         C   s3   t  | d  o | i   } n |  i | |  i  S(   NR   (   Rc   R   R   Rs   (   R   R`   (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyt   _convert_LOAD_CONST  s    c         C   s&   |  i  | |  i  |  i  | |  i  S(   N(   R   Rt   Ry   (   R   R`   (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyt   _convert_LOAD_FAST  s    c         C   s:   |  i  d  j o |  i | |  i  n |  i | |  i  S(   N(   Rq   R   R   Ry   Rt   (   R   R`   (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyt   _convert_LOAD_NAME  s    c         C   s:   |  i  d  j o |  i | |  i  n |  i | |  i  S(   N(   Rq   R   R   Ry   Rt   (   R   R`   (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyt   _convert_NAME  s    c         C   s9   |  i  | |  i  |  i  | |  i  |  i  | |  i  S(   N(   R   Rt   Ry   Rw   (   R   R`   (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyt   _convert_DEREF  s    c         C   s&   |  i  | |  i  |  i  | |  i  S(   N(   R   Ry   Rw   (   R   R`   (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyt   _convert_LOAD_CLOSURE#  s    c         C   s   |  i  i |  S(   N(   t   _cmpR2   (   R   R`   (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyt   _convert_COMPARE_OP(  s    i	   t	   _convert_c         C   s  |  i  t j p t  t   |  _ } x |  i D] } | d } t |  d j o | i |  i |  q1 | d } | d j o | i	 |  q1 n t
 |  \ } } y | i |  i | | |  Wq1 t j
 o' | G| GH|  i | G| G| GH  q1 Xq1 Wt |  _  d  S(   Ni    i   R   (   R|   Rg   R0   t   LineAddrTablet   lnotabR;   R!   t   addCodet   opnumt   nextLinet   twobyteR^   Rh   (   R   R   R   R   R   t   hit   lo(    (    s&   /usr/lib/python2.6/compiler/pyassem.pyR   3  s&    
 

	c         C   s   |  i  t j p t  |  i t @d j o
 d } n t |  i  } |  i } |  i t @o | d } n t	 i
 | | |  i |  i |  i i   |  i   t |  i  t |  i  |  i |  i |  i i |  i i   t |  i  t |  i   S(   Ni    i   (   R|   Rh   R0   Rr   R   R!   Ry   Rp   R   t   typest   CodeTypeR   R   R   t	   getConstst   tupleRt   Rl   Rk   t	   firstlinet   getTableRu   Rv   (   R   t   nlocalsRp   (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyR   M  s    
	c         C   sQ   g  } x> |  i  D]3 } t | t  o | i   } n | i |  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.
        (   Rs   R"   Ri   R   R)   R   (   R   R8   R7   (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyR   ]  s    
 (    N(>   RH   RI   R   R   Rj   R   R   R   R   R   R   R   R   R   R   R    R
   R   t   disR3   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   Rx   t   cmp_opR   R   t   localst   itemsRk   t   objR   R   R/   R!   t   numR   R   (    (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyRi   9  sv   									!
 
 										 
		 	c         C   s   |  d  d j o d Sd  S(   Ni   RV   i   (    (   R   (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyt   isJumpj  s    Rz   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   countRt   (   R   R   Rt   (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyR   p  s    	c         C   s   d |  i  |  i f S(   Ns   TupleArg(%s, %s)(   R   Rt   (   R   (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyRQ   s  s    c         C   s   d |  i  S(   Ns   .%d(   R   (   R   (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyR{   u  s    (   RH   RI   t   __doc__R   RQ   R{   (    (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyRz   n  s   		c         C   sb   t  |   } |  oK xH |  D]< } t | t  o& t  t i | i   } | | } q q Wn | S(   N(   R!   R"   Rz   R    t   flattenRt   (   Rn   Rp   R`   t   numNames(    (    s&   /usr/lib/python2.6/compiler/pyassem.pyRo   x  s     c         C   s$   t  |  t  p t  t |  d  S(   s/   Convert an int argument into high and low bytesi   (   R"   t   intR0   t   divmod(   t   val(    (    s&   /usr/lib/python2.6/compiler/pyassem.pyR     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.6/compiler/pyassem.pyR     s    					c         G   sA   x$ | D] } |  i  i t |   q W|  i t |  |  _ d  S(   N(   R   R)   t   chrR   R!   (   R   Rn   R`   (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyR     s     c         C   s  |  i  d j o | |  _  | |  _ n |  i |  i } | |  i } | d j o |  i i } x0 | d j o" | d  | d  | d 8} q_ Wx6 | d j o( | |  | d  | d 8} d } q W| d j p | d j o | |  | |  n | |  _ |  i |  _ n d  S(   Ni    i   (   R   R   R   R   R   R)   (   R   t   linenot   addrt   linet   push(    (    s&   /usr/lib/python2.6/compiler/pyassem.pyR     s.    	 
 
 
 


 	c         C   s   d i  |  i  S(   NRK   (   RT   R   (   R   (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyR     s    c         C   s   d i  t t |  i   S(   NRK   (   RT   RR   R   R   (   R   (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyR     s    (   RH   RI   R   R   R   R   R   R   (    (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyR     s   			 	t   StackDepthTrackerc           B   s  e  Z d  d  Z h$ 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* 6Z d8 d9 g Z d-   Z d.   Z d/   Z d0   Z d1   Z	 d2   Z
 d3   Z d4   Z d5   Z d6   Z d7   Z RS(:   i    c         C   s#  d } d } x| D]} | d } | o | Gn |  i  i | d   } | d  j	 o | | } n xC |  i D]8 \ } }	 | t |   | j o |	 } | | } Pql ql W| d  j o; t |  | d   }
 |
 d  j	 o | |
 | d  } q n | | j o
 | } n | o | G| GHq q W| S(   Ni    i   (   t   effectR   R   t   patternsR!   t   getattr(   R   R;   t   debugR   t   maxDepthR3   R   t   deltat   patt	   pat_deltat   meth(    (    s&   /usr/lib/python2.6/compiler/pyassem.pyR     s2     

 
	
it   POP_TOPi   t   DUP_TOPit   LIST_APPENDs   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_ITEMR   R   t	   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.6/compiler/pyassem.pyt   UNPACK_SEQUENCE  s    c         C   s	   | d S(   Ni   (    (   R   R   (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyt   BUILD_TUPLE  s    c         C   s	   | d S(   Ni   (    (   R   R   (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyt
   BUILD_LIST  s    c         C   s"   t  | d  \ } } | | d S(   Ni   i   (   R   (   R   t   argcR   R   (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyt   CALL_FUNCTION  s    c         C   s   |  i  |  d S(   Ni   (   R  (   R   R  (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyt   CALL_FUNCTION_VAR  s    c         C   s   |  i  |  d S(   Ni   (   R  (   R   R  (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyt   CALL_FUNCTION_KW!  s    c         C   s   |  i  |  d S(   Ni   (   R  (   R   R  (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyt   CALL_FUNCTION_VAR_KW#  s    c         C   s   | S(   N(    (   R   R  (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyt   MAKE_FUNCTION%  s    c         C   s   | S(   N(    (   R   R  (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyt   MAKE_CLOSURE'  s    c         C   s(   | d j o d S| d j o d Sd  S(   Ni   ii   i(    (   R   R  (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyt   BUILD_SLICE*  s    c         C   s   | S(   N(    (   R   R  (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyt   DUP_TOPX/  s    (   R	  i(   R
  i   (   RH   RI   R   R   R   R  R  R  R  R  R  R  R  R  R  R  (    (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyR     sf   
											(   R   R   R   R   t   compilerR    t   compiler.constsR   R   R   R   R   R&   R   Re   Rf   Rg   Rh   Ri   R   Rz   Ro   R   R   R   R   (    (    (    s&   /usr/lib/python2.6/compiler/pyassem.pyt   <module>   s*   "	Y 2	
			Bj