
    i;                       d Z ddlmZ ddlmZ ddl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mZmZ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"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z, ddl-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z;m<Z<m=Z=m>Z>m?Z?m@Z@ dd	lAmBZB dd
lCmDZD ddlEmFZF ddlGmHZHmIZI ddlJmKZKmLZLmMZMmNZN ddlOmPZPmQZQmRZRmSZSmTZTmUZUmVZV ddlWmXZXmYZY ddlZm[Z[m\Z\m]Z]m^Z^ ddl_m`Z`maZambZb ddlcmdZd ddlemfZf ddlgmhZh ddlimjZj ddlkmlZl eg df         Zmdjd(Zndkd-Zodld5Zpdmd6Zqdnd8Zrdmd9Zsdod<ZtdpdAZudqdCZv	 	 drdsdJZw G dK dI          Zx G dL dMex          Zy G dN dOex          Zz G dP dQex          Z{dtdSZ| G dT dUex          Z} G dV dWex          Z~ G dX dYe~          Z G dZ d[e~          Z G d\ d]e~          Z G d^ d_ex          Z G d` daex          Z G db dcex          Z G dd deex          ZdudgZdvdiZdS )wzHelpers for generating for loops and comprehensions.

We special case certain kinds for loops such as "for x in range(...)"
for better efficiency.  Each for loop generator class below deals one
such special case.
    )annotations)Callable)ClassVarcast)ARG_POSCallExprDictionaryComprehension
ExpressionGeneratorExprListExprLvalue
MemberExprNameExprRefExprSetExprStarExpr	TupleExpr	TypeAliasVar)LiteralType	TupleTypeget_proper_typeget_proper_types)	ERR_NEVER
BasicBlockBranchIntegerIntOpLoadAddressLoadErrorValueLoadLiteralLoadMem
MethodCallRaiseStandardErrorRegisterTupleGetTupleSetValue)	RInstanceRTupleRTypeRVecbool_rprimitivec_pyssize_t_rprimitiveint_rprimitiveis_dict_rprimitiveis_fixed_width_rtypeis_immutable_rprimitiveis_list_rprimitiveis_sequence_rprimitiveis_short_int_rprimitiveis_str_rprimitiveis_tuple_rprimitiveobject_pointer_rprimitiveobject_rprimitivepointer_rprimitiveshort_int_rprimitive)	IRBuilderconstant_fold_expr)GENERATOR_HELPER_NAME)AssignmentTargetAssignmentTargetTuple)
vec_append
vec_createvec_get_item_unsafevec_init_item_unsafe)dict_check_size_opdict_item_iter_opdict_key_iter_opdict_next_item_opdict_next_key_opdict_next_value_opdict_value_iter_op)no_err_occurred_oppropagate_if_error_op)aiter_opanext_opiter_opnext_op)list_append_oplist_get_item_unsafe_opnew_list_set_item_op)stop_async_iteration_op)CFunctionDescription)
set_add_op)str_get_item_unsafe_op)tuple_get_item_unsafe_opNbuilderr<   indexr   exprr
   
body_instsGenFunc
else_instsGenFunc | Noneis_asyncboollineintreturnNonec           	        t                      }t                      }t                      }	t                      }
||	n|
}t          | ||||||          }|                     ||
           t                      }|                     |           |                                 |                     |           |                                  |             |                     |           |                                 |                     |           |	                    |           | 
                                 |4|                     |	            |             |                     |
           |                     |
           dS )a  Generate IR for a loop.

    Args:
        index: the loop index Lvalue
        expr: the expression to iterate over
        body_insts: a function that generates the body of the loop
        else_insts: a function that generates the else block instructions
    N)rb   )r   make_for_loop_generatorpush_loop_stackgoto_and_activategen_conditionactivate_block
begin_bodygen_stepgotoadd_cleanuppop_loop_stack)r[   r\   r]   r^   r`   rb   rd   
body_block
step_block
else_block
exit_blocknormal_loop_exitfor_gencondition_blocks                 X/root/projects/qq-shell/venv/lib64/python3.11/site-packages/mypyc/irbuild/for_helpers.pyfor_loop_helperr{   _   s   $ JJJJ &0%;zz%j*:D8  G J
333 llOo...  :&&&JLLL j)))LL!!!()))z***
Z   :&&&&&    expr_regr(   Callable[[Value], None]lengthc                   t          |j                  s+t          |j        t                    sJ ||j        f            |                     |          }t                      }t                      }	t                      }
t                      }t          | |||
|d          }|                    ||d|           |                     |	|
           t          |t                    r6|j
        dk    r+|                     |           |                     |           n|                     |           |                                 |                     |           |                                  ||                     |j        |                     |                     |	           |                                 |                     |           |                    |
           |                                  |                     |
           dS )a}  Generate IR for a sequence iteration.

    This function only works for sequence type. Compared to for_loop_helper,
    it would feed iteration index to body_insts.

    Args:
        index: the loop index Lvalue
        expr: the expression to iterate over
        body_insts: a function that generates the body of the loop.
                    It needs a index as parameter.
    F)reverser   r   N)r4   type
isinstancer,   get_sequence_typer   ForSequenceinitrj   r   valuerp   rm   rk   rl   rn   readindex_targetro   rq   rr   )r[   r\   r]   r}   r^   rd   r   target_typers   rt   rv   ry   rx   s                rz   for_loop_helper_with_indexr      s   ( "(-00 Jx}d4S4S  V    ++D11KJJJ llO'5*j$NNGLL;fLEEEJ
333&'"" 3v|a'7'7Z   ////!!/222:&&&Jw||G0$77888j)))LL!!!
###:&&&&&r|   genr   empty_op_llbuilderCallable[[Value, int], Value]set_item_op*Callable[[Value, Value, Value, int], None]Value | Nonec           	         t          j                  dk    rt          j                  dk    rt          j        d                   dk    rj        j        d         }                     |          }t          |          st          |t          t          f          sdS t          |t                    rt           j        |                   }t          |t                    s
J |            |j        sdS t          |j                  }t          d |D                       rd |D             }n1                     |          fdt#          |          D             }t%          t'           j        |                    }	                     |	          n                     |          t-           |d          }
 ||
          d fd}t/           j        d         |||
           S dS )a	  Generate a new tuple or list from a simple generator expression.

    Currently we only optimize for simplest generator expression, which means that
    there is no condition list in the generator and only one original sequence with
    one index is allowed.

    e.g.  (1) tuple(f(x) for x in a_list/a_tuple/a_str/a_bytes/an_rtuple)
          (2) list(f(x) for x in a_list/a_tuple/a_str/a_bytes/an_rtuple)
          (3) [f(x) for x in a_list/a_tuple/a_str/a_bytes/an_rtuple]

    Args:
        empty_op_llbuilder: A function that can generate an empty sequence op when
            passed in length. See `new_list_op_with_length` and `new_tuple_op_with_length`
            for detailed implementation.
        set_item_op: A primitive that can modify an arbitrary position of a sequence.
            The op should have three arguments:
                - Self
                - Target position
                - New Value
            See `new_list_set_item_op` and `new_tuple_set_item_op` for detailed
            implementation.
       r   Nc              3  @   K   | ]}t          |t                    V  d S N)r   r   .0typs     rz   	<genexpr>z=sequence_from_generator_preallocate_helper.<locals>.<genexpr>  s,      HHC:c;//HHHHHHr|   c                h    g | ]/}t          t          t          |          j        t                    0S  )r!   r   r   r   r9   r   s     rz   
