ó
™êé[c           @   sø  d  d l  Z  d  d l 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  d l m Z m Z m Z m Z d  d l m Z m Z m Z m Z m 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 m  Z  y e j! d Z" Wn e# k
 r2d	 Z" n Xi d
 d d f 6d d	 d f 6d d d	 f 6d d	 d	 f 6Z$ d	 Z% d Z& d Z' d Z( d d „ Z) e* e* d „ Z+ d f  d „  ƒ  YZ, d e, f d „  ƒ  YZ- d e, f d „  ƒ  YZ. d e, f d „  ƒ  YZ/ d f  d „  ƒ  YZ0 d „  Z1 d f  d „  ƒ  YZ2 d  f  d! „  ƒ  YZ3 d" e3 e2 f d# „  ƒ  YZ4 d$ e3 e2 f d% „  ƒ  YZ5 d& e3 e2 f d' „  ƒ  YZ6 d( f  d) „  ƒ  YZ7 d* e3 e7 e2 f d+ „  ƒ  YZ8 d, e3 e7 e2 f d- „  ƒ  YZ9 d. f  d/ „  ƒ  YZ: d0 e3 e: e2 f d1 „  ƒ  YZ; d2 „  Z< d3 „  Z= d4 f  d5 „  ƒ  YZ> d6 f  d7 „  ƒ  YZ? d8 e? f d9 „  ƒ  YZ@ d: e? f d; „  ƒ  YZA d< e? f d= „  ƒ  YZB d> e? f d? „  ƒ  YZC i e@ e jD 6eA e jE 6eB e jF 6eC e jG 6ZH d@ „  ZI eJ dA k rôx e jK d	 D] ZL e) eL ƒ qÝWn  d S(B   iÿÿÿÿN(   t   StringIO(   t   astt   parset   walkt   syntax(   t   pyassemt   misct   futuret   symbols(   t   SC_LOCALt   SC_GLOBAL_IMPLICITt   SC_GLOBAL_EXPLICITt   SC_FREEt   SC_CELL(	   t
   CO_VARARGSt   CO_VARKEYWORDSt   CO_NEWLOCALSt	   CO_NESTEDt   CO_GENERATORt   CO_FUTURE_DIVISIONt   CO_FUTURE_ABSIMPORTt   CO_FUTURE_WITH_STATEMENTt   CO_FUTURE_PRINT_FUNCTION(   t   TupleArgi    i   t   CALL_FUNCTIONt   CALL_FUNCTION_VARt   CALL_FUNCTION_KWt   CALL_FUNCTION_VAR_KWi   i   i   c         C   sŠ   t  |  d ƒ } | j ƒ  } | j ƒ  t | |  ƒ } y | j | ƒ Wn t k
 r[ ‚  n+ Xt  |  d d ƒ } | j | ƒ | j ƒ  d  S(   Nt   Ut   ct   wb(   t   opent   readt   closet   Modulet   compilet   SyntaxErrort   dump(   t   filenamet   displayt   ft   buft   mod(    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   compileFile%   s    
c         C   s›   | d k	 s | d k	 r$ t d ‚ n  | d k rB t |  | ƒ } nH | d k r` t |  | ƒ } n* | d k r~ t |  | ƒ } n t d ƒ ‚ | j ƒ  | j S(   s*   Replacement for builtin compile() functions   not implemented yett   singlet   exect   evals6   compile() 3rd arg must be 'exec' or 'eval' or 'single'N(   t   Nonet   RuntimeErrort   InteractiveR"   t
   Expressiont
   ValueErrorR#   t   code(   t   sourceR&   t   modet   flagst   dont_inheritt   gen(    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyR#   3   s    
t   AbstractCompileModec           B   s2   e  Z d Z d  „  Z d „  Z d „  Z d „  Z RS(   c         C   s   | |  _  | |  _ d  |  _ d  S(   N(   R5   R&   R/   R4   (   t   selfR5   R&   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   __init__H   s    		c         C   s9   t  |  j |  j ƒ } t j |  j | ƒ t j | ƒ | S(   N(   R   R5   R6   R   t   set_filenameR&   R   t   check(   R;   t   tree(    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt	   _get_treeM   s    c         C   s   d  S(   N(    (   R;   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyR#   S   s    c         C   s   |  j  S(   N(   R4   (   R;   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   getCodeV   s    N(   t   __name__t
   __module__R/   R6   R<   R@   R#   RA   (    (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyR:   D   s
   			R2   c           B   s   e  Z d  Z d „  Z RS(   R.   c         C   s+   |  j  ƒ  } t | ƒ } | j ƒ  |  _ d  S(   N(   R@   t   ExpressionCodeGeneratorRA   R4   (   R;   R?   R9   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyR#   ]   s    (   RB   RC   R6   R#   (    (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyR2   Y   s   R1   c           B   s   e  Z d  Z d „  Z RS(   R,   c         C   s+   |  j  ƒ  } t | ƒ } | j ƒ  |  _ d  S(   N(   R@   t   InteractiveCodeGeneratorRA   R4   (   R;   R?   R9   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyR#   f   s    (   RB   RC   R6   R#   (    (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyR1   b   s   R"   c           B   s8   e  Z d  Z d d „ Z d „  Z e j ƒ  Z d „  Z RS(   R-   i    c         C   sN   |  j  ƒ  } t | ƒ } | r; d d  l } | j | ƒ GHn  | j ƒ  |  _ d  S(   Niÿÿÿÿ(   R@   t   ModuleCodeGeneratort   pprintRA   R4   (   R;   R'   R?   R9   RG   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyR#   o   s    c         C   s*   | j  |  j ƒ  ƒ t j |  j | ƒ d  S(   N(   t   writet   getPycHeadert   marshalR%   R4   (   R;   R(   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyR%   w   s    c         C   s2   t  j j |  j ƒ } t j d | ƒ } |  j | S(   Ns   <i(   t   ost   patht   getmtimeR&   t   structt   packt   MAGIC(   R;   t   mtime(    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyRI   }   s    (	   RB   RC   R6   R#   R%   t   impt	   get_magicRP   RI   (    (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyR"   k   s
   	t   LocalNameFinderc           B   sk   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 RS(   s   Find local names in scopec         C   sC   t  j ƒ  |  _ t  j ƒ  |  _ x | D] } |  j j | ƒ q% Wd  S(   N(   R   t   Sett   namest   globalst   add(   R;   RV   t   name(    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyR<   ˆ   s    c         C   sF   x< |  j  j ƒ  D]+ } |  j j | ƒ r |  j j | ƒ q q W|  j S(   N(   RW   t   elementsRV   t   has_eltt   remove(   R;   t   elt(    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt	   getLocals�   s    c         C   s   d  S(   N(    (   R;   t   node(    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt	   visitDict–   s    c         C   s(   x! | j  D] } |  j j | ƒ q
 Wd  S(   N(   RV   RW   RX   (   R;   R_   RY   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitGlobal™   s    c         C   s   |  j  j | j ƒ d  S(   N(   RV   RX   RY   (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitFunction�   s    c         C   s   d  S(   N(    (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitLambda    s    c         C   s4   x- | j  D]" \ } } |  j  j | p( | ƒ q
 Wd  S(   N(   RV   RX   (   R;   R_   RY   t   alias(    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitImport£   s    c         C   s4   x- | j  D]" \ } } |  j  j | p( | ƒ q
 Wd  S(   N(   RV   RX   (   R;   R_   RY   Rd   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt	   visitFrom§   s    c         C   s   |  j  j | j ƒ d  S(   N(   RV   RX   RY   (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt
   visitClass«   s    c         C   s   |  j  j | j ƒ d  S(   N(   RV   RX   RY   (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitAssName®   s    (    (   RB   RC   t   __doc__R<   R^   R`   Ra   Rb   Rc   Re   Rf   Rg   Rh   (    (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyRT   †   s   								c         C   s&   t  |  t j ƒ r" |  j s" d Sn  d S(   Ni   i    (   t
   isinstanceR   t   Constt   value(   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   is_constant_false±   s    	t   CodeGeneratorc           B   sU  e  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 d „  Z d „  Z d „  Z d „  Z d „  Z e d „ Z e Z d‚ Z d‚ Z d „  Z d „  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, d# „  Z- d$ „  Z. d% „  Z/ d& „  Z0 d' „  Z1 d( „  Z2 d) „  Z3 d* „  Z4 d+ „  Z5 d, „  Z6 d- „  Z7 d. „  Z8 d Z9 d/ „  Z: d0 „  Z; d1 „  Z< d2 „  Z= d3 „  Z> d4 „  Z? d5 „  Z@ d6 „  ZA d7 „  ZB d8 „  ZC d9 „  ZD d: „  ZE d; „  ZF d< „  ZG d= d> „ ZH eI d? k rveH ZJ eH ZK n d@ „  ZJ dA „  ZK dB „  ZL i dC dD 6dE dF 6dG dH 6dI dJ 6dK dL 6dM dN 6dO dP 6dQ dR 6dS dT 6dU dV 6dW dX 6dY dZ 6ZM d[ „  ZN d\ „  ZO d] „  ZP d^ „  ZQ d_ „  ZR d` „  ZS d da „ ZT db „  ZU dc „  ZV dd „  ZW d‚ de „ ZX d‚ df „ ZY dg „  ZZ dh „  Z[ di „  Z\ dj „  Z] dk „  Z^ dl „  Z_ dm „  Z` dn „  Za do „  Zb dp „  Zc dq „  Zd dr „  Ze ds „  Zf dt „  Zg du „  Zh dv „  Zi dw „  Zj dx „  Zk dy „  Zl dz „  Zm d{ „  Zn d| „  Zo d} „  Zp d~ „  Zq d „  Zr d€ „  Zs d� „  Zt RS(ƒ   sí  Defines basic code generator for Python bytecode

    This class is an abstract base class.  Concrete subclasses must
    define an __init__() that defines self.graph and then calls the
    __init__() defined in this class.

    The concrete class must also define the class attributes
    NameFinder, FunctionGen, and ClassGen.  These attributes can be
    defined in the initClass() method, which is a hook for
    initializing these methods after all the classes have been
    defined.
    i    c         C   s  |  j  d  k r( |  j ƒ  d |  j _  n  |  j ƒ  t j ƒ  |  _ t j ƒ  |  _ d  |  _	 |  j
 ƒ  d |  _ |  j ƒ  j } x“ | D]‹ } | d k r° |  j j t ƒ d |  _ q‚ | d k rÏ |  j j t ƒ q‚ | d k rî |  j j t ƒ q‚ | d k r‚ |  j j t ƒ q‚ q‚ Wd  S(   Ni   t   BINARY_DIVIDEt   divisiont   BINARY_TRUE_DIVIDEt   absolute_importt   with_statementt   print_function(   t   _CodeGenerator__initializedR/   t	   initClasst	   __class__t
   checkClassR   t   Stackt   localst   setupst   last_linenot   _setupGraphDelegationt   _div_opt
   get_modulet   futurest   grapht   setFlagR   R   R   R   (   R;   R€   t   feature(    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyR<   É   s(    

	
	c         C   s   d S(   s)   This method is called once for each classN(    (   R;   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyRv   á   s    c         C   s‹   yX t  |  d ƒ s t ‚ t |  d ƒ s- t ‚ t |  d ƒ sB t ‚ t |  d ƒ sW t ‚ Wn, t k
 r† } d |  j j } t | ‚ n Xd S(   s*   Verify that class is constructed correctlyR�   t
   NameFindert   FunctionGent   ClassGens   Bad class construction for %sN(   t   hasattrt   AssertionErrort   getattrRw   RB   (   R;   t   msgt   intro(    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyRx   ä   s    c         C   sO   |  j  j |  _ |  j  j |  _ |  j  j |  _ |  j  j |  _ |  j  j |  _ d  S(   N(   R�   t   emitt   newBlockt
   startBlockt	   nextBlockt   setDocstring(   R;   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyR}   ï   s
    c         C   s   |  j  j ƒ  S(   s   Return a code object(   R�   RA   (   R;   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyRA   ö   s    c         C   s*   |  j  d  k	 r" t j | |  j  ƒ S| Sd  S(   N(   t
   class_nameR/   R   t   mangle(   R;   RY   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyR’   ú   s    c         C   s    t  j ƒ  } t | | ƒ | j S(   N(   R   t   SymbolVisitorR   t   scopes(   R;   R?   t   s(    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   parseSymbols   s    c         C   s   t  d ‚ d  S(   Ns#   should be implemented by subclasses(   R0   (   R;   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyR     s    c         C   s   |  j  j ƒ  j | ƒ S(   N(   Rz   t   topR[   (   R;   RY   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   isLocalName
  s    c         C   s   |  j  d | ƒ d  S(   Nt   STORE(   t   _nameOp(   R;   RY   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt	   storeName  s    c         C   s   |  j  d | ƒ d  S(   Nt   LOAD(   Rš   (   R;   RY   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   loadName  s    c         C   s   |  j  d | ƒ d  S(   Nt   DELETE(   Rš   (   R;   RY   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   delName  s    c         C   s  |  j  | ƒ } |  j j | ƒ } | t k rd |  j sM |  j | d | ƒ q|  j | d | ƒ n¨ | t k r‡ |  j | d | ƒ n… | t k rÊ |  j s³ |  j | d | ƒ q|  j | d | ƒ nB | t k sâ | t	 k rù |  j | d | ƒ n t
 d | | f ‚ d  S(   Nt   _NAMEt   _FASTt   _GLOBALt   _DEREFs    unsupported scope for var %s: %d(   R’   t   scopet
   check_nameR	   t	   optimizedRŒ   R   R
   R   R   R0   (   R;   t   prefixRY   R¤   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyRš     s     		c         C   s8   |  j  r  |  j | d | ƒ n |  j | d | ƒ d S(   sû   Emit name ops for names generated implicitly by for loops

        The interpreter generates names that start with a period or
        dollar sign.  The symbol table ignores these names because
        they aren't present in the program text.
        R¡   R    N(   R¦   RŒ   (   R;   R§   RY   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   _implicitNameOp+  s    	c         C   sT   t  | d d ƒ } | d k	 rP | |  j k s3 | rP |  j d | ƒ | |  _ t St S(   sø  Emit SET_LINENO if necessary.

        The instruction is considered necessary if the node has a
        lineno attribute and it is different than the last lineno
        emitted.

        Returns true if SET_LINENO was emitted.

        There are no rules for when an AST node should have a lineno
        attribute.  The transformer and AST code need to be reviewed
        and a consistent policy implemented and documented.  Until
        then, this method works around missing line numbers.
        t   linenot
   SET_LINENON(   R‰   R/   R|   RŒ   t   Truet   False(   R;   R_   t   forceR©   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt
   set_lineno<  s    	c         C   sÃ   |  j  | ƒ |  _ |  j | |  _ |  j d d ƒ | j r^ |  j d | j ƒ |  j d ƒ n  t | j |  j ƒ  d d ƒ} |  j	 j
 | j ƒ  ƒ |  j | j ƒ |  j d d  ƒ |  j d ƒ d  S(   NRª   i    t
   LOAD_CONSTRi   t   verboset   RETURN_VALUE(   R–   R”   R¤   RŒ   t   docR›   R   R_   R„   Rz   t   pushR^   t   visitR/   (   R;   R_   t   lnf(    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitModuleZ  s    	c         C   sP   |  j  | ƒ |  j | ƒ |  _ |  j | |  _ |  j | j ƒ |  j d ƒ d  S(   NR±   (   R®   R–   R”   R¤   R´   R_   RŒ   (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitExpressiong  s
    c         C   sC   |  j  | d d ƒ| j r/ |  j | j ƒ n  |  j | j ƒ d  S(   Nt   isLambdai    (   t   _visitFuncOrLambdaR²   R�   R›   RY   (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyRb   n  s    	c         C   s   |  j  | d d ƒd  S(   NR¸   i   (   R¹   (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyRc   t  s    c         C   s  | rI | j  rI x! | j  j D] } |  j | ƒ q Wt | j  j ƒ } n d } |  j | |  j | |  j |  j ƒ  ƒ } t | j	 | ƒ | j
 ƒ  |  j | ƒ x | j D] } |  j | ƒ q§ W|  j | t | j ƒ ƒ x$ t | ƒ D] } |  j d d ƒ qä Wd  S(   Ni    R   i   (   t
   decoratorst   nodesR´   t   lenR…   R”   R‘   R   R   R4   t   finishR®   t   defaultst   _makeClosuret   rangeRŒ   (   R;   R_   R¸   t	   decoratort   ndecoratorsR9   t   defaultt   i(    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyR¹   w  s    
c         C   sÓ   |  j  | |  j |  j ƒ  ƒ } t | j | ƒ | j ƒ  |  j | ƒ |  j d | j ƒ x | j	 D] } |  j
 | ƒ qb W|  j d t | j	 ƒ ƒ |  j | d ƒ |  j d d ƒ |  j d ƒ |  j | j ƒ d  S(   NR¯   t   BUILD_TUPLEi    R   t   BUILD_CLASS(   R†   R”   R   R   R4   R½   R®   RŒ   RY   t   basesR´   R¼   R¿   R›   (   R;   R_   R9   t   base(    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyRg   Š  s    
c         C   sî   |  j  ƒ  } t | j ƒ } x£ t | ƒ D]• } | j | \ } } t | ƒ rS q( n  |  j | ƒ |  j | ƒ |  j  ƒ  } |  j d | ƒ |  j ƒ  |  j | ƒ |  j d | ƒ |  j	 | ƒ q( W| j
 rÝ |  j | j
 ƒ n  |  j | ƒ d  S(   Nt   POP_JUMP_IF_FALSEt   JUMP_FORWARD(   R�   R¼   t   testsRÀ   Rm   R®   R´   RŒ   R�   RŽ   t   else_(   R;   R_   t   endt   numtestsRÄ   t   testt   suitet   nextTest(    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitIf�  s"    
	c         C   s  |  j  | ƒ |  j ƒ  } |  j ƒ  } |  j ƒ  } |  j d | ƒ |  j | ƒ |  j j t | f ƒ |  j  | d t ƒ|  j | j	 ƒ |  j d | p™ | ƒ |  j ƒ  |  j | j
 ƒ |  j d | ƒ |  j | ƒ |  j d ƒ |  j j ƒ  | j r
|  j | j ƒ n  |  j | ƒ d  S(   Nt
   SETUP_LOOPR­   RÉ   t   JUMP_ABSOLUTEt	   POP_BLOCK(   R®   R�   RŒ   R�   R{   R³   t   LOOPR«   R´   RÏ   t   bodyRŽ   t   popRÌ   (   R;   R_   t   loopRÌ   t   after(    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt
   visitWhile±  s&    
	c         C   s(  |  j  ƒ  } |  j  ƒ  } |  j  ƒ  } |  j j t | f ƒ |  j | ƒ |  j d | ƒ |  j | j ƒ |  j d ƒ |  j | ƒ |  j | d d ƒ|  j d | ƒ |  j | j	 ƒ |  j | j
 ƒ |  j d | ƒ |  j | ƒ |  j d ƒ |  j j ƒ  | j r|  j | j ƒ n  |  j | ƒ d  S(   NRÓ   t   GET_ITERR­   i   t   FOR_ITERRÔ   RÕ   (   R�   R{   R³   RÖ   R®   RŒ   R´   t   listR�   t   assignR×   RØ   RÌ   (   R;   R_   t   startt   anchorRÚ   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitForÌ  s(    	c         C   sC   |  j  s% t d | j | j f ‚ n  |  j | ƒ |  j d ƒ d  S(   Ns   'break' outside loop (%s, %d)t
   BREAK_LOOP(   R{   R$   R&   R©   R®   RŒ   (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt
   visitBreakä  s
    	c         C   s[  |  j  s% t d | j | j f ‚ n  |  j  j ƒ  \ } } | t k rp |  j | ƒ |  j d | ƒ |  j ƒ  nç | t	 k sˆ | t
 k r)|  j | ƒ t |  j  ƒ } x= | d k rã | d } |  j  | \ } } | t k r§ Pq§ q§ W| t k rt d | j | j f ‚ n  |  j d | ƒ |  j ƒ  n. | t k rWd } t | | j | j f ‚ n  d  S(   Ns    'continue' outside loop (%s, %d)RÔ   i    i   t   CONTINUE_LOOPs7   'continue' not allowed inside 'finally' clause (%s, %d)(   R{   R$   R&   R©   R—   RÖ   R®   RŒ   R�   t   EXCEPTt   TRY_FINALLYR¼   t   END_FINALLY(   R;   R_   t   kindt   blockR—   t
   loop_blockRŠ   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitContinueë  s0    	
c         C   sp   |  j  ƒ  } x< | j d  D]- } |  j | ƒ |  j | | ƒ |  j ƒ  q W|  j | j d ƒ |  j | ƒ d  S(   Niÿÿÿÿ(   R�   R»   R´   RŒ   R�   (   R;   R_   t   jumpRÍ   t   child(    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt	   visitTest  s    c         C   s   |  j  | d ƒ d  S(   Nt   JUMP_IF_FALSE_OR_POP(   Rï   (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitAnd  s    c         C   s   |  j  | d ƒ d  S(   Nt   JUMP_IF_TRUE_OR_POP(   Rï   (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitOr  s    c         C   s†   |  j  ƒ  } |  j  ƒ  } |  j | j ƒ |  j d | ƒ |  j | j ƒ |  j d | ƒ |  j | ƒ |  j | j ƒ |  j | ƒ d  S(   NRÉ   RÊ   (   R�   R´   RÏ   RŒ   t   thenR�   RÌ   (   R;   R_   t   endblockt	   elseblock(    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt
   visitIfExp  s    c         C   s3  |  j  | j ƒ |  j ƒ  } xl | j d  D]] \ } } |  j  | ƒ |  j d ƒ |  j d ƒ |  j d | ƒ |  j d | ƒ |  j ƒ  q* W| j rÇ | j d \ } } |  j  | ƒ |  j d | ƒ n  t | j ƒ d k r/|  j ƒ  } |  j d | ƒ |  j | ƒ |  j d ƒ |  j d	 ƒ |  j | ƒ n  d  S(
   Niÿÿÿÿt   DUP_TOPt	   ROT_THREEt
   COMPARE_OPRð   i   RÊ   t   ROT_TWOt   POP_TOP(   R´   t   exprR�   t   opsRŒ   R�   R¼   RŽ   (   R;   R_   t   cleanupt   opR4   RÍ   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitCompare   s(    	c   	      C   sF  |  j  | ƒ |  j d d ƒ g  } x¢ t t t | j ƒ ƒ | j ƒ D] \ } } |  j | ƒ \ } } d  } x< | j D]1 } | d  k r— |  j	 ƒ  } n  |  j | | ƒ qv W| j
 d | | | f ƒ qE W|  j | j ƒ |  j d t | j ƒ d ƒ xJ | D]B \ } } } | r!|  j | ƒ n  |  j d | ƒ |  j | ƒ qü Wd  S(   Nt
   BUILD_LISTi    t   LIST_APPENDi   RÔ   (   R®   RŒ   t   zipRÀ   R¼   t   qualsR´   R/   t   ifsR�   t   insertRý   R�   RŽ   (	   R;   R_   t   stackRÄ   t   for_Rà   Rá   t   contt   if_(    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitListComp8  s$    .c   	      C   sF  |  j  | ƒ |  j d d ƒ g  } x¢ t t t | j ƒ ƒ | j ƒ D] \ } } |  j | ƒ \ } } d  } x< | j D]1 } | d  k r— |  j	 ƒ  } n  |  j | | ƒ qv W| j
 d | | | f ƒ qE W|  j | j ƒ |  j d t | j ƒ d ƒ xJ | D]B \ } } } | r!|  j | ƒ n  |  j d | ƒ |  j | ƒ qü Wd  S(   Nt	   BUILD_SETi    t   SET_ADDi   RÔ   (   R®   RŒ   R  RÀ   R¼   R  R´   R/   R  R�   R  Rý   R�   RŽ   (	   R;   R_   R  RÄ   R	  Rà   Rá   R
  R  (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitSetCompP  s$    .c   	      C   sV  |  j  | ƒ |  j d d ƒ g  } x¢ t t t | j ƒ ƒ | j ƒ D] \ } } |  j | ƒ \ } } d  } x< | j D]1 } | d  k r— |  j	 ƒ  } n  |  j | | ƒ qv W| j
 d | | | f ƒ qE W|  j | j ƒ |  j | j ƒ |  j d t | j ƒ d ƒ xJ | D]B \ } } } | r1|  j | ƒ n  |  j d | ƒ |  j | ƒ qWd  S(   Nt	   BUILD_MAPi    t   MAP_ADDi   RÔ   (   R®   RŒ   R  RÀ   R¼   R  R´   R/   R  R�   R  Rl   t   keyR�   RŽ   (	   R;   R_   R  RÄ   R	  Rà   Rá   R
  R  (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitDictComph  s&    .c         C   s‰   |  j  ƒ  } |  j  ƒ  } |  j | j ƒ |  j d ƒ |  j | ƒ |  j | d t ƒ|  j d | ƒ |  j ƒ  |  j | j ƒ | | f S(   NRÜ   R­   RÝ   (   R�   R´   RÞ   RŒ   R�   R®   R«   Rß   (   R;   R_   Rà   Rá   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitListCompFor�  s    
c         C   sA   |  j  | d t ƒ|  j | j ƒ |  j d | ƒ |  j ƒ  d  S(   NR­   RÉ   (   R®   R«   R´   RÏ   RŒ   R�   (   R;   R_   t   branch(    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitListCompIfŽ  s    c         C   s“   | j  j ƒ  } | ro x | D] } |  j d | ƒ q W|  j d t | ƒ ƒ |  j d | ƒ |  j d | ƒ n  |  j d | ƒ |  j d | ƒ d  S(   Nt   LOAD_CLOSURERÅ   R¯   t   MAKE_CLOSUREt   MAKE_FUNCTION(   R¤   t   get_free_varsRŒ   R¼   (   R;   R9   t   argst   freesRY   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyR¿   ”  s    c         C   s“   t  | |  j |  j |  j ƒ  ƒ } t | j | ƒ | j ƒ  |  j | ƒ |  j | d ƒ |  j	 | j j
 d j ƒ |  j d ƒ |  j d d ƒ d  S(   Ni    RÜ   R   i   (   t   GenExprCodeGeneratorR”   R‘   R   R   R4   R½   R®   R¿   R´   R  t   iterRŒ   (   R;   R_   R9   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitGenExpr   s    
c   
      C   ss  |  j  | ƒ g  } x¨ t t t | j ƒ ƒ | j ƒ D]… \ } } |  j | ƒ \ } } } d  } x< | j D]1 }	 | d  k rŠ |  j ƒ  } n  |  j |	 | ƒ qi W| j	 d | | | | f ƒ q5 W|  j | j
 ƒ |  j d ƒ |  j d ƒ xt | D]l \ } } } } | r|  j | ƒ n  |  j d | ƒ |  j | ƒ |  j d ƒ |  j j ƒ  |  j | ƒ qï W|  j d d  ƒ d  S(   Ni    t   YIELD_VALUERü   RÔ   RÕ   R¯   (   R®   R  RÀ   R¼   R  R´   R/   R  R�   R  Rý   RŒ   R�   RŽ   R{   RØ   (
   R;   R_   R  RÄ   R	  Rà   Rá   RÍ   R
  R  (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitGenExprInner¬  s,    . c         C   s×   |  j  ƒ  } |  j  ƒ  } |  j  ƒ  } |  j j t | f ƒ |  j d | ƒ | j rc |  j d ƒ n |  j | j ƒ |  j d ƒ |  j	 | ƒ |  j
 | d t ƒ|  j d | ƒ |  j	 ƒ  |  j | j ƒ | | | f S(   NRÓ   s   .0RÜ   R­   RÝ   (   R�   R{   R³   RÖ   RŒ   t
   is_outmostR�   R´   R  R�   R®   R«   Rß   (   R;   R_   Rà   Rá   RÍ   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitGenExprForÉ  s    	
c         C   sA   |  j  | d t ƒ|  j | j ƒ |  j d | ƒ |  j ƒ  d  S(   NR­   RÉ   (   R®   R«   R´   RÏ   RŒ   R�   (   R;   R_   R  (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitGenExprIfÞ  s    c         C   sª   |  j  ƒ  } |  j | ƒ |  j ƒ  |  j | j ƒ |  j d | ƒ |  j ƒ  |  j d d ƒ | j r‰ |  j | j ƒ |  j d d ƒ n |  j d d ƒ |  j | ƒ d  S(   Nt   POP_JUMP_IF_TRUEt   LOAD_GLOBALRˆ   t   RAISE_VARARGSi   i   (   R�   R®   R�   R´   RÏ   RŒ   t   fail(   R;   R_   RÍ   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitAssertæ  s    

	c         C   s™   |  j  | ƒ d } | j r9 |  j | j ƒ | d } n  | j r_ |  j | j ƒ | d } n  | j r… |  j | j ƒ | d } n  |  j d | ƒ d  S(   Ni    i   R'  (   R®   t   expr1R´   t   expr2t   expr3RŒ   (   R;   R_   t   n(    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt
   visitRaiseû  s    			c         C   s9  |  j  ƒ  } |  j  ƒ  } |  j  ƒ  } | j r< |  j  ƒ  } n | } |  j | ƒ |  j d | ƒ |  j | ƒ |  j j t | f ƒ |  j | j	 ƒ |  j d ƒ |  j j
 ƒ  |  j d | ƒ |  j | ƒ t | j ƒ d } xt t | j ƒ ƒ D]ü } | j | \ } }	 } |  j | ƒ | rt|  j d ƒ |  j | ƒ |  j d d ƒ |  j  ƒ  }
 |  j d |
 ƒ |  j ƒ  n  |  j d	 ƒ |	 r—|  j |	 ƒ n |  j d	 ƒ |  j d	 ƒ |  j | ƒ |  j d | ƒ | rä|  j |
 ƒ qò |  j ƒ  qò W|  j d
 ƒ | j r(|  j | ƒ |  j | j ƒ n  |  j | ƒ d  S(   Nt   SETUP_EXCEPTRÕ   RÊ   i   Rø   Rú   s   exception matchRÉ   Rü   Rè   (   R�   RÌ   R®   RŒ   R�   R{   R³   Ræ   R´   R×   RØ   RŽ   R¼   t   handlersRÀ   (   R;   R_   R×   R0  RÍ   t   lElset   lastRÄ   Rý   t   targett   next(    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitTryExcept	  sR    		c         C   sã   |  j  ƒ  } |  j  ƒ  } |  j | ƒ |  j d | ƒ |  j | ƒ |  j j t | f ƒ |  j | j ƒ |  j d ƒ |  j j	 ƒ  |  j d d  ƒ |  j | ƒ |  j j t | f ƒ |  j | j ƒ |  j d ƒ |  j j	 ƒ  d  S(   Nt   SETUP_FINALLYRÕ   R¯   Rè   (   R�   R®   RŒ   R�   R{   R³   Rç   R´   R×   RØ   R/   Rè   t   final(   R;   R_   R×   R7  (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitTryFinally8  s    c         C   sÖ  |  j  ƒ  } |  j  ƒ  } |  j d 7_ d |  j } |  j | ƒ |  j | j ƒ |  j d ƒ |  j d d ƒ |  j d ƒ |  j d d ƒ |  j d d	 ƒ | j d  k rº |  j d
 ƒ n |  j d | ƒ |  j d | ƒ |  j	 | ƒ |  j
 j t | f ƒ | j d  k	 r?|  j d | ƒ |  j d | ƒ |  j | j ƒ n  |  j | j ƒ |  j d ƒ |  j
 j ƒ  |  j d d  ƒ |  j	 | ƒ |  j
 j t | f ƒ |  j d ƒ |  j d ƒ |  j
 j ƒ  |  j d 8_ d  S(   Ni   s   _[%d]Rø   t	   LOAD_ATTRt   __exit__Rû   t	   __enter__R   i    Rü   R™   R6  Rœ   Rž   RÕ   R¯   t   WITH_CLEANUPRè   (   R�   t   _CodeGenerator__with_countR®   R´   Rý   RŒ   t   varsR/   R¨   R�   R{   R³   Rç   R×   RØ   Rè   (   R;   R_   R×   R7  t   valuevar(    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt	   visitWithK  s>    c         C   s.   |  j  | ƒ |  j | j ƒ |  j d ƒ d  S(   NRü   (   R®   R´   Rý   RŒ   (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitDiscardo  s    c         C   s   |  j  d | j ƒ d  S(   NR¯   (   RŒ   Rl   (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt
   visitConstt  s    c         C   s'   |  j  d | j ƒ |  j | j ƒ d  S(   NR¯   (   RŒ   RY   R´   Rý   (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitKeywordw  s    c         C   s   d  S(   N(    (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyRa   {  s    c         C   s!   |  j  | ƒ |  j | j ƒ d  S(   N(   R®   R�   RY   (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt	   visitName  s    c         C   s   |  j  | ƒ d  S(   N(   R®   (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt	   visitPassƒ  s    c         C   sË   |  j  | ƒ |  j j t ƒ r% d n d } x™ | j D]Ž \ } } t d k rp |  j d | ƒ |  j d d  ƒ n  |  j d | ƒ | j d ƒ d } | r¶ |  j	 | ƒ |  j
 | ƒ q5 |  j
 | ƒ q5 Wd  S(   Ni    iÿÿÿÿi   R¯   t   IMPORT_NAMEt   .(   R®   R�   t	   checkFlagR   RV   t   VERSIONRŒ   R/   t   splitt   _resolveDotsR›   (   R;   R_   t   levelRY   Rd   R*   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyRe   †  s    c         C   sT  |  j  | ƒ | j } | d k r> |  j j t ƒ r> d } n  t d „  | j Dƒ ƒ } t d k r† |  j d | ƒ |  j d | ƒ n  |  j d | j	 ƒ x§ | j D]œ \ } } t d k r/| d k rü d |  _
 |  j d ƒ t | j ƒ d k sø t ‚ d  S|  j d	 | ƒ |  j | ƒ |  j | p(| ƒ q£ |  j d	 | ƒ q£ W|  j d
 ƒ d  S(   Ni    iÿÿÿÿc         s   s   |  ] \ } } | Vq d  S(   N(    (   t   .0RY   Rd   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pys	   <genexpr>š  s    i   R¯   RF  t   *t   IMPORT_STARt   IMPORT_FROMRü   (   R®   RL  R�   RH  R   t   tupleRV   RI  RŒ   t   modnamet	   namespaceR¼   Rˆ   RK  R›   (   R;   R_   RL  t   fromlistRY   Rd   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyRf   •  s*    			c         C   sN   | j  d ƒ } t | ƒ d k r% d  Sx" | d D] } |  j d | ƒ q0 Wd  S(   NRG  i   R9  (   RJ  R¼   RŒ   (   R;   RY   t   eltsR]   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyRK  ¯  s
    c         C   s0   |  j  | j ƒ |  j d |  j | j ƒ ƒ d  S(   NR9  (   R´   Rý   RŒ   R’   t   attrname(   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitGetattr¶  s    c         C   sŸ   |  j  | ƒ |  j | j ƒ t | j ƒ d } xh t t | j ƒ ƒ D]Q } | j | } | | k  ru |  j d ƒ n  t | t j	 ƒ rF |  j | ƒ qF qF Wd  S(   Ni   Rø   (
   R®   R´   Rý   R¼   R»   RÀ   RŒ   Rj   R   t   Node(   R;   R_   t   dupsRÄ   R]   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitAssign¼  s    c         C   sa   | j  d k r" |  j | j ƒ n; | j  d k rQ |  j | ƒ |  j | j ƒ n d G| j  GHd  S(   Nt	   OP_ASSIGNt	   OP_DELETEt   oops(   R7   R›   RY   R®   RŸ   (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyRh   Ç  s    c         C   s�   |  j  | j ƒ | j d k r> |  j d |  j | j ƒ ƒ n? | j d k rl |  j d |  j | j ƒ ƒ n d G| j GH| GHd  S(   NR[  t
   STORE_ATTRR\  t   DELETE_ATTRs   warning: unexpected flags:(   R´   Rý   R7   RŒ   R’   RV  (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitAssAttrÐ  s    t   UNPACK_SEQUENCEc         C   sS   t  | ƒ d k r. |  j | t | j ƒ ƒ n  x | j D] } |  j | ƒ q8 Wd  S(   NR\  (   t   findOpRŒ   R¼   R»   R´   (   R;   R_   R   Rî   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   _visitAssSequenceÚ  s    i   c         C   s   |  j  | d ƒ d  S(   Nt   UNPACK_TUPLE(   Rc  (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitAssTupleä  s    c         C   s   |  j  | d ƒ d  S(   Nt   UNPACK_LIST(   Rc  (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitAssListç  s    c         C   sg   |  j  | ƒ t | j ƒ } |  j | d ƒ |  j | j ƒ |  j |  j | j ƒ |  j | d ƒ d  S(   Nt   loadt   store(   R®   t   wrap_augR_   R´   Rý   RŒ   t   _augmented_opcodeR   (   R;   R_   t   aug_node(    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitAugAssignì  s    t   INPLACE_ADDs   +=t   INPLACE_SUBTRACTs   -=t   INPLACE_MULTIPLYs   *=t   INPLACE_DIVIDEs   /=t   INPLACE_FLOOR_DIVIDEs   //=t   INPLACE_MODULOs   %=t   INPLACE_POWERs   **=t   INPLACE_RSHIFTs   >>=t   INPLACE_LSHIFTs   <<=t   INPLACE_ANDs   &=t   INPLACE_XORs   ^=t
   INPLACE_ORs   |=c         C   sB   | d k r |  j  | j ƒ n | d k r> |  j | j ƒ n  d  S(   NRh  Ri  (   R�   RY   R›   (   R;   R_   R6   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitAugName  s    c         C   s„   | d k rH |  j  | j ƒ |  j d ƒ |  j d |  j | j ƒ ƒ n8 | d k r€ |  j d ƒ |  j d |  j | j ƒ ƒ n  d  S(   NRh  Rø   R9  Ri  Rû   R^  (   R´   Rý   RŒ   R’   RV  (   R;   R_   R6   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitAugGetattr	  s    c         C   sº   | d k r |  j  | d ƒ n— | d k r¶ d } | j rG | d B} n  | j r] | d B} n  | d k ry |  j d ƒ n) | d k r• |  j d ƒ n |  j d	 ƒ |  j d
 | ƒ n  d  S(   NRh  i   Ri  i    i   Rû   i   t   ROT_FOURRù   s   STORE_SLICE+%d(   t
   visitSlicet   lowert   upperRŒ   (   R;   R_   R6   t   slice(    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitAugSlice  s    		c         C   sL   | d k r |  j  | d ƒ n) | d k rH |  j d ƒ |  j d ƒ n  d  S(   NRh  i   Ri  Rù   t   STORE_SUBSCR(   t   visitSubscriptRŒ   (   R;   R_   R6   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitAugSubscript#  s
    c         C   s‚   |  j  | j ƒ | j d  k r2 |  j d d  ƒ n |  j  | j ƒ | j d  k ra |  j d ƒ n |  j  | j ƒ |  j d ƒ d  S(   NR¯   Rø   t	   EXEC_STMT(   R´   Rý   Rz   R/   RŒ   RW   (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt	   visitExec*  s    c         C   s  d } d } |  j  | ƒ |  j | j ƒ xG | j D]< } |  j | ƒ t | t j ƒ re | d } q3 | d } q3 W| j d  k	 r• |  j | j ƒ n  | j	 d  k	 r· |  j | j	 ƒ n  | j d  k	 } | j	 d  k	 } t
 | | f } |  j | | d >| Bƒ d  S(   Ni    i   i   (   R®   R´   R_   R  Rj   R   t   Keywordt	   star_argsR/   t
   dstar_argst   callfunc_opcode_infoRŒ   (   R;   R_   t   post   kwt   argt	   have_start
   have_dstart   opcode(    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitCallFunc6  s"    c         C   sº   |  j  | ƒ | j r) |  j | j ƒ n  xj | j D]_ } | j rR |  j d ƒ n  |  j | ƒ | j r… |  j d ƒ |  j d ƒ q3 |  j d ƒ q3 W| j r¶ | r¶ |  j d ƒ n  d  S(   NRø   Rû   t   PRINT_ITEM_TOt
   PRINT_ITEMRü   (   R®   t   destR´   R»   RŒ   (   R;   R_   t   newlineRî   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt
   visitPrintJ  s    			c         C   s=   |  j  | d d ƒ| j r, |  j d ƒ n |  j d ƒ d  S(   NR•  i   t   PRINT_NEWLINE_TOt   PRINT_NEWLINE(   R–  R”  RŒ   (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitPrintnlZ  s    	c         C   s.   |  j  | ƒ |  j | j ƒ |  j d ƒ d  S(   NR±   (   R®   R´   Rl   RŒ   (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitReturna  s    c         C   s.   |  j  | ƒ |  j | j ƒ |  j d ƒ d  S(   NR   (   R®   R´   Rl   RŒ   (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt
   visitYieldf  s    c         C   s2  |  j  | j ƒ d } | j r< |  j  | j ƒ | d B} n  | j rb |  j  | j ƒ | d B} n  | r¶ | d k r„ |  j d ƒ q¶ | d k r£ |  j d d ƒ q¶ |  j d d ƒ n  | j d k rÙ |  j d | ƒ nU | j d	 k rü |  j d
 | ƒ n2 | j d k r|  j d | ƒ n d G| j GH‚  d  S(   Ni    i   i   Rø   i   t   DUP_TOPXt   OP_APPLYs   SLICE+%dR[  s   STORE_SLICE+%dR\  s   DELETE_SLICE+%ds   weird slice(   R´   Rý   R~  R  RŒ   R7   (   R;   R_   t   aug_flagR€  (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyR}  m  s,    		c         C   sÜ   |  j  | j ƒ x | j D] } |  j  | ƒ q Wt | j ƒ d k rb |  j d t | j ƒ ƒ n  | r{ |  j d d ƒ n  | j d k rš |  j d ƒ n> | j d k r¹ |  j d ƒ n | j d	 k rØ |  j d
 ƒ n  d  S(   Ni   RÅ   Rœ  i   R�  t   BINARY_SUBSCRR[  R‚  R\  t   DELETE_SUBSCR(   R´   Rý   t   subsR¼   RŒ   R7   (   R;   R_   Rž  t   sub(    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyRƒ  ˆ  s    c         C   s1   |  j  | j ƒ |  j  | j ƒ |  j | ƒ d  S(   N(   R´   t   leftt   rightRŒ   (   R;   R_   R   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   binaryOp™  s    c         C   s   |  j  | d ƒ S(   Nt
   BINARY_ADD(   R¥  (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitAddž  s    c         C   s   |  j  | d ƒ S(   Nt   BINARY_SUBTRACT(   R¥  (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitSub¡  s    c         C   s   |  j  | d ƒ S(   Nt   BINARY_MULTIPLY(   R¥  (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitMul¤  s    c         C   s   |  j  | |  j ƒ S(   N(   R¥  R~   (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitDiv§  s    c         C   s   |  j  | d ƒ S(   Nt   BINARY_FLOOR_DIVIDE(   R¥  (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitFloorDivª  s    c         C   s   |  j  | d ƒ S(   Nt   BINARY_MODULO(   R¥  (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitMod­  s    c         C   s   |  j  | d ƒ S(   Nt   BINARY_POWER(   R¥  (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt
   visitPower°  s    c         C   s   |  j  | d ƒ S(   Nt   BINARY_LSHIFT(   R¥  (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitLeftShift³  s    c         C   s   |  j  | d ƒ S(   Nt   BINARY_RSHIFT(   R¥  (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitRightShift¶  s    c         C   s!   |  j  | j ƒ |  j | ƒ d  S(   N(   R´   Rý   RŒ   (   R;   R_   R   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   unaryOp»  s    c         C   s   |  j  | d ƒ S(   Nt   UNARY_INVERT(   R·  (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitInvert¿  s    c         C   s   |  j  | d ƒ S(   Nt   UNARY_NEGATIVE(   R·  (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitUnarySubÂ  s    c         C   s   |  j  | d ƒ S(   Nt   UNARY_POSITIVE(   R·  (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitUnaryAddÅ  s    c         C   s   |  j  | d ƒ S(   NR¸  (   R·  (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitUnaryInvertÈ  s    c         C   s   |  j  | d ƒ S(   Nt	   UNARY_NOT(   R·  (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitNotË  s    c         C   s   |  j  | d ƒ S(   Nt   UNARY_CONVERT(   R·  (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitBackquoteÎ  s    c         C   sD   |  j  | d ƒ x, | d D]  } |  j  | ƒ |  j | ƒ q Wd  S(   Ni    i   (   R´   RŒ   (   R;   R»   R   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   bitOpÓ  s    c         C   s   |  j  | j d ƒ S(   Nt
   BINARY_AND(   RÃ  R»   (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitBitandÙ  s    c         C   s   |  j  | j d ƒ S(   Nt	   BINARY_OR(   RÃ  R»   (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt
   visitBitorÜ  s    c         C   s   |  j  | j d ƒ S(   Nt
   BINARY_XOR(   RÃ  R»   (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitBitxorß  s    c         C   s   |  j  d t ƒ d  S(   NR¯   (   RŒ   t   Ellipsis(   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitEllipsisä  s    c         C   sK   |  j  | ƒ x | j D] } |  j | ƒ q W|  j d t | j ƒ ƒ d  S(   NRÅ   (   R®   R»   R´   RŒ   R¼   (   R;   R_   R]   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt
   visitTupleç  s    c         C   sK   |  j  | ƒ x | j D] } |  j | ƒ q W|  j d t | j ƒ ƒ d  S(   NR  (   R®   R»   R´   RŒ   R¼   (   R;   R_   R]   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt	   visitListí  s    c         C   sK   |  j  | ƒ x | j D] } |  j | ƒ q W|  j d t | j ƒ ƒ d  S(   NR  (   R®   R»   R´   RŒ   R¼   (   R;   R_   R]   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitSetó  s    c         C   s>   x | j  D] } |  j | ƒ q
 W|  j d t | j  ƒ ƒ d  S(   Nt   BUILD_SLICE(   R»   R´   RŒ   R¼   (   R;   R_   Rî   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   visitSliceobjù  s    c         C   s|   |  j  | ƒ |  j d d ƒ xX | j D]M \ } } |  j d ƒ |  j | ƒ |  j | ƒ |  j d ƒ |  j d ƒ q' Wd  S(   NR  i    Rø   Rù   R‚  (   R®   RŒ   t   itemsR´   (   R;   R_   t   kt   v(    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyR`   þ  s    N(u   RB   RC   Ri   R¦   R/   Ru   R‘   R<   Rv   Rx   R}   RA   R’   R–   R   R˜   R›   R�   RŸ   Rš   R¨   R¬   R®   RT   R„   R…   R†   R¶   R·   Rb   Rc   R¹   Rg   RÒ   RÛ   Râ   Rä   Rì   Rï   Rñ   Ró   R÷   R  R  R  R  R  R  R¿   R  R!  R#  R$  R)  R.  R5  R8  R=  R@  RA  RB  RC  Ra   RD  RE  Re   Rf   RK  RW  RZ  Rh   R`  Rc  RI  Re  Rg  Rm  Rk  Rz  R{  R�  R„  R†  R‘  R–  R™  Rš  R›  R}  Rƒ  R¥  R§  R©  R«  R¬  R®  R°  R²  R´  R¶  R·  R¹  R»  R½  R¾  RÀ  RÂ  RÃ  RÅ  RÇ  RÉ  RË  RÌ  RÍ  RÎ  RÐ  R`   (    (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyRn   ·   sü   																																											/		$														
				
																																				t   NestedScopeMixinc           B   s   e  Z d  Z d „  Z RS(   s>   Defines initClass() for nested scoping (Python 2.2-compatible)c         C   s(   t  |  j _ t |  j _ t |  j _ d  S(   N(   RT   Rw   R„   t   FunctionCodeGeneratorR…   t   ClassCodeGeneratorR†   (   R;   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyRv   
  s    (   RB   RC   Ri   Rv   (    (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyRÔ    s   RF   c           B   s)   e  Z e j Z d Z d  „  Z d „  Z RS(   c         C   sE   t  j d | j ƒ |  _ t j | ƒ |  _ |  j ƒ  t | |  ƒ d  S(   Ns   <module>(	   R   t   PyFlowGraphR&   R�   R   t   find_futuresR€   t    _ModuleCodeGenerator__super_initR   (   R;   R?   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyR<     s    
c         C   s   |  S(   N(    (   R;   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyR     s    N(   RB   RC   Rn   R<   RÙ  R/   R”   R   (    (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyRF     s   		RD   c           B   s/   e  Z e j Z d Z d Z d  „  Z d „  Z RS(   c         C   s3   t  j d | j ƒ |  _ |  j ƒ  t | |  ƒ d  S(   Ns   <expression>(   R   R×  R&   R�   t$   _ExpressionCodeGenerator__super_initR   (   R;   R?   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyR<   #  s    
c         C   s   |  S(   N(    (   R;   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyR   (  s    N(    (	   RB   RC   Rn   R<   RÚ  R/   R”   R€   R   (    (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyRD     s
   		RE   c           B   s8   e  Z e j Z d Z d Z d  „  Z d „  Z d „  Z	 RS(   c         C   sM   t  j d | j ƒ |  _ |  j ƒ  |  j | ƒ t | |  ƒ |  j d ƒ d  S(   Ns   <interactive>R±   (   R   R×  R&   R�   t%   _InteractiveCodeGenerator__super_initR®   R   RŒ   (   R;   R?   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyR<   2  s
    
c         C   s   |  S(   N(    (   R;   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyR   9  s    c         C   s!   |  j  | j ƒ |  j d ƒ d  S(   Nt
   PRINT_EXPR(   R´   Rý   RŒ   (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyRA  <  s    N(    (
   RB   RC   Rn   R<   RÛ  R/   R”   R€   R   RA  (    (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyRE   +  s   			t   AbstractFunctionCodec           B   sG   e  Z d  Z d Z d „  Z d „  Z d „  Z d „  Z d „  Z e Z	 RS(   i   i    c         C   sL  | |  _  | |  _ | r> t } d | j } | j d | _ n	 | j } t | j ƒ \ } }	 t j | | j	 | d d ƒ|  _
 | |  _ |  j ƒ  | r³ | j r³ |  j | j ƒ n  t | j |  j | ƒ d d ƒ}
 |  j j |
 j ƒ  ƒ | j r|  j
 j t ƒ n  | j r"|  j
 j t ƒ n  |  j | ƒ |	 rH|  j | j ƒ n  d  S(   Ns   <lambda.%d>i   R¦   R°   i    (   R‘   t   moduleRÕ  t   lambdaCountRY   t   generateArgListt   argnamesR   R×  R&   R�   R¸   t
   super_initR²   R�   R   R4   R„   Rz   R³   R^   t   varargsR‚   R   t   kwargsR   R®   t   generateArgUnpack(   R;   t   funcR”   R¸   R‘   R*   t   klassRY   R  t   hasTupleArgRµ   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyR<   F  s.    				
!		c         C   s   |  j  S(   N(   RÞ  (   R;   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyR   c  s    c         C   s:   |  j  j ƒ  |  j s) |  j d d  ƒ n  |  j d ƒ d  S(   NR¯   R±   (   R�   t   startExitBlockR¸   RŒ   R/   (   R;   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyR½   f  s    	c         C   sb   x[ t  t | ƒ ƒ D]G } | | } t | t ƒ r |  j d d | d ƒ |  j | ƒ q q Wd  S(   Nt	   LOAD_FASTs   .%di   (   RÀ   R¼   Rj   RQ  RŒ   t   unpackSequence(   R;   R  RÄ   R�  (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyRå  l  s
    
c         C   s   t  d k r% |  j d t | ƒ ƒ n |  j d t | ƒ ƒ x= | D]5 } t | t ƒ rg |  j | ƒ qB |  j d | ƒ qB Wd  S(   Ni   Ra  Rd  R™   (   RI  RŒ   R¼   Rj   RQ  Rë  Rš   (   R;   t   tupR]   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyRë  s  s    (
   RB   RC   R¦   Rß  R<   R   R½   Rå  Rë  t   unpackTuple(    (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyRÝ  B  s   					RÕ  c           B   s)   e  Z e j Z d Z e j Z d  „  Z RS(   c         C   sŠ   | |  _  | | |  _ |  j | | | | | ƒ |  j j |  j j ƒ  ƒ |  j j |  j j ƒ  ƒ |  j j d  k	 r† |  j j
 t ƒ n  d  S(   N(   R”   R¤   t"   _FunctionCodeGenerator__super_initR�   t   setFreeVarsR  t   setCellVarst   get_cell_varst	   generatorR/   R‚   R   (   R;   Ræ  R”   R¸   R‘   R*   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyR<   ‡  s    	N(	   RB   RC   Rn   R<   Râ  R/   R”   RÝ  Rî  (    (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyRÕ  €  s   		R  c           B   s)   e  Z e j Z d Z e j Z d  „  Z RS(   c         C   su   | |  _  | | |  _ |  j | | d | | ƒ |  j j |  j j ƒ  ƒ |  j j |  j j ƒ  ƒ |  j j t	 ƒ d  S(   Ni   (
   R”   R¤   t!   _GenExprCodeGenerator__super_initR�   Rï  R  Rð  Rñ  R‚   R   (   R;   t   gexpR”   R‘   R*   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyR<   —  s    	N(	   RB   RC   Rn   R<   Râ  R/   R”   RÝ  Ró  (    (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyR  �  s   		t   AbstractClassCodec           B   s#   e  Z d  „  Z d „  Z d „  Z RS(   c         C   sª   | j  |  _ | |  _ t j | j  | j d d d d ƒ|  _ |  j ƒ  t | j	 |  j
 ƒ  d d ƒ} |  j j | j ƒ  ƒ |  j j t ƒ | j r¦ |  j | j ƒ n  d  S(   NR¦   i    Rç  i   R°   (   RY   R‘   RÞ  R   R×  R&   R�   Râ  R   R4   R„   Rz   R³   R^   R‚   R   R²   R�   (   R;   Rç  R”   RÞ  Rµ   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyR<   ¡  s    	
	c         C   s   |  j  S(   N(   RÞ  (   R;   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyR   ­  s    c         C   s+   |  j  j ƒ  |  j d ƒ |  j d ƒ d  S(   Nt   LOAD_LOCALSR±   (   R�   Ré  RŒ   (   R;   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyR½   °  s    (   RB   RC   R<   R   R½   (    (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyRõ  Ÿ  s   		RÖ  c           B   s)   e  Z e j Z d Z e j Z d  „  Z RS(   c         C   sµ   | |  _  | | |  _ |  j | | | ƒ |  j j |  j j ƒ  ƒ |  j j |  j j ƒ  ƒ |  j | ƒ |  j	 d d ƒ |  j
 d ƒ | j r± |  j	 d | j ƒ |  j
 d ƒ n  d  S(   NR&  RB   RC   R¯   Ri   (   R”   R¤   t   _ClassCodeGenerator__super_initR�   Rï  R  Rð  Rñ  R®   RŒ   R›   R²   (   R;   Rç  R”   RÞ  (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyR<   »  s    		N(	   RB   RC   Rn   R<   Râ  R/   R”   Rõ  R÷  (    (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyRÖ  µ  s   		c         C   s¾   g  } g  } d } x› t  t |  ƒ ƒ D]‡ } |  | } t | t ƒ rT | j | ƒ q% t | t ƒ r  | j t | d | ƒ ƒ | j t j	 | ƒ ƒ | d } q% t
 d | ‚ q% W| | | f S(   s&   Generate an arg list marking TupleArgsi    i   i   s   unexpect argument type:(   RÀ   R¼   Rj   t   strt   appendRQ  R   t   extendR   t   flattenR3   (   t   arglistR  t   extrat   countRÄ   R]   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyRà  È  s    
c         C   s#   t  ƒ  } t |  | d d ƒ| j S(   s5   Find the op (DELETE, LOAD, STORE) in an AssTuple treeR°   i    (   t   OpFinderR   R   (   R_   RÓ  (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyRb  Ù  s    	Rÿ  c           B   s&   e  Z d  „  Z d „  Z e Z e Z RS(   c         C   s   d  |  _ d  S(   N(   R/   R   (   R;   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyR<   à  s    c         C   s@   |  j  d  k r | j |  _  n |  j  | j k r< t d ‚ n  d  S(   Ns   mixed ops in stmt(   R   R/   R7   R3   (   R;   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyRh   â  s    (   RB   RC   R<   Rh   R`  Rƒ  (    (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyRÿ  ß  s   		t	   Delegatorc           B   s    e  Z d  Z d „  Z d „  Z RS(   s  Base class to support delegation for augmented assignment nodes

    To generator code for augmented assignments, we use the following
    wrapper classes.  In visitAugAssign, the left-hand expression node
    is visited twice.  The first time the visit uses the normal method
    for that node .  The second time the visit uses a different method
    that generates the appropriate code to perform the assignment.
    These delegator classes wrap the original AST nodes in order to
    support the variant visit methods.
    c         C   s   | |  _  d  S(   N(   t   obj(   R;   R  (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyR<   õ  s    c         C   s   t  |  j | ƒ S(   N(   R‰   R  (   R;   t   attr(    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   __getattr__ø  s    (   RB   RC   Ri   R<   R  (    (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyR   ê  s   
	t
   AugGetattrc           B   s   e  Z RS(    (   RB   RC   (    (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyR  û  s   t   AugNamec           B   s   e  Z RS(    (   RB   RC   (    (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyR  þ  s   t   AugSlicec           B   s   e  Z RS(    (   RB   RC   (    (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyR    s   t   AugSubscriptc           B   s   e  Z RS(    (   RB   RC   (    (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyR    s   c         C   s   t  |  j |  ƒ S(   N(   t   wrapperRw   (   R_   (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyRj    s    t   __main__(M   RR   RK   RJ   RN   t   syst	   cStringIOR    t   compilerR   R   R   R   R   R   R   R   t   compiler.constsR	   R
   R   R   R   R   R   R   R   R   R   R   R   R   t   compiler.pyassemR   t   version_infoRI  t   AttributeErrorRŠ  RÖ   Ræ   Rç   Rè   R+   R/   R#   R:   R2   R1   R"   RT   Rm   Rn   RÔ  RF   RD   RE   RÝ  RÕ  R  Rõ  RÖ  Rà  Rb  Rÿ  R   R  R  R  R  t   Getattrt   Namet   Slicet	   SubscriptR  Rj  RB   t   argvt   file(    (    (    s(   /usr/lib/python2.7/compiler/pycodegen.pyt   <module>   s€   ""(@
		+	ÿ ÿ ÿ ÿ U>				


	