Submit
Path:
~
/
/
opt
/
cloudlinux
/
venv
/
lib
/
python3.11
/
site-packages
/
jinja2
/
__pycache__
/
File Content:
optimizer.cpython-311.pyc
� �|oir � � � d Z ddlZddlmZ ddlmZ ej rddlm Z dej dd d ej fd�Z G d� d e� � ZdS )a� The optimizer tries to constant fold expressions and modify the AST in place so that it should be faster to evaluate. Because the AST does not contain all the scoping information and the compiler has to find that out, we cannot do all the optimizations we want. For example, loop unrolling doesn't work because unrolled loops would have a different scope. The solution would be a second syntax tree that stored the scoping rules. � N� )�nodes)�NodeTransformer)�Environment�node�environmentr �returnc � � t |� � }t j t j |� | � � � � S )z^The context hint can be used to perform an static optimization based on the context given.)� Optimizer�t�castr �Node�visit)r r � optimizers �G/opt/cloudlinux/venv/lib64/python3.11/site-packages/jinja2/optimizer.py�optimizer s1 � � �+�&�&�I��6�%�*�i�o�o�d�3�3�4�4�4� c �` � � e Zd Zd d�Zdej dej dej dej f� fd �Z� xZ S )r r �t.Optional[Environment]r Nc � � || _ d S )N)r )�selfr s r �__init__zOptimizer.__init__ s � �&����r r �args�kwargsc �4 �� t � � j |g|�R i |��}t |t j � � r_ t j � |� |r|d nd � � |j | j �� � S # t j $ r Y nw xY w|S )Nr )�linenor )�super� generic_visit� isinstancer �Expr�Const�from_untrusted�as_constr r � Impossible)r r r r � __class__s �r r zOptimizer.generic_visit s� �� � %�u�w�w�$�T�;�D�;�;�;�F�;�;�� �d�E�J�'�'� � ��{�1�1��M�M�T�";�$�q�'�'�t�<�<��;� $� 0� 2� � � �� �#� � � ��� ���� �s �AB �B�B)r r r N) �__name__� __module__�__qualname__r r r r �Anyr � __classcell__)r% s @r r r sy �� � � � � �'� '� '� '���J��'(�u��89��� ��� � � � � � � � � r r ) �__doc__�typingr � r �visitorr � TYPE_CHECKINGr r r r r � r r �<module>r1 s� ��� � � � � � � � � � � � $� $� $� $� $� $��?� )�(�(�(�(�(�(�5�5�:� 5�M� 5�e�j� 5� 5� 5� 5�� � � � �� � � � � r
Edit
Rename
Chmod
Delete
FILE
FOLDER
Name
Size
Permission
Action
__init__.cpython-311.pyc
2545 bytes
0644
_identifier.cpython-311.pyc
1945 bytes
0644
async_utils.cpython-311.pyc
4193 bytes
0644
bccache.cpython-311.pyc
19683 bytes
0644
compiler.cpython-311.pyc
110550 bytes
0644
constants.cpython-311.pyc
1574 bytes
0644
debug.cpython-311.pyc
9431 bytes
0644
defaults.cpython-311.pyc
1713 bytes
0644
environment.cpython-311.pyc
80353 bytes
0644
exceptions.cpython-311.pyc
8598 bytes
0644
ext.cpython-311.pyc
44461 bytes
0644
filters.cpython-311.pyc
75037 bytes
0644
idtracking.cpython-311.pyc
19609 bytes
0644
lexer.cpython-311.pyc
35671 bytes
0644
loaders.cpython-311.pyc
32796 bytes
0644
meta.cpython-311.pyc
5719 bytes
0644
nativetypes.cpython-311.pyc
7714 bytes
0644
nodes.cpython-311.pyc
64473 bytes
0644
optimizer.cpython-311.pyc
2843 bytes
0644
parser.cpython-311.pyc
59287 bytes
0644
runtime.cpython-311.pyc
52324 bytes
0644
sandbox.cpython-311.pyc
18838 bytes
0644
tests.cpython-311.pyc
9234 bytes
0644
utils.cpython-311.pyc
41258 bytes
0644
visitor.cpython-311.pyc
5673 bytes
0644
N4ST4R_ID | Naxtarrr