<listcomp>z>sequence_from_generator_preallocate_helper.<locals>.<listcomp>  s@            [# 6 6 <>OPP     r|   c                    g | ]E\  }}t          |t                    rt          |j        t                    nt          |          FS r   )r   r   r!   r   r9   r&   )r   ir   rd   sequences      rz   r   z>sequence_from_generator_preallocate_helper.<locals>.<listcomp>  s_           3 &c;779CI/@AAA%h488	     r|   Tuse_pyssize_t
item_indexr(   rf   rg   c                X                         j                  } | |           d S r   )accept	left_expr)r   er[   r   rd   r   	target_ops     rz   set_itemz<sequence_from_generator_preallocate_helper.<locals>.set_item"  s2    s}--AK	:q$77777r|   )r   r(   rf   rg   )len	sequencesindices	condlistsrd   	node_typer4   r   r*   r,   r   typesr   itemsr   allr   	enumeratelistmapadd	new_tupleget_expr_length_valuer   )r[   r   r   r   sequence_exprrtypeproper_typeproper_typesget_item_opsr   r   r   rd   r   r   s   `` `        @@@rz   *sequence_from_generator_preallocate_helperr      sh   8 3=Q3s{#3#3q#8#8SqAQ=R=RVW=W=Wxa(!!-00&u-- 	EFD>1R1R 	4eV$$ "	5 *'-*FGGKk955BB{BBB $ t+K,=>>L HH<HHHHH    +      #>>-88          #,L"9"9      W[,7788E((55HH ~~m44H&wx]abbb&&vt44		8 	8 	8 	8 	8 	8 	8 	8 	8 	8 	#S[^]Hhf	
 	
 	
 4r|   c                    t                     r                                 S d fd	}t            j        j        |
          }||S                                           g j                            t          t          j
        j        j        j                            }d fd}t           ||j                                        j                  S )Nxr(   yzrd   re   rf   rg   c                F                         t          | ||g|           d S r   )call_crU   r   r   r   rd   r[   s       rz   r   z.translate_list_comprehension.<locals>.set_item2  s&    +aAY=====r|   r   r   c                                          j                  }                     t                              j                  | gj                   d S r   )r   r   primitive_oprS   r   rd   )r   r[   r   list_opss    rz   gen_inner_stmtsz5translate_list_comprehension.<locals>.gen_inner_stmtsC  sN    NN3=))^gll8SX.N.NPQ-RTWT\]]]]]r|   
