Submit
Path:
~
/
/
proc
/
thread-self
/
root
/
opt
/
cloudlinux
/
venv
/
lib
/
python3.11
/
site-packages
/
jinja2
/
__pycache__
/
File Content:
optimizer.cpython-311.opt-1.pyc
� � hr � � � 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 �E/opt/cloudlinux/venv/lib/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.opt-1.pyc
2543 bytes
0644
__init__.cpython-311.pyc
2543 bytes
0644
_identifier.cpython-311.opt-1.pyc
1943 bytes
0644
_identifier.cpython-311.pyc
1943 bytes
0644
async_utils.cpython-311.opt-1.pyc
4191 bytes
0644
async_utils.cpython-311.pyc
4191 bytes
0644
bccache.cpython-311.opt-1.pyc
19681 bytes
0644
bccache.cpython-311.pyc
19681 bytes
0644
compiler.cpython-311.opt-1.pyc
110485 bytes
0644
compiler.cpython-311.pyc
110548 bytes
0644
constants.cpython-311.opt-1.pyc
1545 bytes
0644
constants.cpython-311.pyc
1545 bytes
0644
debug.cpython-311.opt-1.pyc
9402 bytes
0644
debug.cpython-311.pyc
9402 bytes
0644
defaults.cpython-311.opt-1.pyc
1711 bytes
0644
defaults.cpython-311.pyc
1711 bytes
0644
environment.cpython-311.opt-1.pyc
79584 bytes
0644
environment.cpython-311.pyc
80351 bytes
0644
exceptions.cpython-311.opt-1.pyc
8596 bytes
0644
exceptions.cpython-311.pyc
8596 bytes
0644
ext.cpython-311.opt-1.pyc
44432 bytes
0644
ext.cpython-311.pyc
44432 bytes
0644
filters.cpython-311.opt-1.pyc
74764 bytes
0644
filters.cpython-311.pyc
75035 bytes
0644
idtracking.cpython-311.opt-1.pyc
19537 bytes
0644
idtracking.cpython-311.pyc
19607 bytes
0644
lexer.cpython-311.opt-1.pyc
35444 bytes
0644
lexer.cpython-311.pyc
35669 bytes
0644
loaders.cpython-311.opt-1.pyc
32616 bytes
0644
loaders.cpython-311.pyc
32794 bytes
0644
meta.cpython-311.opt-1.pyc
5690 bytes
0644
meta.cpython-311.pyc
5690 bytes
0644
nativetypes.cpython-311.opt-1.pyc
7685 bytes
0644
nativetypes.cpython-311.pyc
7685 bytes
0644
nodes.cpython-311.opt-1.pyc
64167 bytes
0644
nodes.cpython-311.pyc
64471 bytes
0644
optimizer.cpython-311.opt-1.pyc
2841 bytes
0644
optimizer.cpython-311.pyc
2841 bytes
0644
parser.cpython-311.opt-1.pyc
59285 bytes
0644
parser.cpython-311.pyc
59285 bytes
0644
runtime.cpython-311.opt-1.pyc
52313 bytes
0644
runtime.cpython-311.pyc
52322 bytes
0644
sandbox.cpython-311.opt-1.pyc
18809 bytes
0644
sandbox.cpython-311.pyc
18809 bytes
0644
tests.cpython-311.opt-1.pyc
9232 bytes
0644
tests.cpython-311.pyc
9232 bytes
0644
utils.cpython-311.opt-1.pyc
41256 bytes
0644
utils.cpython-311.pyc
41256 bytes
0644
visitor.cpython-311.opt-1.pyc
5671 bytes
0644
visitor.cpython-311.pyc
5671 bytes
0644
N4ST4R_ID | Naxtarrr