Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
optimizer.cpython-313.pyc18 linesDownload Raw Back to __pycache__
1�

2��js���SrSSKrSSKJr SSKJr \R(aSSKJ	r	 S\RSS	S3\R4Sjr"SS
\5rg)a�The optimizer tries to constant fold expressions and modify the AST4in place so that it should be faster to evaluate.5 6Because the AST does not contain all the scoping information and the7compiler has to find that out, we cannot do all the optimizations we8want. For example, loop unrolling doesn't work because unrolled loops9would have a different scope. The solution would be a second syntax tree10that stored the scoping rules.11�N�)�nodes)�NodeTransformer)�Environment�node�environmentr�returnc��[U5n[R"[RURU55$)zZThe context hint can be used to perform an static optimization12based on the context given.)�	Optimizer�t�castr�Node�visit)rr�	optimizers   �VD:\code\apps\devtools\python\user_packages\Python313\site-packages\jinja2/optimizer.py�optimizers,���+�&�I��6�6�%�*�*�i�o�o�d�3�4�4�c�^�\rSrSrS	SjrS\RS\RS\RS\R4U4Sjjr	Sr13U=r$)14r�r	c��Xlg)N�r)�selfrs  r�__init__�Optimizer.__init__s��&�rr�args�kwargsc�B>�[TU]"U/UQ70UD6n[U[R5(aO[R15R
URU(aUSOS5URURS9$U$![Ra U$f=f)Nr)�linenor)�super�
generic_visit�16isinstancer�Expr�Const�from_untrusted�as_constrr�17Impossible)rrrr�	__class__s    �rr �Optimizer.generic_visits�����w�$�T�;�D�;�F�;���d�E�J�J�'�'�
��{�{�1�1��M�M�T�$�q�'�t�<��;�;� $� 0� 0�2�������#�#�
����
�s�A
B�B�Br)rzt.Optional[Environment]r	N)�__name__�18__module__�__qualname__�__firstlineno__rrrr�Anyr �__static_attributes__�
__classcell__)r's@rrrsB���'���J�J��'(�u�u��89����	����rr)
�__doc__�typingr�r�visitorr�
TYPE_CHECKINGrrrrr�rr�<module>r6sM�����$��?�?�(�5�5�:�:�5�M�5�e�j�j�5���r
codekingpro/portable-devtools · Team Ai