r   r(   r   r(   r   r(   rd   re   rf   rg   rf   rg   ))raise_error_if_contains_unreachable_namesnoner   r[   new_list_op_with_lengthmaybe_spillnew_list_oprd   r   zipr   r   r   rb   comprehension_helperr   )r[   r   r   valloop_paramsr   r   s   ``    @rz   translate_list_comprehensionr   .  s   0#>> ||~~> > > > > > 5"?B	  C 
""7#6#6r38#D#DEEHs3;s}clSSTTK^ ^ ^ ^ ^ ^ ^ ^ +III<<#(+++r|   'GeneratorExpr | DictionaryComprehensionc                    t          d |j        D                       r7t          t          j        d|j                  }|                     |           dS dS )zRaise a runtime error and return True if generator contains unreachable names.

    False is returned if the generator can be safely transformed without crashing.
    (It may still be unreachable!)
    c              3  R   K   | ]"}t          |t                    o|j        d u V  #d S r   )r   r   node)r   ss     rz   r   z<raise_error_if_contains_unreachable_names.<locals>.<genexpr>S  s7      
K
K!:a""5qv~
K
K
K
K
K
Kr|   z+mypyc internal error: should be unreachableTF)anyr   r$   RUNTIME_ERRORrd   r   )r[   r   errors      rz   r   r   K  s`     
K
Ks{
K
K
KKK ",9H
 

 	Et5r|   c                    t                     r                                 S                                           g j                            t          t          j        j        j	        j
                            }d fd}t           ||j                                        j                  S )Nrf   rg   c                                          j                  }                     t                              j                  | gj                   d S r   )r   r   r   rX   r   rd   )r   r[   r   set_opss    rz   r   z4translate_set_comprehension.<locals>.gen_inner_stmtsf  sK    NN3=))Z',,w*I*I1)MsxXXXXXr|   r   )r   r   r   
new_set_oprd   r   r   r   r   r   rb   r   r   )r[   r   r   r   r   s   ``  @rz   translate_set_comprehensionr   _  s    0#>> ||~~!!'"4"4R"B"BCCGs3;s}clSSTTKY Y Y Y Y Y Y Y +III<<***r|   vec_typer,   c           	     ~    d fd	}t            fd
|          }||S t                                         t           j        dj                  j                   t          t          j        j	        j
        j                            }d fd}t           ||j                   S )Nr   r(   r   r   rd   re   rf   rg   c                8    t          j        | |||           d S r   )rE   r[   r   s       rz   r   z-translate_vec_comprehension.<locals>.set_itemo  s!    W_aAt<<<<<r|   c                2    t          j        | |          S r   )rC   r[   )r   rd   r[   r   s     rz   <lambda>z-translate_vec_comprehension.<locals>.<lambda>v  s    
OXvt1
 1
 r|   r   r   c            	                              j                  }                     t          j        | j                  j                   d S r   )r   r   assignrB   r[   rd   )r   r[   r   vecs    rz   r   z4translate_vec_comprehension.<locals>.gen_inner_stmts  sF    NN3=))sJwQII38TTTTTr|   r   r   )r   r%   r   rC   r[   rd   r   r   r   r   r   rb   r   )r[   r   r   r   r   r   r   r   s   ```    @rz   translate_vec_comprehensionr   n  s   = = = = = = 5
 
 
 
 
   C 

8

CNN3
7?HaJJCHUUUs3;s}clSSTTKU U U U U U U U +IIIJr|   r   7list[tuple[Lvalue, Expression, list[Expression], bool]]r   Callable[[], None]c                F     d fdd fd	 |           d
S )a  Helper function for list comprehensions.

    Args:
        loop_params: a list of (index, expr, [conditions]) tuples defining nested loops:
            - "index" is the Lvalue indexing that loop;
            - "expr" is the expression for the object to be iterated over;
            - "conditions" is a list of conditions, evaluated in order with short-circuiting,
                that must all be true for the loop body to be executed
        gen_inner_stmts: function to generate the IR for the body of the innermost loop
    r   r   rf   rg   c           	     \      d         \  }}}t          || fdd|           dS )zGenerate IR for a loop.

        Given a list of (index, expression, [conditions]) tuples, generate IR
        for the nested loops the list defines.
        r   c                 ,      dd                    S Nr   r   )condsloop_contentsr   s   rz   r   z;comprehension_helper.<locals>.handle_loop.<locals>.<lambda>  s    MM%QRR99 r|   N)rb   rd   )r{   )r   r\   r]   rb   r   r[   rd   r   s   `   @rz   handle_loopz)comprehension_helper.<locals>.handle_loop  s^     (31~$tUH999999	
 	
 	
 	
 	
 	
r|   r   list[Expression]remaining_loop_paramsc                p   | D ]}                     |          }t                      t                      }}                    |||                               |           j        d                             |j                                       |           |r |          S               dS )aa  Generate the body of the loop.

        Args:
            conds: a list of conditions to be evaluated (in order, with short circuiting)
                to gate the body of the loop
            remaining_loop_params: the parameters for any further nested loops; if it's empty
                we'll instead evaluate the "gen_inner_stmts" function
        N)r   r   add_bool_branchrm   nonlocal_controlgen_continuerd   rk   )	r   r   condcond_val
cont_block
rest_blockr[   r   r   s	         rz   r   z+comprehension_helper.<locals>.loop_contents  s      	2 	2D~~d++H%/\\:<<
J##Hj*EEE"":...$R(55gtyIII%%j1111  	;4555 Or|   N)r   r   rf   rg   )r   r   r   r   rf   rg   r   )r[   r   r   rd   r   r   s   ` ``@@rz   r   r     so    "
 
 
 
 
 
 
 
"       < Kr|   r   c                b    | j         dk    p$t          | j        t                    o
| j         dk    S )Nbuiltins.rangezsix.moves.xrange)fullnamer   r   r   )r]   s    rz   is_range_refr    s6    )) 	0di++ 0M//r|   Frs   r   	loop_exitnestedForGeneratorc                f   |rk|                      |          }t          | |||||          }	|                     |          }
|                     |
          }|	                    ||           |	S |                     |          }t          |          st          |t                    rX|                      |          }| 	                    |          }t          | |||||          }|                    ||d           |S t          |          rV|                      |          }|                     |          }t          | |||||          }|                    ||           |S t          |t                    rt          |j        t                     rt#          |j                  rt%          |j                  dk    s:t%          |j                  dk    r`|                     |j        d                   ?t+          |j                  t.          hk    r t%          |j                  dk    r0t1          d          }|                      |j        d                   }n@|                      |j        d                   }|                      |j        d                   }t%          |j                  dk    rQ|                     |j        d                   }|J |dk    r&|                     d|j        d         j                   nd}t7          | |||||          }|                    |||           |S |j        j        d	k    rt%          |j                  dk    r|j        t.          gk    rt          |t:                    rjt%          |j                  dk    rR|j        d         }|j        d         }t?          | |||||          }|                    |||j        d                    |S |j        j        d
