³ò
Ø‘RMc        	   @   s£  d  d k  Z  d  d k l Z l Z d  d k l Z d  d k l Z l Z d  d k	 l
 Z
 e Z d e f d „  ƒ  YZ d e f d	 „  ƒ  YZ d
 e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ e d ƒ Z e e ƒ Z d „  Z d „  Z d „  Z d „  Z d „  Z e h  e d „ Z  d „  Z! d  „  Z" d! „  Z# d" „  Z$ d S(#   iÿÿÿÿN(   t   uidt   Hashable(   t
   roproperty(   t   PY_IDENTIFIERt   nice_repr_for_func(   t   identity_dictt   FunctionGraphc           B   s°   e  Z d  d d d g Z d d „ Z d „  Z d „  Z d „  Z e e ƒ Z	 d „  Z
 e e
 ƒ Z d	 „  Z e e ƒ Z d
 „  Z d „  Z d „  Z d „  Z d „  Z d d „ Z RS(   t
   startblockt   returnblockt   exceptblockt   __dict__c         C   s˜   | |  _  | |  _ t |  i _ t | p t ƒ  g ƒ |  _ d |  i _ d |  i _ t t d ƒ t d ƒ g ƒ |  _	 d |  i	 _ d |  i	 _ d  |  _ d  S(   Nt   etypet   evalue(    (    (    (    (   t   nameR   t   Truet   isstartblockt   Blockt   VariableR   t
   operationst   exitsR	   t   Nonet   tag(   t   selfR   R   t
   return_var(    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyt   __init__&   s    		c         C   s
   |  i  i S(   N(   R   t	   inputargs(   R   (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyt   getargs5   s    c         C   s   |  i  i d S(   Ni    (   R   R   (   R   (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyt   getreturnvar8   s    c         C   sI   d d k  l } |  i } | |  i ƒ } | d  j o t d ƒ ‚ n | S(   Niÿÿÿÿ(   t	   getsources   source not found(   t   pypy.tool.sourcetoolsR   t   funcR   t   AttributeError(   R   R   R   t   src(    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyR   ;   s    	c         C   s   |  i  i i S(   N(   R   t	   func_codet   co_firstlineno(   R   (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyt   getstartlineD   s    c         C   s   |  i  i i S(   N(   R   R!   t   co_filename(   R   (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyt   getfilenameH   s    c         C   s2   t  |  d ƒ o t |  i |  i ƒ Sn |  i Sd  S(   NR   (   t   hasattrR   R   R   (   R   (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyt   __str__L   s    c         C   s   d |  t  |  ƒ f S(   Ns   <FunctionGraph of %s at 0x%x>(   R    (   R   (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyt   __repr__R   s    c         c   s•   |  i  } | Vh  t | <} t | i d  d  d … ƒ } xU | oM | i ƒ  i } | | j o- | Vt | | <| | i d  d  d … 7} q< q< Wd  S(   Niÿÿÿÿ(   R   R   t   listR   t   popt   target(   R   t   blockt   seent   stack(    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyt
   iterblocksU   s    	 
c         c   s–   |  i  } h  t | <} t | i d  d  d … ƒ } x[ | oS | i ƒ  } | V| i } | | j o( t | | <| | i d  d  d … 7} q7 q7 Wd  S(   Niÿÿÿÿ(   R   R   R)   R   R*   R+   (   R   R,   R-   R.   t   link(    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyt	   iterlinksa   s    	 	
c         c   s:   x3 |  i  ƒ  D]% } x | i D] } | | f Vq Wq Wd  S(   N(   R/   R   (   R   R,   t   op(    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyt   iterblockopsm   s
     
 c         C   s*   d d k  l } | | |  g ƒ i ƒ  d  S(   Niÿÿÿÿ(   t   FlowGraphPage(   t   pypy.translator.tool.graphpageR4   t   display(   R   t   tR4   (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyt   showr   s    N(   t   __name__t
   __module__t	   __slots__R   R   R   R   R   R   t   sourceR#   t	   startlineR%   t   filenameR'   R(   R/   R1   R3   R8   (    (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyR   #   s    										t   Linkc           B   sb   e  Z d  i ƒ  Z d	 d „ Z d	 d	 d „ Z d „  Z d „  d „ Z d „  Z	 d „  Z
 d „  Z RS(
   sW   args target exitcase llexitcase prevblock
                last_exception last_exc_valuec         C   sw   | d  j	 o* t | ƒ t | i ƒ j p
 t d ‚ n t | ƒ |  _ | |  _ | |  _ d  |  _ d  |  _	 d  |  _
 d  S(   Ns   output args mismatch(   R   t   lenR   t   AssertionErrorR)   t   argsR+   t   exitcaset	   prevblockt   last_exceptiont   last_exc_value(   R   RB   R+   RC   (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyR   |   s    *				c         C   s   | |  _  | |  _ d  S(   N(   RE   RF   (   R   RE   RF   (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyt	   extravars‰   s    	c         C   sX   g  } t  |  i t ƒ o | i |  i ƒ n t  |  i t ƒ o | i |  i ƒ n | S(   s+   Return the extra vars created by this Link.(   t
   isinstanceRE   R   t   appendRF   (   R   t   result(    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyt   getextravars   s    c         C   s   |  S(    (    (   t   x(    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyt   <lambda>–   s    c         C   s–   g  } |  i  D] } | | | ƒ q ~ } t | |  i |  i ƒ } |  i | _ | |  i ƒ | _ | |  i ƒ | _ t |  d ƒ o |  i | _ n | S(   Nt
   llexitcase(	   RB   R?   R+   RC   RD   RE   RF   R&   RN   (   R   t   renamet   _[1]t   at   newargst   newlink(    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyt   copy–   s    *c         C   s6   t  |  i ƒ t  | i ƒ j p
 t d ‚ | |  _ d  S(   Ns   output args mismatch(   R@   RB   R   RA   R+   (   R   t   targetblock(    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyt	   settarget    s    "c         C   s    d t  |  i ƒ t  |  i ƒ f S(   Ns   link from %s to %s(   t   strRD   R+   (   R   (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyR(   ¥   s    c         C   s   d d k  l } | |  ƒ d  S(   Niÿÿÿÿ(   t   try_show(   R5   RX   (   R   RX   (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyR8   ¨   s    N(   R9   R:   t   splitR;   R   R   RG   RK   RT   RV   R(   R8   (    (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyR?   w   s   		
		R   c           B   sn   e  Z d  i ƒ  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d „  Z
 d „  Z d	 „  Z d
 „  Z RS(   sM   isstartblock inputargs operations exitswitch
                exits blockcolorc         C   s7   t  |  _ t | ƒ |  _ g  |  _ d  |  _ g  |  _ d  S(   N(   t   FalseR   R)   R   R   R   t
   exitswitchR   (   R   R   (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyR   ±   s
    			c         C   s?   |  i  o- |  i  d i d j o d |  i  d i Sn d Sd  S(   Ni    s   @%dt    (   R   t   offset(   R   (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyt   at¹   s    !c         C   s‚   |  i  o d |  i  d i } n] |  i o  t |  i ƒ d j o
 d } n2 |  i o  t |  i ƒ d j o
 d } n d } | S(   Ns   block@%di    i   s   return blocki   s   raise blocks   codeless block(   R   R]   R   R@   R   (   R   t   txt(    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyR'   ¿   s    
!
!
c         C   sD   d t  |  ƒ t |  i ƒ f } |  i o d | |  i f } n | S(   Ns   %s with %d exitss   %s(%s)(   RW   R@   R   R[   (   R   R_   (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyR(   Ë   s    
c      	   C   st   |  i  } x. |  i D]# } | | i 7} | i | i ƒ q Wt g  } | D]! } t | t ƒ o | | qI qI ~ ƒ S(   s-   Return all variables mentioned in this Block.(   R   R   RB   RI   RJ   t   uniqueitemsRH   R   (   R   RJ   R2   RP   t   w(    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyt   getvariablesÑ   s    

 c      	   C   sd   |  i  } x |  i D] } | | i 7} q Wt g  } | D]! } t | t ƒ o | | q9 q9 ~ ƒ S(   s-   Return all constants mentioned in this Block.(   R   R   RB   R`   RH   t   Constant(   R   RJ   R2   RP   Ra   (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyt   getconstantsÙ   s
    

 c         C   s&  x( | D]  } t  | t ƒ p
 t | ‚ q Wg  } |  i D] } | | i | | ƒ q9 ~ |  _ x_ |  i D]T } g  } | i D] } | | i | | ƒ q| ~ | _ | i | i | i ƒ | _ qh W| i |  i |  i ƒ |  _ xD |  i	 D]9 } g  } | i D] } | | i | | ƒ qù ~ | _ qå Wd  S(   N(
   RH   R   RA   R   t   getR   RB   RJ   R[   R   (   R   t   mappingRQ   RP   R2   t   _[2]R0   t   _[3](    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyt   renamevariablesà   s     3
 3
 c         G   s+   |  i  g  j p
 t d ‚ |  i | Œ  d  S(   Ns   block already closed(   R   RA   t   recloseblock(   R   R   (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyt
   closeblockë   s    c         G   s'   x | D] } |  | _  q W| |  _ d  S(   N(   RD   R   (   R   R   t   exit(    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyRj   ï   s     c         C   s   d d k  l } | |  ƒ d  S(   Niÿÿÿÿ(   RX   (   R5   RX   (   R   RX   (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyR8   ô   s    (   R9   R:   RY   R;   R   R^   R'   R(   Rb   Rd   Ri   Rk   Rj   R8   (    (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyR   ­   s   									R   c           B   sŒ   e  Z d  d d g Z d Z h  e d f e <Z d „  Z e e ƒ Z d „  Z e e ƒ Z d d „ Z	 d „  Z
 d	 „  Z d
 „  Z d „  Z RS(   t   _namet   _nrt   concretetypet   vi    c         C   sc   |  i  } |  i } | d j o6 |  i } | | d } |  _ | | d f | | <n d | | f S(   Niÿÿÿÿi   s   %s%d(   Rm   Rn   t	   namesdict(   R   Rm   Rn   t   nd(    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyR     s    			c         C   s   |  i  |  i j	 S(   N(   Rm   t	   dummyname(   R   (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyt   renamed  s    c         C   s7   |  i  |  _ d |  _ | d  j	 o |  i | ƒ n d  S(   Niÿÿÿÿ(   Rs   Rm   Rn   R   RO   (   R   R   (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyR     s    	c         C   s   |  i  S(   N(   R   (   R   (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyR(     s    c         C   sº   |  i  |  i j	 o d  Sn t | ƒ t j	 o% | i  } | |  i j o d  Sq¤ nR | i t ƒ d } | d d j o d | } n |  i i | | d f ƒ d } | |  _  d |  _ d  S(   Nt   _i    t   9iÿÿÿÿ(	   Rm   Rs   t   typeRW   t	   translateR   Rq   t
   setdefaultRn   (   R   R   (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyRO     s    		c         C   s#   | i  | i |  _ | i |  _ d  S(   N(   R   Rm   Rn   (   R   Rp   (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyt   set_name_from0  s    c         C   s   t  | ƒ |  _ | |  _ d  S(   N(   t   internRm   Rn   (   R   R   t   nr(    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyt   set_name6  s    N(   R9   R:   R;   Rs   Rq   R   t   propertyRt   R   R   R(   RO   Rz   R}   (    (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyR   ù   s   							Rc   c           B   s   e  Z d  g Z d d „ Z RS(   Ro   c         C   s.   t  i |  | ƒ | d  j	 o | |  _ n d  S(   N(   R   R   R   Ro   (   R   t   valueRo   (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyR   ?  s    N(   R9   R:   R;   R   R   (    (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyRc   <  s   	t   UnwrapExceptionc           B   s   e  Z d  Z RS(   s   Attempted to unwrap a Variable.(   R9   R:   t   __doc__(    (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyR€   E  s   t   WrapExceptionc           B   s   e  Z d  Z RS(   sc   Attempted wrapping of a type that cannot sanely appear in flow graph or
    during its construction(   R9   R:   R   (    (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyR‚   H  s   t   SpaceOperationc           B   sD   e  Z d  i ƒ  Z d d „ Z d „  Z d „  Z d „  Z d „  Z RS(   s   opname args result offsetiÿÿÿÿc         C   s4   t  | ƒ |  _ t | ƒ |  _ | |  _ | |  _ d  S(   N(   R{   t   opnameR)   RB   RJ   R]   (   R   R„   RB   RJ   R]   (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyR   P  s    	c         C   sI   |  i  | i  j o6 |  i | i j o# |  i | i j o |  i | i j S(   N(   t	   __class__R„   RB   RJ   (   R   t   other(    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyt   __eq__V  s    c         C   s   |  | j S(   N(    (   R   R†   (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyt   __ne__\  s    c         C   s"   t  |  i t |  i ƒ |  i f ƒ S(   N(   t   hashR„   t   tupleRB   RJ   (   R   (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyt   __hash___  s    c         C   s,   d |  i  |  i d i t t |  i ƒ ƒ f S(   Ns   %r = %s(%s)s   , (   RJ   R„   t   joint   mapt   reprRB   (   R   (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyR(   b  s    (	   R9   R:   RY   R;   R   R‡   Rˆ   R‹   R(   (    (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyRƒ   M  s   			t   Atomc           B   s   e  Z d  „  Z d „  Z RS(   c         C   s   | |  _  d  S(   N(   R9   (   R   R   (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyR   g  s    c         C   s   |  i  S(   N(   R9   (   R   (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyR(   i  s    (   R9   R:   R   R(   (    (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyR   f  s   	RE   c         C   sI   g  } h  } x6 |  D]. } | | j o | i  | ƒ t | | <q q W| S(   s/   Returns a list with duplicate elements removed.(   RI   R   (   t   lstRJ   R-   t   item(    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyR`   s  s     c         C   s³   | i  } |  | ƒ t ƒ  } t | | <t | i d  d  d … ƒ } xj | ob | i ƒ  } |  | ƒ | i } | | j o2 |  | ƒ t | | <| | i d  d  d … 7} qE qE Wd  S(   Niÿÿÿÿ(   R   R   R   R)   R   R*   R+   (   t   visitt   functiongraphR,   R-   R.   R0   (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyt   traverse~  s    	
	
 
	

c         C   s   g  } t  | i |  ƒ | S(   N(   R”   RI   (   t	   funcgrapht   l(    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyt   flattenŽ  s    c          g   sD   x= |  D]5 } y  x t  | Œ  D] } | Vq WWq | Vq Xq Wd  S(   N(   t
   flattenobj(   RB   t   argt   atom(    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyR˜   “  s       c         C   sj   t  |  i ƒ  |  i ƒ } h  | g |  i <} x6 |  i ƒ  D]( } | i | i g  ƒ } | i | ƒ q: W| S(   s0   Returns a dict mapping Blocks to lists of Links.(   R?   R   R   R1   Ry   R+   RI   (   R•   t	   startlinkRJ   R0   R   (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyt
   mkentrymapš  s     c      
      s­  h  } ˆ i  ƒ  ‰ ˆ p ˆ  ‰ ‡ ‡ f d †  ‰ ‡  ‡ f d †  } x$ |  i ƒ  D] } | | ƒ | | <qP W|  i | j o | |  i ƒ | |  i <n |  i | j o | |  i ƒ | |  i <n xm | i ƒ  D]_ \ } } g  } x= | i D]2 }	 |	 i  ˆ ƒ }
 | |	 i |
 _ | i |
 ƒ qç W| i | Œ  qË W| |  i	 } t
 | _ t |  i | ƒ } | |  i | _ | |  i | _ x0 |  i i ƒ  D] \ } } | i i | | ƒ q†W| S(   s   Make a copy of a flow graph.c            s…   ˆ o |  Sn y ˆ  |  SWnc t  j
 oW t |  t ƒ o< t |  ƒ } ˆ  |  <t |  d ƒ o |  i | _ n | Sq |  Sn Xd  S(   NRo   (   t   KeyErrorRH   R   R&   Ro   (   Rp   t   v2(   t   varmapt   shallowvars(    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyt   copyvar©  s    c            s‡   t  g  } |  i D] } | ˆ | ƒ q ~ ƒ } |  i d j o d | _ n% ‡ ‡  f d †  } | |  i ƒ | _ ˆ |  i ƒ | _ | S(   Nc      	      s€   ˆ o	 |  Sn g  } xc |  D][ } t  | i g  } | i D] } | ˆ  | ƒ q: ~ ˆ  | i ƒ | i ƒ } | i | ƒ q W| S(   N(   Rƒ   R„   RB   RJ   R]   RI   (   t   oplistRJ   R2   RP   Rp   t   copyop(   R¡   t   shallow(    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyt
   copyoplist¼  s    	 	'(    (    (   R   R   R   R[   (   R,   RP   Rp   t   newblockR¥   (   R¤   R¡   (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyt	   copyblock·  s    0(   RT   R/   R   R	   t   itemsR   R+   RI   Rk   R   R   R   R   R   R
   Ry   (   t   graphR¤   RŸ   R    t   blockmapR§   R,   R¦   t   newlinksR0   RS   t   newstartblockt   newgrapht   keyR   (    (   R¤   R¡   RŸ   R    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyt	   copygraph£  s<      
 	 c            s  t  p d Sn y¿h  ‰ h  d |  i <d |  i <} xe | i ƒ  D]W \ } } t | i ƒ | j p t ‚ | i d j p t ‚ | i d j p t ‚ qC Wx,|  i	 ƒ  D]} t
 | i ƒ | |  i j j p t ‚ t | i ƒ t j p t d t | i ƒ i f ‚ | i p | | j p t ‚ n h  ‰  d ‡ ‡  f d † } d ‡  f d † } x | i D] } | | ƒ qcWxè | i D]Ý } xc | i D]X } t | t t f ƒ p t ‚ t | t ƒ o | | ƒ q‘| i t j	 p t ‚ q‘W| i d j o" t | i d t ƒ p t ‚ n3 | i d	 j o" t | i d t ƒ p t ‚ n | | i ƒ qWh  } | i d j oM t | i ƒ d j p t ‚ | i o" | i d i d j p t ‚ qnM| i t t ƒ j o¼ t | i ƒ d j p t ‚ | i d
 i d j p t ‚ t | i ƒ d j p t ‚ | i d i d j p t ‚ x½| i d D]0 }	 t |	 i t i i ƒ p t ‚ t | |	 <q_Wn{t | i t ƒ p t ‚ | i ˆ  j p t ‚ t | i ƒ d j o2 | i d i t  j o | i d i t j o nt | i ƒ d j p t ‚ g  }
 | i D] }	 |
 |	 i q;~
 } | d
 d j } xª | t | ƒ |  D]” } t | t! t" f ƒ o qyn t | t# t$ f ƒ o t | ƒ d j o qyn | d j p
 t d ‚ | d j	 p
 t d ‚ t d | f ƒ ‚ qyWh  } x| i D]t}	 t |	 i ƒ t |	 i% i ƒ j p t ‚ |	 i& | j p t ‚ |	 | j } | ob x |	 i |	 i' g D]G } t | t t f ƒ p t ‚ t | t ƒ o | | d |	 ƒqqWn/ |	 i d j p t ‚ |	 i' d j p t ‚ x{ |	 i D]p } t | t t f ƒ p t ‚ t | t ƒ o= | | d |	 ƒ| o" | | i d
 i j p t ‚ q„qqWt | |	 i <q!Wt | ƒ t | i ƒ j p t ‚ ˆ i( ˆ  ƒ q« WWnD t j
 o8 } | o% t) | d ƒ o t* | d | ƒ n ‚  n Xd S(   s&   Check the consistency of a flow graph.Ni   i   s=   block.exits is a %s (closeblock() or recloseblock() missing?)c            sa   t  |  t ƒ p t ‚ |  ˆ j p t d |  f ‚ |  ˆ  j p t d |  f ‚ | ˆ |  <d  S(   Ns   duplicate variable %rs'   variable %r used in more than one block(   RH   R   RA   (   Rp   t   only_in_link(   t   vars_previous_blockst   vars(    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyt	   definevarý  s
    c            sR   |  ˆ  j p t  ‚ | d  j	 o- ˆ  |  d  j p ˆ  |  | j p t  ‚ n d  S(   N(   RA   R   (   Rp   t   in_link(   R²   (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyt   usevar  s    t   direct_calli    t   indirect_calliÿÿÿÿt	   keepalivet   cast_pointert   same_ast   defaults1   'default' branch of a switch is not the last exits/   exitswitch Variable followed by a None exitcases"   switch on a non-primitive value %rR°   R´   t   __annotator_block(    (    (   R¸   R¹   Rº   (+   t	   __debug__R   R	   R¨   R@   R   RA   R   R   R/   t   boolR   R   Rw   RŠ   R9   R   RB   RH   Rc   R   R   RE   R„   RJ   R[   RC   t
   issubclasst   pyt   builtint   BaseExceptionR   RZ   t   intt   longRW   t   unicodeR+   RD   RF   t   updateR&   t   setattr(   R©   t
   exitblocksR,   t   nbargsR³   Rµ   Rp   R2   t	   exc_linksR0   RP   t   casest   has_defaultt   nt   allexitcasest   exc_linkt   e(    (   R²   R±   s,   /64/home/arigo/u/pypy/objspace/flow/model.pyt
   checkgraphä  sÌ      &

 
 
 ""
&   -' )
 ) 
 *#c         C   si   h  } x\ |  i  ƒ  D]N } xE | i D]: } | i d j o$ | i | i d ƒ d | | i <q# q# Wq W| S(   NRº   i    i   (   R/   R   R„   Re   (   R©   t   insnsR,   R2   (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyt   summaryg  s     
 ,c         c   s°   t  |  d d  ƒ } | Vh  t | <} t t  | d g  ƒ d  d  d … ƒ } x^ | oV | i ƒ  i } | | j o6 | Vt | | <| t  | d g  ƒ d  d  d … 7} qN qN Wd  S(   NR   R   iÿÿÿÿ(   t   getattrR   R   R)   R*   R+   (   R©   R,   R-   R.   (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyt   safe_iterblocksp  s    % 
c         c   sº   t  |  d d  ƒ } h  t | <} t t  | d g  ƒ d  d  d … ƒ } xm | oe | i ƒ  } | Vt  | d d  ƒ } | | j o1 t | | <| t  | d g  ƒ d  d  d … 7} qI qI Wd  S(   NR   R   iÿÿÿÿR+   (   RÔ   R   R   R)   R*   (   R©   R,   R-   R.   R0   (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pyt   safe_iterlinks~  s    % 
(%   RÀ   t   pypy.tool.uidR    R   t   pypy.tool.descriptorR   R   R   R   t   pypy.tool.identity_dictR   Rw   t   __metaclass__t   objectR   R?   R   R   Rc   t	   ExceptionR€   R‚   Rƒ   R   RE   t   c_last_exceptionR`   R”   R—   R˜   Rœ   RZ   R¯   RÑ   RÓ   RÕ   RÖ   (    (    (    s,   /64/home/arigo/u/pypy/objspace/flow/model.pys   <module>   s4   T6LC							A	ƒ			
