← Back
Editing: constant_expressions.cpython-311.pyc
� cR�a� � �v � d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl m Z ddlmZ ddl Z G d � d e� � ZdS )z3 ConstantExpressions gathers constant expression. � )�Aliases)�Globals)�Locals)�PureExpressions)�FunctionIntr)�NodeAnalysisNc � � � e Zd ZdZ� fd�Zd� Zd� Zd� Zd� Zd� Z d� Z d � ZeZd � Z d� Zd� Zd � Zd� ZeZeZd� Zd� Z� xZS )�ConstantExpressionszIdentify constant expressions.c � �� t � � | _ t t | � � � t t t t � � d S �N) �set�result�superr �__init__r r r r )�self� __class__s ��G/usr/lib/python3/dist-packages/pythran/analyses/constant_expressions.pyr zConstantExpressions.__init__ sI �� ��e�e��� �!�4�(�(�1�1�'�6�2A�7� L� L� L� L� L� c �: � | j � |� � dS )NT)r �add�r �nodes r r zConstantExpressions.add s � ����������tr c �n � � t � fd�|j D � � � � o� � |� � S )Nc �: �� g | ]}�� |� � ��S � ��visit��.0�xr s �r � <listcomp>z4ConstantExpressions.visit_BoolOp.<locals>.<listcomp> s# �� �7�7�7�a�D�J�J�q�M�M�7�7�7r )�all�valuesr r s ` r �visit_BoolOpz ConstantExpressions.visit_BoolOp s7 �� ��7�7�7�7�4�;�7�7�7�8�8�K�T�X�X�d�^�^�Kr c � � � t � fd�|j |j fD � � � � }|o� � |� � S )Nc �: �� g | ]}�� |� � ��S r r r s �r r! z3ConstantExpressions.visit_BinOp.<locals>.<listcomp> s# �� �B�B�B�Q�4�:�:�a�=�=�B�B�Br )r"