k    rt%          |j                  dk    rt+          |j                  t.          hk    rut          |t:                    r`t%          |j                  t%          |j                  k    r6tA          | |||||          }|                    |j        |j                   |S |j        j        dk    rt%          |j                  dk    r|j        t.          gk    rt          |                     |j        d                             rc|                      |j        d                   }| 	                    |          }t          | |||||          }|                    ||d           |S t          |t                    r<t          |j        tB                    r!|j        s|                     |j        j"                  }t          |          r|j        j#        dv r|                      |j        j"                  }d}|j        j#        dk    r'|                     |j        j"                  }t          }n]|j        j#        dk    r'| $                    |j        j"                  }tJ          }n&| &                    |j        j"                  }tN          } || |||||          }|                    ||           |S d}t          |tP                    rddl)m*}  || |          }||}||                      |          }|j+        }t          |tX                    r4|j-        .                    t^                    rta          | |||||          }ntc          | |||||          }|                     |          }
|                     |
          }|                    ||           |S )zReturn helper object for generating a for loop over an iterable.

    If "nested" is True, this is a nested iterator such as "e" in "enumerate(e)".
    F)r         Nr   r   zrange() step can't be zerobuiltins.enumeratebuiltins.zipbuiltins.reversedT)keysvaluesr   r  r  )precompute_set_literal)2r   ForAsyncIterable_analyze_iterable_item_typetype_to_rtyper   r   r4   r   r,   r   r   r0   get_dict_key_typeForDictionaryKeysr   calleer   r  r   argsextract_intset	arg_kindsr   r   r   rd   ForRanger  r   r   ForEnumerateForZipr   r]   nameget_dict_value_typeForDictionaryValuesget_dict_item_typeForDictionaryItemsr   mypyc.irbuild.expressionr  r   r)   class_ir
has_methodr?   ForNativeGeneratorForIterable) r[   r\   r]   rs   r  rd   rb   r  r}   	async_obj	item_type
item_rtypertypr   for_listfor_dict	start_regend_regstep	for_rangelvalue1lvalue2for_enumeratefor_zipr   for_dict_typefor_dict_geniterable_expr_regr  set_literalitfor_objs                                    rz   ri   ri     s@      >>$''$WeZDRXYY	77==	**955
x,,,T""Dd## z$'='= >>$''//55wz9dFSShU;;;$ >>$''//55$WeZDRXYYh,,,$!! Ejg&F&F E%%6	 DI!##	NNa''G,?,?	!,M,M,YDN##y00 49~~""#*1::	!..166#NN49Q<88	!..16649~~""**49Q<88'''199MM">	!@QRRR %YfUUINN9gt444 K $888DI!##7)++5),, ,EK  A%% k!nGk!nG(%YPTV\]]Mw1>>>   K N22DI!##DN##y005),, 1EK  C	NN22 WeZD&QQGLLdi000N K $777DI!##7)++&w'8'81'F'FGG , ~~dil33H!33D99K"7E:y$PVWWHMM(KM>>>O$!!  jj&I&I  RVR[  !!$+"233e$$ 	 )9=X)X)X~~dk&677H7;M{6))%778HII 1!X--%99$+:JKK 3%889IJJ 2(=%YPTV\]]Lh444&*$   ,CCCCCC,,Wd;;" +  #NN400		B"i   SR[%;%;<Q%R%R S$WeZDRXYY guj)T6RR33D99I&&y11JLL"J///Nr|   c                  R    e Zd ZdZddZddZddZddZddZddZ	ddZ
d dZdS )!r  z-Abstract base class for generating for loops.r[   r<   r\   r   rs   r   r  rd   re   r  rc   rf   rg   c                    || _         || _        || _        || _        |                                 r|st                      | _        d S || _        d S r   )r[   r\   rs   rd   need_cleanupr   r  )selfr[   r\   rs   r  rd   r  s          rz   __init__zForGenerator.__init__w  sY     
$	  	'v 	''\\DNNN 'DNNNr|   c                    dS )z0If this returns true, we need post-loop cleanup.Fr   r=  s    rz   r<  zForGenerator.need_cleanup  s    ur|   rv   c                    |                                  rO| j                            | j                   |                                  | j                            |           dS dS )z!Add post-loop cleanup, if needed.N)r<  r[   rm   r  gen_cleanuprp   )r=  rv   s     rz   rq   zForGenerator.add_cleanup  sf     	*L''777Lj)))))	* 	*r|   c                    dS )z<Generate check for loop exit (e.g. exhaustion of iteration).Nr   r@  s    rz   rl   zForGenerator.gen_condition        r|   c                    dS )z6Generate ops at the beginning of the body (if needed).Nr   r@  s    rz   rn   zForGenerator.begin_body  rD  r|   c                    dS )z/Generate stepping to the next item (if needed).Nr   r@  s    rz   ro   zForGenerator.gen_step  rD  r|   c                    dS )z'Generate post-loop cleanup (if needed).Nr   r@  s    rz   rB  zForGenerator.gen_cleanup  rD  r|   r]   Value | AssignmentTargetr(   c                    | j         j                             | j                             || j                  | j        d          S )z>A helper to get collection length, used by several subclasses.Tr   )r[   builtin_lenr   rd   )r=  r]   s     rz   load_lenzForGenerator.load_len  sA    |#//LdDI..	 0 
 
 	
r|   N)r[   r<   r\   r   rs   r   r  r   rd   re   r  rc   rf   rg   rf   rc   )rv   r   rf   rg   r   )r]   rH  rf   r(   )__name__
__module____qualname____doc__r>  r<  rq   rl   rn   ro   rB  rK  r   r|   rz   r  r  t  s        77' ' ' '2   * * * *K K K KE E E E> > > >6 6 6 6
 
 
 
 
 
r|   c                  B    e Zd ZdZddZdd
ZddZddZddZddZ	dS )r%  zIGenerate IR for a for loop over an arbitrary iterable (the general case).rf   rc   c                    dS NTr   r@  s    rz   r<  zForIterable.need_cleanup      tr|   r}   r(   r   r+   rg   c                    | j         }|                    t          |g| j                  }|                    |           |                    |          | _        || _        d S r   )r[   r   rQ   rd   r   iter_targetr   r=  r}   r   r[   iter_regs        rz   r   zForIterable.init  s^     ,''(TYGGH%%%"..x88&r|   c                   | j         }| j        }|                    t          |                    | j        |          g|          | _        |                    t          | j        | j	        | j
        t          j                             d S r   )r[   rd   r   rR   r   rV  next_regr   r   r  rs   IS_ERRORr=  r[   rd   s      rz   rl   zForIterable.gen_condition  sm    
 ,ywd>NPT1U1U0VX\]]F4=$.$/6?[[\\\\\r|   c                    | j         }| j        }|                    | j        | j        |          }|                    |                    | j                  ||           d S r   r[   rd   coercerZ  r   r   get_assignment_targetr\   r=  r[   rd   rZ  s       rz   rn   zForIterable.begin_body  Z     ,y >>$-1A4HHw44TZ@@(DQQQQQr|   c                    d S r   r   r@  s    rz   ro   zForIterable.gen_step      r|   c                R    | j                             t          g | j                   d S r   r[   r   rM   rd   r@  s    rz   rB  zForIterable.gen_cleanup  s'    
 	.DI>>>>>r|   NrL  r}   r(   r   r+   rf   rg   r   
rM  rN  rO  rP  r<  r   rl   rn   ro   rB  r   r|   rz   r%  r%    s        SS   ' ' ' '] ] ] ]R R R R   ? ? ? ? ? ?r|   r%  c                  B    e Zd ZdZddZdd
ZddZddZddZddZ	dS )r$  z3Generate IR for a for loop over a native generator.rf   rc   c                    dS rS  r   r@  s    rz   r<  zForNativeGenerator.need_cleanup  rT  r|   r}   r(   r   r+   rg   c                V    | j         }|                    |          | _        || _        d S r   )r[   r   rV  r   )r=  r}   r   r[   s       rz   r   zForNativeGenerator.init  s/     ,"..x88&r|   c           	        | j         }| j        }t          t                    | _        |                    t          t          d                    }|                    | j        ||           |                    t          t          | j                            }|
                                }t          |                    | j        |          t          |||||g|          }t          |_        |                    |          | _        |                    t%          | j        | j        | j        t$          j                             d S )NT)	undefines)r[   rd   r%   r9   return_valuer   r    r   r   r8   none_objectr#   r   rV  r?   r   
error_kindrZ  r   r  rs   r[  )r=  r[   rd   errptrnnhelper_calls          rz   rl   z ForNativeGenerator.gen_condition  s   ,y$%677kk.):dKKKLLt(#t444 kk+&?ARSSTT  "" LL)400!RS!	
 
 "+K00F4=$.$/6?[[\\\\\r|   c                    | j         }| j        }|                    | j        | j        |          }|                    |                    | j                  ||           d S r   r^  ra  s       rz   rn   zForNativeGenerator.begin_body  rb  r|   c                    d S r   r   r@  s    rz   ro   zForNativeGenerator.gen_step  rd  r|   c                ^    | j                             t          | j        g| j                   d S r   )r[   r   rN   rn  rd   r@  s    rz   rB  zForNativeGenerator.gen_cleanup  s-     	!!"7$:K9LdiXXXXXr|   NrL  rg  r   rh  r   r|   rz   r$  r$    s        ==   ' ' ' '] ] ] ]4R R R R   Y Y Y Y Y Yr|   r$  c                  2    e Zd ZdZddZdd	Zdd
ZddZdS )r  z"Generate IR for an async for loop.r}   r(   r   r+   rf   rg   c                    | j         }|                    t          |g| j                  }|                    |           |                    |          | _        || _        t          t                    | _	        d S r   )
r[   r   rO   rd   r   rV  r   r%   r-   stop_regrW  s        rz   r   zForAsyncIterable.init  si    
 ,>>(XJ	BBH%%%"..x88& 11r|   c                    ddl mm}  j         j        d	fd}d
 fd}d
 fd} |||fd |fgd                                t           j         j         j	        t          j
                             d S )Nr   )
emit_awaittransform_try_exceptrf   r(   c                                          t          t          t          j                            }                      t          t          j        | d                    S )NT)borrow)r   r   r:   rV   srcr"   r   )addrr[   rd   s    rz   except_matchz4ForAsyncIterable.gen_condition.<locals>.except_match:  sL    ;;{+=?V?Z\`aabbD;;w'>'CTRVWWWXXXr|   rg   c                                          t                              j                  g          }  |           _                            j                                                   d S r   )r   rP   r   rV  rZ  r   rz  false)	awaitabler[   r|  rd   r=  s    rz   try_bodyz0ForAsyncIterable.gen_condition.<locals>.try_body>  si    x',,t?OQU2V2V1WY]^^I&Jw	4@@DMNN4='--//4@@@@@r|   c                 d                          j                                                    d S r   )r   rz  true)r[   rd   r=  s   rz   except_bodyz3ForAsyncIterable.gen_condition.<locals>.except_bodyC  s)    NN4=',,..$?????r|   )rf   r(   r   )mypyc.irbuild.statementr|  r}  r[   rd   r   r   rz  r  rs   BOOL)r=  r}  r  r  r  r[   r|  rd   s   `    @@@rz   rl   zForAsyncIterable.gen_condition*  s!    	MLLLLLLL,y	Y 	Y 	Y 	Y 	Y 	Y 	Y	A 	A 	A 	A 	A 	A 	A 	A 	A
	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@ 	X,!5t[ IJDRV	
 	
 	
 	F4=$.$/6;WWXXXXXr|   c                    | j         }| j        }|                    | j        | j        |          }|                    |                    | j                  ||           d S r   r^  ra  s       rz   rn   zForAsyncIterable.begin_bodyL  rb  r|   c                    d S r   r   r@  s    rz   ro   zForAsyncIterable.gen_stepV  rd  r|   Nrg  r   rM  rN  rO  rP  r   rl   rn   ro   r   r|   rz   r  r    ss        ,,
