o
    iz                     @   s   d dl Z d dlZd dlZd dlmZ d dlmZ d dlmZ edv r)e	g dZ
nedv r4e	g dZ
neeG d	d
 d
eZG dd de ddZG dd de jZG dd deZG dd deZdS )    N)Loc)UnsupportedError)	PYVERSION)      )
SETUP_LOOPFOR_ITER
SETUP_WITHBEFORE_WITHLOAD_SPECIAL)r   
   r      r      r      )r   r	   r
   r   c                   @   s$   e Zd Zdd Zdd Zdd ZdS )CFBlockc                 C   s"   || _ g | _i | _i | _d| _d S )NF)offsetbodyoutgoing_jumpsincoming_jumpsterminating)selfr    r   T/home/ubuntu/transcripts/venv/lib/python3.10/site-packages/numba/core/controlflow.py__init__   s
   
zCFBlock.__init__c                 C   s    | j t| jt| jf}d| S )Nz,block(offset:%d, outgoing: %s, incoming: %s))r   sortedr   r   )r   argsr   r   r   __repr__$   s
   zCFBlock.__repr__c                 C   
   t | jS N)iterr   r   r   r   r   __iter__*      
zCFBlock.__iter__N)__name__
__module____qualname__r   r!   r&   r   r   r   r   r      s    r   c                   @   s$   e Zd ZdZdZdd Zdd ZdS )Loopz?
    A control flow loop, as detected by a CFGraph object.
    r   c                 C   s   t |to
|j| jkS r#   )
isinstancer+   headerr   otherr   r   r   __eq__;      zLoop.__eq__c                 C   r"   r#   )hashr-   r%   r   r   r   __hash__>   r'   zLoop.__hash__N)r(   r)   r*   __doc__	__slots__r0   r3   r   r   r   r   r+   .   s
    r+   )entriesexitsr-   r   c                   @   s(   e Zd ZdZdd Zdd Zdd ZdS )	_DictOfContainerszA defaultdict with customized equality checks that ignore empty values.

    Non-empty value is checked by: `bool(value_item) == True`.
    c                 C   s&   t |tr|  }| }||kS tS r#   )r,   r8   _non_empty_itemsNotImplemented)r   r/   minetheirsr   r   r   r0   H   s
   
z_DictOfContainers.__eq__c                 C   s   |  |}|tu r|S | S r#   )r0   r:   )r   r/   retr   r   r   __ne__P   s   
z_DictOfContainers.__ne__c                 C   s   dd t |  D S )Nc                 S   s   g | ]
\}}|r||fqS r   r   ).0kvsr   r   r   
<listcomp>X   s    z6_DictOfContainers._non_empty_items.<locals>.<listcomp>)r   itemsr%   r   r   r   r9   W   r1   z"_DictOfContainers._non_empty_itemsN)r(   r)   r*   r4   r0   r>   r9   r   r   r   r   r8   B   s
    r8   c                   @   s  e Zd ZdZdd Zdd Zdsd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d Zejdd Zejdd Zejdd  Zejd!d" Zejd#d$ Zejd%d& Zejd'd( Zejd)d* Zejd+d, Zejd-d. Zejd/d0 Zd1d2 Zd3d4 Zd5d6 Zd7d8 Z d9d: Z!d;d< Z"d=d> Z#d?d@ Z$dAdB Z%dtdDdEZ&dsdFdGZ'dudIdJZ(dsdKdLZ)dMdN Z*dsdOdPZ+dQdR Z,dSdT Z-dUdV Z.dWdX Z/dYdZ Z0d[d\ Z1dtd]d^Z2d_d` Z3dadb Z4dsdcddZ5dedf Z6dgdh Z7didj Z8dkdl Z9dmdn Z:dodp Z;dqdr Z<dS )vCFGraphzB
    Generic (almost) implementation of a Control Flow Graph.
    c                 C   s,   t  | _tt | _tt | _i | _d | _d S r#   )set_nodesr8   _preds_succs
