§
    ƒÛgO  ã                   óD   — d Z ddlZ G d„ dej        ¦  «        Zd„ Zd„ ZdS )zR
This module provides helper functions to find the first line of a function
body.
é    Nc                   ó>   ‡ — e Zd ZdZd„ Zˆ fd„Zdej        fd„Zˆ xZ	S )ÚFindDefFirstLinezÊ
    Attributes
    ----------
    first_stmt_line : int or None
        This stores the first statement line number if the definition is found.
        Or, ``None`` if the definition is not found.
    c                 óD   — |j         | _        |j        | _        d| _        dS )zf
        Parameters
        ----------
        code :
            The function's code object.
        N)Úco_nameÚ_co_nameÚco_firstlinenoÚ_co_firstlinenoÚfirst_stmt_line)ÚselfÚcodes     úP/granary/edev/quantum/lib/python3.11/site-packages/numba/misc/firstlinefinder.pyÚ__init__zFindDefFirstLine.__init__   s&   € ð œˆŒØ#Ô2ˆÔØ#ˆÔÐÐó    c                 óx   •— t          j        |¦  «        D ]#}t          ¦   «                              |¦  «         Œ$d S )N)ÚastÚiter_child_nodesÚsuperÚvisit)r   ÚnodeÚchildÚ	__class__s      €r   Ú_visit_childrenz FindDefFirstLine._visit_children   s@   ø€ ÝÔ)¨$Ñ/Ô/ð 	!ð 	!ˆEÝ‰GŒG�MŠM˜%Ñ Ô Ð Ð ð	!ð 	!r   r   c                 óf  — |j         | j        k    r‹t          |j        g¦  «        }|j        r'|j        d         }|                     |j        ¦  «         | j        |v r?|j        r7|j        d         }t          |¦  «        r|j        d         }|j        | _	        d S 	 |  
                    |¦  «         d S )Nr   é   )Únamer   ÚsetÚlinenoÚdecorator_listÚaddr	   ÚbodyÚ_is_docstringr
   r   )r   r   Úpossible_start_linesÚfirst_decorÚ
first_stmts        r   Úvisit_FunctionDefz"FindDefFirstLine.visit_FunctionDef!   sÆ   € ØŒ9˜œÒ%Ð%õ $'¨¬ }Ñ#5Ô#5Ð ØÔ"ð =ð #Ô1°!Ô4�Ø$×(Ò(¨Ô);Ñ<Ô<Ð<àÔ#Ð';Ð;Ð;ð ”9ð Ø!%¤¨1¤�JÝ$ ZÑ0Ô0ð 2à%)¤Y¨q¤\˜
Ø+5Ô+<�DÔ(Ø�Fð
 Ø×Ò˜TÑ"Ô"Ð"Ð"Ð"r   )
Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   ÚFunctionDefr%   Ú__classcell__)r   s   @r   r   r   	   sn   ø€ € € € € ðð ð	$ð 	$ð 	$ð!ð !ð !ð !ð !ð# c¤oð #ð #ð #ð #ð #ð #ð #ð #r   r   c                 óº   — t          | t          j        ¦  «        r@t          | j        t          j        ¦  «        r!t          | j        j        t
          ¦  «        rdS dS )NTF)Ú
isinstancer   ÚExprÚvalueÚConstantÚstr)r   s    r   r!   r!   ?   sM   € Ý�$�œÑ!Ô!ð Ý�t”z¥3¤<Ñ0Ô0ð 	Ý˜tœzÔ/µÑ5Ô5ð	à�4Øˆ5r   c                 ó@  — | j         }	 t          |j        ¦  «        5 }|                     ¦   «         }ddd¦  «         n# 1 swxY w Y   t	          j        |¦  «        }t          |¦  «        }|                     |¦  «         |j        S # t          t          f$ r Y dS w xY w)a  
    Look up the first line of function body using the file in
    ``pyfunc.__code__.co_filename``.

    Returns
    -------
    lineno : int; or None
        The first line number of the function body; or ``None`` if the first
        line cannot be determined.
    N)Ú__code__ÚopenÚco_filenameÚreadr   Úparser   r   r
   ÚFileNotFoundErrorÚOSError)ÚpyfuncÚcoÚfinÚfile_contentÚtreeÚfinders         r   Úget_func_body_first_linenor@   G   sá   € ð 
Œ€Bð	&Ý�"”.Ñ!Ô!ð 	& SØŸ8š8™:œ:ˆLð	&ð 	&ð 	&ñ 	&ô 	&ð 	&ð 	&ð 	&ð 	&ð 	&ð 	&øøøð 	&ð 	&ð 	&ð 	&õ
 Œy˜Ñ&Ô&ˆÝ! "Ñ%Ô%ˆØ�Š�TÑÔÐØÔ%Ð%øõ �wÐ'ð ð ð Øˆˆðøøøs1   ‰B �>²B ¾AÁB ÁAÁB ÂBÂB)r)   r   ÚNodeVisitorr   r!   r@   © r   r   ú<module>rC      so   ððð ð
 €
€
€
ð3#ð 3#ð 3#ð 3#ð 3#�s”ñ 3#ô 3#ð 3#ðlð ð ð&ð &ð &ð &ð &r   