2 
2 
2 
2 Y  Y  Y  YDR R R R     r|   r  targetc                   t          |j                  r|                     t          ||g|          S t	          |j                  r|                     t          ||g|          S t          |j                  r|                     t          ||g|          S t          |j        t                    rt          | j        |||          S |                     |d|gd|          S )z.Emit a potentially unsafe index into a target.__getitem__N)r3   r   r   rT   r7   r   rZ   r6   rY   r   r,   rD   r[   gen_method_call)r[   r  r\   rd   s       rz   unsafe_indexr  [  s    
 &+&& 	S##$;fe_dSSS	V[	)	) S~~6NNN	6;	'	' S~~4vuotLLL	FK	&	& S"7?FE4HHH&&v}ugtTRRRr|   c                  B    e Zd ZU dZded<   	 dddZddZddZddZdS )r   zoGenerate optimized IR for a for loop over a sequence.

    Supports iterating in both forward and reverse.
    zValue | AssignmentTarget | None
length_regNr}   r(   r   r+   r   rc   r   r   rf   rg   c                   t          |j                  s+t          |j        t                    sJ ||j        f            | j        }|| _        || _        |                    |          | _        t          |j                  r:|                    | j        p| 
                    | j                            | _        nd | _        |st          dt                    }n]| j        !|                    | j        | j                  }n| 
                    | j                  }|j                            |d          }|                    |          | _        || _        d S )Nr   r   )r4   r   r   r,   r[   r   r   r   expr_targetr2   rK  r  r   r.   r   rd   int_submaybe_spill_assignabler   r   )r=  r}   r   r   r   r[   	index_reglen_vals           rz   r   zForSequence.initt  sM    &hm44 	

8=RV8W8W 	
 	
MZ
 	
 	
 	
 , #..x88"8=11 	#%11$+2`tO_A`A`aaDOO #DO 	<&q*@AAII*!,,t	BB--(899//;;I#::9EE&r|   c                H   | j         }| j        }| j        r}|                    |                    | j        |          t          d          d|          }t                      }|                    ||| j	                   |
                    |           | j        |                     | j                  }n|                    | j        |          }|                    |                    | j        |          |d|          }|                    || j        | j	                   d S )Nr   z>=<)r[   rd   r   	binary_opr   r   r   r   r   r  rm   r  rK  r  rs   )r=  r[   rd   
comparisonsecond_checklen_regs         rz   rl   zForSequence.gen_condition  s   ,y< 
	1
 !**T.55wqzz4 J &<<L##JdnMMM""<000?" mmD$455GG ll4?D99G&&w||D4Et'L'LgWZ\`aa

DOT^LLLLLr|   c                D   | j         }| j        }t          ||                    | j        |          |                    | j        |          |          }|sJ |                    |                    | j                  |	                    || j
        |          |           d S r   )r[   rd   r  r   r  r   r   r`  r\   r_  r   )r=  r[   rd   	value_boxs       rz   rn   zForSequence.begin_body  s    ,y LL)400LL*D11	
 
	  	))$*55NN9d&6==	
 	
 	
 	
 	
r|   c                    | j         }| j        }| j        sdnd}|j                             |                    | j        |          |          }|                    | j        ||           d S )Nr   r   )r[   rd   r   int_addr   r   r   )r=  r[   rd   r.  r   s        rz   ro   zForSequence.gen_step  sg    ,y,qq"o%%gll43Dd&K&KTRRt(#t44444r|   r   )
r}   r(   r   r+   r   rc   r   r   rf   rg   r   )	rM  rN  rO  rP  __annotations__r   rl   rn   ro   r   r|   rz   r   r   l  s          
 0/// Z^' ' ' ' 'BM M M M0
 
 
 
(5 5 5 5 5 5r|   r   c                  P    e Zd ZU dZded<   ded<   ddZddZddZddZddZ	dS )ForDictionaryCommona  Generate optimized IR for a for loop over dictionary keys/values.

    The logic is pretty straightforward, we use PyDict_Next() API wrapped in
    a tuple, so that we can modify only a single register. The layout of the tuple:
      * f0: are there more items (bool)
      * f1: current offset (int)
      * f2: next key (object)
      * f3: next value (object)
    For more info see https://docs.python.org/3/c-api/dict.html#c.PyDict_Next.

    Note that for subclasses we fall back to generic PyObject_GetIter() logic,
    since they may override some iteration methods in subtly incompatible manner.
    The fallback logic is implemented in CPy.h via dynamic type check.
    zClassVar[CFunctionDescription]dict_next_opdict_iter_oprf   rc   c                    dS rS  r   r@  s    rz   r<  z ForDictionaryCommon.need_cleanup  	     tr|   r}   r(   r   r+   rg   c                   | j         }|| _        |                    |          | _        t	          d          }|                    |          | _        |                    |                     | j                            | _        |	                    | j
        |g| j                  }|                    |          | _        d S Nr   )r[   r   r   r  r   r  offset_targetrK  sizer   r  rd   rV  )r=  r}   r   r[   offsetrX  s         rz   r   zForDictionaryCommon.init  s    ,& #..x88$;;FCC''d6F(G(GHH	 >>$"3hZKK"..x88r|   c                $   | j         }| j        }| j                             | j        |                    | j        |          |                    | j        |          g|          | _        |                    t          | j        d|                    }|
                    | j        ||           |                    t          | j        d|                    }|                    t          || j        | j        t          j                             dS )zIGet next key/value pair, set new offset, and check if we should continue.r   r   N)r[   rd   r   r  r   rV  r  
next_tupler   r&   r   r   rs   r  r  )r=  r[   rd   
new_offsetshould_continues        rz   rl   z!ForDictionaryCommon.gen_condition  s    ,y,--\\$*D117<<@RTX3Y3YZ
 
 [[$/1d!C!CDD
t):t<<<!++ht4&H&HIIF?DOT^V[YYZZZZZr|   c                    | j         }| j        }|                    t          |                    | j        |          |                    | j        |          g|           dS )zCheck that dictionary didn't change size during iteration.

        Raise RuntimeError if it is not the case to match CPython behavior.
        N)r[   rd   r   rF   r   r  r  r\  s      rz   ro   zForDictionaryCommon.gen_step  sa    
 ,y\\$*D117<<	43P3PQ	
 	
 	
 	
 	
r|   c                R    | j                             t          g | j                   d S r   rf  r@  s    rz   rB  zForDictionaryCommon.gen_cleanup  s%    .DI>>>>>r|   NrL  rg  r   )
rM  rN  rO  rP  r  r<  r   rl   ro   rB  r   r|   rz   r  r    s           10000000   
9 9 9 9[ [ [ ["
 
 
 
? ? ? ? ? ?r|   r  c                  "    e Zd ZdZeZeZddZdS )r  z:Generate optimized IR for a for loop over dictionary keys.rf   rg   c                   | j         }| j        }|                    t          | j        d|                    }|                    |                    | j                  |                    || j	        |          |           d S Nr  
r[   rd   r   r&   r  r   r`  r\   r_  r   )r=  r[   rd   keys       rz   rn   zForDictionaryKeys.begin_body  s}    ,y kk(4?At<<==))$*55NN3 0$77	
 	
 	
 	
 	
r|   Nr   )	rM  rN  rO  rP  rJ   r  rH   r  rn   r   r|   rz   r  r    s8        DD#L#L

 

 

 

 

 