_edge_data_entry_pointr%   r   r   r   r   `   s
   


zCFGraph.__init__c                 C   s   | j | dS )z
        Add *node* to the graph.  This is necessary before adding any
        edges from/to the node.  *node* can be any hashable object.
        N)rF   addr   noder   r   r   add_nodeg      zCFGraph.add_nodeNc                 C   sJ   || j vrtd|| j f || j vrtd|| j f | ||| dS )z
        Add an edge from node *src* to node *dest*, with optional
        per-edge *data*.
        If such an edge already exists, it is replaced (duplicate edges
        are not possible).
        z.Cannot add edge as src node %s not in nodes %sz/Cannot add edge as dest node %s not in nodes %sN)rF   
ValueError	_add_edge)r   srcdestdatar   r   r   add_edgen   s   

zCFGraph.add_edgec                 c   s*    | j | D ]}|| j||f fV  qdS )z
        Yield (node, data) pairs representing the successors of node *src*.
        (*data* will be None if no data was specified when adding the edge)
        N)rH   rI   )r   rR   rS   r   r   r   
successors}      zCFGraph.successorsc                 c   s*    | j | D ]}|| j||f fV  qdS )z
        Yield (node, data) pairs representing the predecessors of node *dest*.
        (*data* will be None if no data was specified when adding the edge)
        N)rG   rI   )r   rS   rR   r   r   r   predecessors   rW   zCFGraph.predecessorsc                 C   s   || j v sJ || _dS )z=
        Set the entry point of the graph to *node*.
        N)rF   rJ   rL   r   r   r   set_entry_point   s   
zCFGraph.set_entry_pointc                 C   s   | j du r	td|   dS )z
        Compute essential properties of the control flow graph.  The graph
        must have been fully populated, and its entry point specified. Other
        graph properties are computed on-demand.
        Nzno entry point defined!)rJ   RuntimeError_eliminate_dead_blocksr%   r   r   r   process   s   
zCFGraph.processc                 C      | j S )z
        Return a dictionary of {node -> set(nodes)} mapping each node to
        the nodes dominating it.

        A node D dominates a node N when any path leading to N must go through D
        )_domsr%   r   r   r   
dominators      zCFGraph.dominatorsc                 C   r]   )z
        Return a dictionary of {node -> set(nodes)} mapping each node to
        the nodes post-dominating it.

        A node P post-dominates a node N when any path starting from N must go
        through P.
        )
_post_domsr%   r   r   r   post_dominators   s   zCFGraph.post_dominatorsc                 C   r]   )z
        Return a dictionary of {node -> node} mapping each node to its
        immediate dominator (idom).

        The idom(B) is the closest strict dominator of V
        )_idomr%   r   r   r   immediate_dominators   r`   zCFGraph.immediate_dominatorsc                 C   r]   )a.  
        Return a dictionary of {node -> set(nodes)} mapping each node to
        the nodes in its dominance frontier.

        The dominance frontier _df(N) is the set of all nodes that are
        immediate successors to blocks dominated by N but which aren't
        strictly dominated by N
        )_dfr%   r   r   r   dominance_frontier   s   	zCFGraph.dominance_frontierc                 C   r]   )z
        return a dictionary of {node -> set(nodes)} mapping each node to
        the set of nodes it immediately dominates

        The domtree(B) is the closest strict set of nodes that B dominates
        )_domtreer%   r   r   r   dominator_tree   r`   zCFGraph.dominator_treec                 C      |   S r#   )_find_exit_pointsr%   r   r   r   _exit_points      zCFGraph._exit_pointsc                 C   ri   r#   )_find_dominatorsr%   r   r   r   r^      rl   zCFGraph._domsc                 C   ri   r#   )_find_back_edgesr%   r   r   r   _back_edges   rl   zCFGraph._back_edgesc                 C   ri   r#   )_find_topo_orderr%   r   r   r   _topo_order   rl   zCFGraph._topo_orderc                 C   ri   r#   )_find_descendentsr%   r   r   r   _descs   rl   zCFGraph._descsc                 C   ri   r#   )_find_loopsr%   r   r   r   _loops   rl   zCFGraph._loopsc                 C   ri   r#   )_find_in_loopsr%   r   r   r   	_in_loops   rl   zCFGraph._in_loopsc                 C   ri   r#   )_find_post_dominatorsr%   r   r   r   ra      rl   zCFGraph._post_domsc                 C   ri   r#   )_find_immediate_dominatorsr%   r   r   r   rc      rl   zCFGraph._idomc                 C   ri   r#   )_find_dominance_frontierr%   r   r   r   re      rl   zCFGraph._dfc                 C   ri   r#   )_find_dominator_treer%   r   r   r   rg      rl   zCFGraph._domtreec                 C   s
   | j | S )zx
        Return the set of descendents of the given *node*, in topological
        order (ignoring back edges).
        )rs   rL   r   r   r   descendents   s   
zCFGraph.descendentsc                 C   s   | j dusJ | j S )z.
        Return the entry point node.
        N)rJ   r%   r   r   r   entry_point  s   zCFGraph.entry_pointc                 C   r]   )zG
        Return the computed set of exit nodes (may be empty).
        )rk   r%   r   r   r   exit_points     zCFGraph.exit_pointsc                 C   s   | j | j S )z
        Return the set of nodes constituting the graph's backbone.
        (i.e. the nodes that every path starting from the entry point
         must go through).  By construction, it is non-empty: it contains
         at least the entry point.
        )ra   rJ   r%   r   r   r   backbone  s   zCFGraph.backbonec                 C   r]   )z
        Return a dictionary of {node -> loop} mapping each loop header
        to the loop (a Loop instance) starting with it.
        ru   r%   r   r   r   loops     zCFGraph.loopsc                    s    fdd j |dD S )zm
        Return the list of Loop objects the *node* belongs to,
        from innermost to outermost.
        c                    s   g | ]} j | qS r   r   )r?   xr%   r   r   rB   #      z$CFGraph.in_loops.<locals>.<listcomp>r   )rw   getrL   r   r%   r   in_loops  s   zCFGraph.in_loopsc                 C   r]   )zK
        Return the set of dead nodes (eliminated from the graph).
        )_dead_nodesr%   r   r   r   
dead_nodes%  r   zCFGraph.dead_nodesc                 C   r]   )z/
        Return the set of live nodes.
        )rF   r%   r   r   r   nodes+  r   zCFGraph.nodesc                 C   r]   )zb
        Return the sequence of nodes in topological order (ignoring back
        edges).
        )rq   r%   r   r   r   
topo_order1  r   zCFGraph.topo_orderFc                 c   s8    t |}| j}|rt|}|D ]	}||v r|V  qdS )z
        Iterate over the *nodes* in topological order (ignoring back edges).
        The sort isn't guaranteed to be stable.
        N)rE   rq   reversed)r   r   reverseitnr   r   r   	topo_sort8  s   zCFGraph.topo_sortc                 C   s   ddl }|ptj}	 td|d | | td|d |j | j|d td|d |j | j|d td	t| j|d td
|d |j | j	|d td|d |j | j
|d td|d |j |  |d dS )z3
        Dump extensive debug information.
        r   N   zCFG adjacency lists:filezCFG dominators:streamzCFG post-dominators:zCFG back edges:z
CFG loops:zCFG node-to-loops:zCFG backbone:)pprintsysstdoutprint_dump_adj_listsr^   ra   r   ro   ru   rw   r   )r   r   r   r   r   r   dumpE  s    

zCFGraph.dumpnumba_cfg.dotc                 C   s~   zddl }W n ty   tdw |j|d}| jD ]	}|t| q| jD ]}| j| D ]}|t|t| q/q(|S )zRender the controlflow graph with GraphViz DOT via the
        ``graphviz`` python binding.

        Returns
        -------
        g : graphviz.Digraph
            Use `g.view()` to open the graph in the default PDF application.
        r   NzcThe feature requires `graphviz` but it is not available. Please install with `pip install graphviz`)filename)graphvizImportErrorDigraphrF   rM   strrH   edge)r   r   gvgr   r   r   r   r   
render_dotZ  s   


zCFGraph.render_dotc                 C   s2   | j | | | j| | || j||f< d S r#   )rG   rK   rH   rI   )r   from_torT   r   r   r   rQ   w  s   zCFGraph._add_edgec                 C   sd   | j |dD ]}| j| | | j||f= q| j|dD ]}| j | | | j||f= qd S )Nr   )rH   poprG   removerI   )r   rM   succpredr   r   r   _remove_node_edges~  s   zCFGraph._remove_node_edgesc                 c   sj    |d u r	| j f}t }t|}|r3| }||vr/|V  || | j| D ]}|| q'|sd S d S r#   )rJ   rE   listr   rK   rH   append)r   r6   seenstackrM   r   r   r   r   _dfs  s   
zCFGraph._dfsc                 C   sJ   t  }|  D ]}|| q| j| | _|| _| jD ]}| | qdS )zx
        Eliminate all blocks not reachable from the entry point, and
        stash them into self._dead_nodes.
        N)rE   r   rK   rF   r   r   )r   liverM   deadr   r   r   r[     s   
zCFGraph._eliminate_dead_blocksc                 C   s,   t  }| jD ]}| j|s|| q|S )z2
        Compute the graph's exit points.
        )rE   rF   rH   r   rK   )r   r~   r   r   r   r   rj     s   

zCFGraph._find_exit_pointsc                    s\   | j | j g t g  fdd| jfgr, \}}|| s S )Nc                    sR   | vr% |  j| f |  D ]}| |f vr$|f qd S d S r#   rK   r   rM   rS   
back_edgesdfs_rec
post_orderr   r   succsr   r   r     s   
z(CFGraph._find_postorder.<locals>.dfs_rec)rH   ro   rE   rJ   r   )r   cbrT   r   r   r   _find_postorder  s   zCFGraph._find_postorderc                    s    fdd}| j }| j}|  }dd t|D ||i |  |  d}|rRd}|D ]!}t| fdd|| D }| vsI | |krO| |< d}q.|s* S )	Nc                    sd   | |kr0|  | k r |  } |  | k s|  | kr, | }|  | ks | |ks| S r#   r   )uvidomidxr   r   	intersect  s   z5CFGraph._find_immediate_dominators.<locals>.intersectc                 S   s   i | ]\}}||qS r   r   )r?   ier   r   r   
<dictcomp>  r   z6CFGraph._find_immediate_dominators.<locals>.<dictcomp>TFc                 3   s    | ]	}| v r|V  qd S r#   r   )r?   r   )r   r   r   	<genexpr>  s    z5CFGraph._find_immediate_dominators.<locals>.<genexpr>)rJ   rG   r   	enumerater   r   	functoolsreduce)r   r   entrypreds_tableorderchangedr   new_idomr   r   r   ry     s*   

z"CFGraph._find_immediate_dominatorsc                 C   sL   | j }tt}| D ]\}}||vrt ||< ||kr#|| | q|S r#   )rc   r8   rE   rC   rK   )r   r   domtreer   r   r   r   r   r{     s   
zCFGraph._find_dominator_treec                 C   sv   | j }| j}dd |D }|D ])}t|| dk rq|| D ]}||| kr7|| | || }||| ks&qq|S )Nc                 S   s   i | ]}|t  qS r   )rE   )r?   r   r   r   r   r         z4CFGraph._find_dominance_frontier.<locals>.<dictcomp>   )rc   rG   lenrK   )r   r   r   dfr   r   r   r   r   rz     s   z CFGraph._find_dominance_frontierc           
         s  |rt | j}| j}| j}nt | jg}| j}| j}|s tdi  |D ]	}t |g |< q$g }| jD ]}||vrEt | j |< || q3|r| }||v rQqFt |g}|| }	|	rl|t	
t j fdd|	D O }| | krt|t | k s~J | |< |||  |sH S )Nz5no entry points: dominator algorithm cannot be seededc                    s   g | ]} | qS r   r   )r?   pdomsr   r   rB   +  r   z5CFGraph._find_dominators_internal.<locals>.<listcomp>)rE   rk   rH   rG   rJ   rZ   rF   r   r   r   r   intersectionr   extend)
r   postr6   r   succs_tabler   todor   new_domspredsr   r   r   _find_dominators_internal  sD   




z!CFGraph._find_dominators_internalc                 C   s   | j ddS )NFr   )r   r%   r   r   r   rm   2     zCFGraph._find_dominatorsc                 C   s   t  }| j| | j D ]}|js|jD ]}| || qq| jdd}||= | D ]}|	| q-| 
| | j| |S )NTr   )objectrk   rK   ru   valuesr7   r   rQ   r   discardr   r   )r   
dummy_exitloopbpdomsr   r   r   r   rx   5  s   

zCFGraph._find_post_dominatorsc           
         s   |durt |tstdt| |dd t }g i   }t } fdd}|| d}rh|d7 }d }| }|r]| }	|	v rT|||	f n|	|vr\||	 n	  || s6|durt|d  |7  < |S )	zu
        Find back edges.  An edge (src, dest) is a back edge if and
        only if *dest* dominates *src*.
        Nz*stats* must be a dict; got iteration_countr   c                    s&    |  dd  j|  D | < d S )Nc                 S   s   g | ]}|qS r   r   )r?   rS   r   r   r   rB   c  s    z@CFGraph._find_back_edges.<locals>.push_state.<locals>.<listcomp>)r   rH   )rM   r   r   succs_stater   r   
push_statea  s   
z,CFGraph._find_back_edges.<locals>.push_stater   )	r,   dict	TypeErrortype
setdefaultrE   r}   r   rK   )
r   statsr   r}   checkedr   iter_cttos	tos_succscur_noder   r   r   rn   J  s:   

zCFGraph._find_back_edgesc                    s@   | j | jg t  fdd  | j   S )Nc                    sF   | vr! |  |  D ]}| |fvr | q|  d S d S r#   r   r   _dfs_recr   r   r   r   r   r   r     s   
z*CFGraph._find_topo_order.<locals>._dfs_rec)rH   ro   rE   rJ   r   r%   r   r   r   rp     s   
zCFGraph._find_topo_orderc                 C   s\   i }t | jD ]$}t  ||< }| j| D ]}||f| jvr*|| |||  qq|S r#   )r   rq   rE   rH   ro   rK   update)r   descsrM   
node_descsr   r   r   r   rr     s   
zCFGraph._find_descendentsc                 C   s   i }| j D ]7\}}|}t|g}|g}|r,| }||vr*|| || j|  |s||v r8|| | q|||< qi }| D ]/\}}t }	t }
|D ]}|	| j| |  |
| j| |  qOt	|||	|
d}|||< qC|S )zC
        Find the loops defined by the graph's back edges.
        )r-   r   r6   r7   )
ro   rE   r   rK   r   rG   r   rC   rH   r+   )r   bodiesrR   rS   r-   r   queuer   r   r6   r7   r   r   r   r   rt     s0   



zCFGraph._find_loopsc                 C   sT   | j }tdd | jD }t| dd dD ]}|jD ]
}|| |j qq|S )Nc                 s   s    | ]}|g fV  qd S r#   r   )r?   r   r   r   r   r     s    z)CFGraph._find_in_loops.<locals>.<genexpr>c                 S   r"   r#   )r   r   )r   r   r   r   <lambda>  s   
 z(CFGraph._find_in_loops.<locals>.<lambda>)key)ru   r   rF   r   r   r   r   r-   )r   r   r   r   r   r   r   r   rv     s   
zCFGraph._find_in_loopsc                 C   s2   t dd | j D }dd l}|j||d d S )Nc                 s   s$    | ]\}}|t t|fV  qd S r#   )r   r   )r?   rR   destsr   r   r   r     s    z*CFGraph._dump_adj_lists.<locals>.<genexpr>r   r   )r   rH   rC   r   )r   r   	adj_listsr   r   r   r   r     s
   zCFGraph._dump_adj_listsc                 C   sB   t |tstS dD ]}t| |d }t||d }||kr dS q	dS )N)rF   rI   rJ   rG   rH   FT)r,   rD   r:   getattr)r   r/   r   thisthatr   r   r   r0     s   
zCFGraph.__eq__c                 C   s   |  | S r#   )r0   r.   r   r   r   r>     r   zCFGraph.__ne__r#   )F)r   )=r(   r)   r*   r4   r   rN   rU   rV   rX   rY   r\   r_   rb   rd   rf   rh   r   cached_propertyrk   r^   ro   rq   rs   ru   rw   ra   rc   re   rg   r|   r}   r~   r   r   r   r   r   r   r   r   r   rQ   r   r   r[   rj   r   ry   r{   rz   r   rm   rx   rn   rp   rr   rt   rv   r   r0   r>   r   r   r   r   rD   [   s    

	
		










	





(
+
7
$rD   c                   @   s  e Zd ZdZdd Zdd Zdd Zdd	 Zd4ddZdd Z	d5d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"d# ZeZeZeZeZeZeZeZeZd$d% ZeZeZd&d' Zd(d) Z e Z!d*d+ Z"e#d,v rwd-d. Z$n	e#d/v r|ne%e#d0d1 Z&d2d3 Z'd
S )6ControlFlowAnalysisz
    Attributes
    ----------
    - bytecode

    - blocks

    - blockseq

    - doms: dict of set
        Dominators

    - backbone: set of block offsets
        The set of block that is common to all possible code path.

    c                 C   sF   || _ i | _i | _g | _d | _d | _d| _d | _g | _g | _	g | _
d S NT)bytecodeblocks
liveblocksblockseqr   r   _force_new_block	_curblock_blockstackru   _withs)r   r  r   r   r   r     s   
zControlFlowAnalysis.__init__c                 c   s    | j D ]}| j| V  qdS )z=
        Return all blocks in sequence of occurrence
        N)r  r	  r   r   r   r   r   
iterblocks   s   
zControlFlowAnalysis.iterblocksc                 c   s(    | j D ]}|| jv r| j| V  qdS )zB
        Return all live blocks in sequence of occurrence
        N)r  r
  r	  r  r   r   r   iterliveblocks  s   

z"ControlFlowAnalysis.iterliveblocksc                 c   s4    |j  D ]\}}|| jv r| j| |fV  qdS )zQ
        Yield (incoming block, number of stack pops) pairs for *block*.
        N)r   rC   r
  r	  )r   blockr   popsr   r   r   incoming_blocks  s   
z#ControlFlowAnalysis.incoming_blocksNc                 C   s   | j jd d d S )Nr   )graphr   )r   r   r   r   r   r     s   zControlFlowAnalysis.dumpc                    s     D ]6}d|j }t |d }|d ur|| q|jr9t jjj|j}|jdv r.d}nd|j }t	||d	 qt
 j jdd  D ]\}} j| }|jsZ|jsZd|j|< qFt }	 jD ]}
|	|
 qa j D ]}
|
j D ]\}}|	|
j|| quqn|	t j |	  |	 _ j D ]}
|
j D ]\}}| j| j|
j< qqt fdd	 j D  _t jD ]	}| jv r nqtd
 j }t  } j! D ]}
 j"|
r|#|
 q||  _d S )Nzop_%s>   SETUP_FINALLYz2'try' block not supported until python3.7 or laterz$Use of unsupported opcode (%s) found)locr   r   c                 3   s    | ]
}| j | fV  qd S r#   )r	  )r?   r   r%   r   r   r   B  s    z*ControlFlowAnalysis.run.<locals>.<genexpr>zNo live block that exits!?)$
_iter_instopnamer  is_jumpr   r  func_idr   linenor   zipr  r	  r   r   rD   rN   r   rC   rU   r   rY   minr\   r  r   r   r   r
  r   AssertionErrorr   rE   keysr   rK   )r   instfnamefnlmsgcurnxtblkr  r   outr  lastblkr   inloopblocksr   r%   r   run  s\   










zControlFlowAnalysis.runr   c                 C   s   || j j|< dS )z
        Register a jump (conditional or not) to *target* offset.
        *pops* is the number of stack pops implied by the jump (default 0).
        N)r  r   )r   targetr  r   r   r   jumpX  rO   zControlFlowAnalysis.jumpc                 c   sF    | j D ]}| |r| | | | | jj|j |V  qd S r#   )r  _use_new_block_guard_with_as_start_new_blockr  r   r   r   r   r"  r   r   r   r  _  s   



zControlFlowAnalysis._iter_instc                 C   s4   |j | jjv r
d}n|jtv rd}n| j}d| _|S )NTF)r   r  labelsr  NEW_BLOCKERSr  )r   r"  resr   r   r   r0  g  s   
z"ControlFlowAnalysis._use_new_blockc                 C   s,   t |j| _| j| j|j< | j|j d S r#   )r   r   r  r	  r  r   r3  r   r   r   r2  r  s   z$ControlFlowAnalysis._start_new_blockc                 C   s4   |j dkr| j|j j }|dkrd}t|dS dS )zChecks if the next instruction after a SETUP_WITH is something other
        than a POP_TOP, if it is something else it'll be some sort of store
        which is not supported (this corresponds to `with CTXMGR as VAR(S)`).r
   POP_TOPzGThe 'with (context manager) as (variable):' construct is not supported.N)r  r  nextr   )r   current_instnext_opr&  r   r   r   r1  w  s   
z"ControlFlowAnalysis._guard_with_asc                 C   <   |  }| j| | j|j|f | |j d| _d S r  )get_jump_targetr  r   ru   r   r/  r8  r  r   r"  endr   r   r   op_SETUP_LOOP  
   
z!ControlFlowAnalysis.op_SETUP_LOOPc                 C   r;  r  )r<  r  r   r  r   r/  r8  r  r=  r   r   r   op_SETUP_WITH  r@  z!ControlFlowAnalysis.op_SETUP_WITHc                 C   s   | j   d S r#   )r  r   r3  r   r   r   op_POP_BLOCK  s   z ControlFlowAnalysis.op_POP_BLOCKc                 C   $   |  |  |  |j d| _d S r  r/  r<  r8  r  r3  r   r   r   op_FOR_ITER     
zControlFlowAnalysis.op_FOR_ITERc                 C   rC  r  rD  r3  r   r   r   _op_ABSOLUTE_JUMP_IF  rF  z(ControlFlowAnalysis._op_ABSOLUTE_JUMP_IFc                 C   s(   |  |  | j |jdd d| _d S )Nr   )r  TrD  r3  r   r   r   _op_ABSOLUTE_JUMP_OR_POP  s   
z,ControlFlowAnalysis._op_ABSOLUTE_JUMP_OR_POPc                 C      |  |  d| _d S r  r/  r<  r  r3  r   r   r   op_JUMP_ABSOLUTE     
z$ControlFlowAnalysis.op_JUMP_ABSOLUTEc                 C   rI  r  rJ  r3  r   r   r   op_JUMP_FORWARD  rL  z#ControlFlowAnalysis.op_JUMP_FORWARDc                 C      d| j _d| _d S r  r  r   r  r3  r   r   r   op_RETURN_VALUE     
z#ControlFlowAnalysis.op_RETURN_VALUE)r   r   r   c                 C   rN  r  rO  r3  r   r   r   op_RETURN_CONST  rQ  z#ControlFlowAnalysis.op_RETURN_CONST)r   r   c                 C   rN  r  rO  r3  r   r   r   op_RAISE_VARARGS  rQ  z$ControlFlowAnalysis.op_RAISE_VARARGSc                 C   s   |  | jd  d| _d S )Nr   T)r/  r  r  r3  r   r   r   op_BREAK_LOOP  s   
z!ControlFlowAnalysis.op_BREAK_LOOPr#   )r   )(r(   r)   r*   r4   r   r  r  r  r   r-  r/  r  r0  r2  r1  r?  rA  rB  rE  rG  op_POP_JUMP_IF_FALSEop_POP_JUMP_IF_TRUEop_JUMP_IF_FALSEop_JUMP_IF_TRUEop_POP_JUMP_FORWARD_IF_FALSEop_POP_JUMP_BACKWARD_IF_FALSEop_POP_JUMP_FORWARD_IF_TRUEop_POP_JUMP_BACKWARD_IF_TRUErH  op_JUMP_IF_FALSE_OR_POPop_JUMP_IF_TRUE_OR_POPrK  rM  op_JUMP_BACKWARDrP  r   rR  NotImplementedErrorrS  rT  r   r   r   r   r    sP    

>


r  )collectionsr   r   numba.core.irr   numba.core.errorsr   numba.core.utilsr   	frozensetr5  r`  r   r   
namedtupler+   defaultdictr8   rD   r  r   r   r   r   <module>   s.         