| Server IP : 217.160.0.135 / Your IP : 216.73.217.85 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1074145052 ( 1074145052) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/lib/python3/dist-packages/pythran/analyses/__pycache__/ |
Upload File : |
�
cR�a� � �~ � d Z ddlmZ ddlmZmZ ddlmZ ddlm Z m
Z
ddlmZ ddl
Zd� Zd � Z G d
� de� � ZdS )zH
ExtendedSyntaxCheck performs various syntax checks on the pythran AST.
� )�ModuleAnalysis)�
StrictAliases�ArgumentEffects)�PythranSyntaxError)�ConstantIntr�FunctionIntr)�metadataNc � � t | t � � rdS t | t j � � sdS t j | j d t j � � S )NTFr )�
isinstancer �ast�FunctionDefr �get�body�StaticReturn��nodes �H/usr/lib/python3/dist-packages/pythran/analyses/extended_syntax_check.py�is_global_constantr sM � ��$��%�%� ��t��d�C�O�,�,� ��u��<�� �!��h�&;�<�<�<� c �b � t | t t j f� � pt | � � S �N)r r r r
r r s r � is_globalr s+ � ��t�l�C�O�<�=�=�
%��t�$�$�&r c �B � e Zd ZdZd� Zd� Zd� Zd� Zd� Zd� Z d� Z
d � Zd
S )�ExtendedSyntaxChecka
Perform advanced syntax checking, based on strict aliases analysis:
- is there a function redefinition?
- is there a function call that does not match the called expression arity?
- is there an operation that updates a global variable?
c � � d | _ d| _ d| _ t � � | _ t j | t t � � d S )NF) �result�update�inassert�set� functionsr �__init__r r )�selfs r r! zExtendedSyntaxCheck.__init__% s= � ���������
���������m�_�E�E�E�E�Er c �
� t |t j � � sd S | j |j }n# t
$ r Y d S w xY w|D ]>}t
|� � r-t d� |j � � |j � � ��?d S )Nz=Cannot modify '{}': global variables are constant in pythran.)
r r �Call�strict_aliases�func�KeyErrorr r �format�name)r"