r|   r  c                  "    e Zd ZdZeZeZddZdS )r  z<Generate optimized IR for a for loop over dictionary values.rf   rg   c                   | j         }| j        }|                    t          | j        d|                    }|                    |                    | j                  |                    || j	        |          |           d S r  r  )r=  r[   rd   r   s       rz   rn   zForDictionaryValues.begin_body-  s}    ,y HT_a>>??))$*55NN5$"2D99	
 	
 	
 	
 	
r|   Nr   )	rM  rN  rO  rP  rK   r  rL   r  rn   r   r|   rz   r  r  '  s8        FF%L%L

 

 

 

 

 

r|   r  c                  "    e Zd ZdZeZeZddZdS )r   z;Generate optimized IR for a for loop over dictionary items.rf   rg   c                r   | j         }| j        }|                    t          | j        d|                    }|                    t          | j        d|                    }t          | j        t                    sJ | j                    |                    || j        j	        d         |          }|                    || j        j	        d         |          }|
                    | j                  }t          |t                    rtt          |j                  dk    r|                    d|           |                    |j        d         ||           |                    |j        d         ||           d S |                    t#          ||g|                    }|                    |||           d S )Nr  r  r   r   z'Expected a pair for dict item iteration)r[   rd   r   r&   r  r   r   r*   r_  r   r`  r\   rA   r   r   r   r   r'   )r=  r[   rd   r  r   r  rvalues          rz   rn   zForDictionaryItems.begin_body@  s   ,ykk(4?At<<==HT_a>>?? $*F33EET5EEEEnnS$"2"8";TBBud&6&<Q&?FF..tz::f344 	16<  A%%GNNNNN6<?C666NN6<?E488888[[3,!=!=>>FNN66400000r|   Nr   )	rM  rN  rO  rP  rI   r  rG   r  rn   r   r|   rz   r   r   :  s8        EE$L$L1 1 1 1 1 1r|   r   c                  2    e Zd ZdZdd	Zdd
ZddZddZdS )r  z;Generate optimized IR for a for loop over an integer range.r,  r(   r-  r.  re   rf   rg   c                l   | j         }|| _        || _        || _        |                    |          | _        t          |j                  rt          |j                  rt          }n#t          |j                  r|j        }nt          }t          || j                  }|                    ||| j                   |                    |          | _        |                    | j                  | _        |                    | j        |                    | j        | j                  | j                   d S )N)rd   )r[   r,  r-  r.  r   
end_targetr5   r   r;   r1   r/   r%   rd   r   r  r  r`  r\   r   r   )r=  r,  r-  r.  r[   
index_typer  s          rz   r   zForRange.init[  s   ,"	!--g66"9>22 	(7Nw|7\7\ 	( 4JJ!',// 	( JJ'JZdi888	y)TY777 77	BB9@9V9VW[Wa9b9bt(',,t~ty*Q*QSWS\]]]]]r|   c                   | j         }| j        }| j        dk    rdnd}|                    |                    | j        |          |                    | j        |          ||          }|                    || j        | j	                   d S )Nr   r  >)
r[   rd   r.  r  r   r  r  r   rs   r  )r=  r[   rd   cmpr  s        rz   rl   zForRange.gen_conditionn  s    ,yY]]cc&&LL..T_d0S0SUXZ^
 

 	
DOT^LLLLLr|   c                    | j         }|                    | j        |                    | j        | j                  | j                   d S r   r[   r   r   r   r  rd   )r=  r[   s     rz   rn   zForRange.begin_bodyx  s@     ,t(',,t~ty*Q*QSWS\]]]]]r|   c                   | j         }| j        }t          | j        j                  rmt          | j        j                  rT|                    t          |                    | j	        |          t          | j                  t          j        |          }nC|                    |                    | j	        |          t          | j                  d|          }|                    | j	        ||           d S )N+)r[   rd   r5   r,  r   r-  int_opr;   r   r  r   r.  r   ADDr  r   r=  r[   rd   new_vals       rz   ro   zForRange.gen_step  s    ,y #4>#677 	<SL=
 =
 	 nn$T^T22	""	 GG ''T^T22GDI4F4FT G 	t~w55555r|   N)r,  r(   r-  r(   r.  re   rf   rg   r   r  r   r|   rz   r  r  X  sv        EE^ ^ ^ ^&M M M M^ ^ ^ ^6 6 6 6 6 6r|   r  c                  *    e Zd ZdZddZddZddZdS )	ForInfiniteCounterzAGenerate optimized IR for a for loop counting from 0 to infinity.rf   rg   c                    | j         }t          d          }|                    |          | _        |                    | j                  | _        d S r  )r[   r   r  r  r`  r\   r   )r=  r[   zeros      rz   r   zForInfiniteCounter.init  sK    , qzz 77==9@9V9VW[Wa9b9br|   c                    | j         }| j        }|                    t          |                    | j        |          t          d          t          j        |          }|	                    | j        ||           d S r   )
r[   rd   r  r;   r   r  r   r   r  r   r  s       rz   ro   zForInfiniteCounter.gen_step  sk    ,y .. ',,t~t"D"DgajjRWR[]a
 
 	t~w55555r|   c                    | j                             | j        | j                             | j        | j                  | j                   d S r   r  r@  s    rz   rn   zForInfiniteCounter.begin_body  sH    t|00KKTY	
 	
 	
 	
 	
r|   Nr   )rM  rN  rO  rP  r   ro   rn   r   r|   rz   r  r    sZ        KKc c c c	6 	6 	6 	6
 
 
 
 
 
r|   r  c                  B    e Zd ZdZddZddZddZddZddZddZ	dS )r  zIGenerate optimized IR for a for loop of form "for i, x in enumerate(it)".rf   rc   c                    dS rS  r   r@  s    rz   r<  zForEnumerate.need_cleanup  r  r|   index1r   index2r]   r
   rg   c           	         t          | j        || j        | j        | j        d          | _        | j                                         t          | j        ||| j        | j        | j        d          | _        d S )NTr  )	r  r[   rs   r  rd   	index_genr   ri   main_gen)r=  r  r  r]   s       rz   r   zForEnumerate.init  sv    +L&$/4>49UY
 
 
 	/L&$[_
 
 
r|   c                8    | j                                          d S r   )r  rl   r@  s    rz   rl   zForEnumerate.gen_condition  s    ##%%%%%r|   c                j    | j                                          | j                                         d S r   )r  rn   r  r@  s    rz   rn   zForEnumerate.begin_body  s0    !!###  """""r|   c                j    | j                                          | j                                         d S r   )r  ro   r  r@  s    rz   ro   zForEnumerate.gen_step  s0    !!!     r|   c                j    | j                                          | j                                         d S r   )r  rB  r  r@  s    rz   rB  zForEnumerate.gen_cleanup  s0    ""$$$!!#####r|   NrL  )r  r   r  r   r]   r
   rf   rg   r   rh  r   r|   rz   r  r    s        SS   
	
 	
 	
 	
& & & &# # # #! ! ! !$ $ $ $ $ $r|   r  c                  B    e Zd ZdZddZdd
ZddZddZddZddZ	dS )r  z?Generate IR for a for loop of form `for x, ... in zip(a, ...)`.rf   rc   c                    dS rS  r   r@  s    rz   r<  zForZip.need_cleanup  r  r|   indexeslist[Lvalue]exprsr   rg   c           
     ~   t          |          t          |          k    sJ d t          t          |          dz
            D             | j        gz   | _        g | _        t          ||| j                  D ]E\  }}}t          | j        |||| j        | j	        d          }| j        
                    |           Fd S )Nc                *    g | ]}t                      S r   )r   )r   _s     rz   r   zForZip.init.<locals>.<listcomp>  s    JJJQJLLJJJr|   r   Tr  )r   rangers   cond_blocksgensr   ri   r[   r  rd   append)r=  r  r  r\   r]   
next_blockr   s          rz   r   zForZip.init  s    7||s5zz)))) KJ%Gq8H2I2IJJJdoM^^(*	'*7E4;K'L'L 	" 	"#E4)eT:t~tyY]  C IS!!!!		" 	"r|   c                    t          | j                  D ]Y\  }}|                                 |t          | j                  dz
  k     r%| j                            | j        |                    Zd S r   )r   r  rl   r   r[   rm   r  )r=  r   r   s      rz   rl   zForZip.gen_condition  sv    	** 	A 	AFAs3ty>>A%%%++D,<Q,?@@@	A 	Ar|   c                B    | j         D ]}|                                 d S r   )r  rn   r=  r   s     rz   rn   zForZip.begin_body  s0    9 	 	CNN	 	r|   c                B    | j         D ]}|                                 d S r   )r  ro   r  s     rz   ro   zForZip.gen_step  s,    9 	 	CLLNNNN	 	r|   c                B    | j         D ]}|                                 d S r   )r  rB  r  s     rz   rB  zForZip.gen_cleanup  s0    9 	 	COO	 	r|   NrL  )r  r  r  r   rf   rg   r   rh  r   r|   rz   r  r    s        II   

" 
" 
" 
"A A A A           r|   r  
int | Nonec                X    t           |          }t          |t          t          f          rt	          |          S t          |t
          t          f          rI fd|j        D             }d |vr0t          d |j        D                       }|t          |          z   S nJt          |t                    rt           |j                  S t          |t                    rjt          |j        t                    rP|j        j        rDt          |j        j        t                    r%|j        j        rt	          |j        j                  S t          |t$                    rt          |j        x}t(                    rnt+          d |j        D                       rO|j        }|dv r3t	          |j                  dk    rt           |j        d                   S |dk    r3t	          |j                  dk    rt           |j        d                   S |d	k    rC|j        r< fd
|j        D             }t+          d |D                       rt3          |          S n|dk    rt	          |j                  dk    rq fd|j        D             }t+          d |D                       rE	 t	          t5          t7          t8          t:                   |                     S # t<          $ r Y nw xY w                     |          }	t          |	t@                    rt	          |	j!                  S d S )Nc                Z    g | ]'}t          |t                    t          |          (S r   )r   r   get_expr_length)r   r   r[   s     rz   r   z#get_expr_length.<locals>.<listcomp>  s3    \\\JqRZD[D[\!,,\\\r|   c              3  B   K   | ]}t          |t                     V  d S r   )r   r   )r   r   s     rz   r   z"get_expr_length.<locals>.<genexpr>  s/      HHJq(333HHHHHHr|   c              3  ,   K   | ]}|t           k    V  d S r   )r   )r   kinds     rz   r   z"get_expr_length.<locals>.<genexpr>  s&      ;;D;;;;;;r|   )zbuiltins.listzbuiltins.tupler	  zbuiltins.sortedr  r   r   zbuiltins.mapr  r
  c                0    g | ]}t          |          S r   )r  r   argr[   s     rz   r   z#get_expr_length.<locals>.<listcomp>(  s#    NNNS?7C88NNNr|   c              3     K   | ]}|d uV  	d S r   r   r   r  s     rz   r   z"get_expr_length.<locals>.<genexpr>)  s&      ::s3d?::::::r|   r   r  c                0    g | ]}t          |          S r   r=   r  s     rz   r   z#get_expr_length.<locals>.<listcomp>,  s$    QQQ-gs;;QQQr|   c              3  @   K   | ]}t          |t                    V  d S r   )r   re   r   s     rz   r   z"get_expr_length.<locals>.<genexpr>-  s,      ??C:c3''??????r|   )"r>   r   strbytesr   r   r   r   sumr   r  r]   r   r   r   is_finalfinal_valuehas_explicit_valuer   r  r   r   r  r  r  minr  r   r   re   
ValueErrorr   r*   r   )
r[   r]   foldedstarsotherr  r  arg_lengthsfolded_argsr   s
   `         rz   r  r    s@   ..F&3,'' 16{{	D8Y/	0	0 / ]\\\dj\\\uHHTZHHHHHE3u::%%  
D(	#	# (w	2224!!&ty#&&& I& ty,c22	&
 I(& 49()))4"",vh77 ;;DN;;;;;
 ?  DI!##"7DIaL999''C	NNa,?,?"7DIaL999''DI'NNNNDINNNK::k::::: (;'''()))c$)nn.A.AQQQQtyQQQK??;????? ud49k&B&BCDDD!   D d##E%    5;4s   (3K 
K)(K)r   c                0   |                      |          }t          |          s&t          |t          t          f          s
J |            t          | |          }|| j                            |||          S t          ||rt          nt                    S )Nr   )r   r4   r   r*   r,   r  r[   rJ  r   r.   r;   )r[   r]   r}   rd   r   r   r   s          rz   r   r   ?  s     d##E!%((TJuvtn,M,MTTuTTTWd++F~**8T*WWW6]\11H\]]]r|   )r[   r<   r\   r   r]   r
   r^   r_   r`   ra   rb   rc   rd   re   rf   rg   )r[   r<   r\   r   r]   r
   r}   r(   r^   r~   rd   re   r   r(   rf   rg   )
r[   r<   r   r   r   r   r   r   rf   r   )r[   r<   r   r   rf   r(   )r[   r<   r   r   rf   rc   )r[   r<   r   r,   r   r   rf   r(   )
r[   r<   r   r   r   r   rd   re   rf   rg   )r]   r   rf   rc   )FF)r[   r<   r\   r   r]   r
   rs   r   r  r   rd   re   rb   rc   r  rc   rf   r  )
r[   r<   r  r(   r\   r(   rd   re   rf   r(   )r[   r<   r]   r
   rf   r  )r[   r<   r]   r
   r}   r(   rd   re   r   rc   rf   r(   )rP  
__future__r   collections.abcr   typingr   r   
mypy.nodesr   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   
mypy.typesr   r   r   r   mypyc.ir.opsr   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   mypyc.ir.rtypesr)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   mypyc.irbuild.builderr<   mypyc.irbuild.constant_foldr>   mypyc.irbuild.preparer?   mypyc.irbuild.targetsr@   rA   mypyc.irbuild.vecrB   rC   rD   rE   mypyc.primitives.dict_opsrF   rG   rH   rI   rJ   rK   rL   mypyc.primitives.exc_opsrM   rN   mypyc.primitives.generic_opsrO   rP   rQ   rR   mypyc.primitives.list_opsrS   rT   rU   mypyc.primitives.misc_opsrV   mypyc.primitives.registryrW   mypyc.primitives.set_opsrX   mypyc.primitives.str_opsrY   mypyc.primitives.tuple_opsrZ   r_   r{   r   r   r   r   r   r   r   r  ri   r  r%  r$  r  r  r   r  r  r  r   r  r  r  r  r  r   r   r|   rz   <module>r&     s    # " " " " " $ $ $ $ $ $ ! ! ! ! ! ! ! !                                 " Q P P P P P P P P P P P                                 "                                         * , + + + + + : : : : : : 7 7 7 7 7 7 I I I I I I I I _ _ _ _ _ _ _ _ _ _ _ _                  O N N N N N N N M M M M M M M M M M M M c c c c c c c c c c = = = = = = : : : : : : / / / / / / ; ; ; ; ; ; ? ? ? ? ? ?
2t8
;' ;' ;' ;'|7' 7' 7' 7'tT T T Tn, , , ,:   (+ + + +   8@ @ @ @F    \ \ \ \ \~7
 7
 7
 7
 7
 7
 7
 7
t.? .? .? .? .?, .? .? .?b9Y 9Y 9Y 9Y 9Y 9Y 9Y 9Yx= = = = =| = = =@S S S S"[5 [5 [5 [5 [5, [5 [5 [5|G? G? G? G? G?, G? G? G?T
 
 
 
 
+ 
 
 
&
 
 
 
 
- 
 
 
&1 1 1 1 1, 1 1 1<<6 <6 <6 <6 <6| <6 <6 <6~
 
 
 
 
 
 
 
8!$ !$ !$ !$ !$< !$ !$ !$H$ $ $ $ $\ $ $ $N> > > >B
^ 
^ 
^ 
^ 
^ 
^r|   