Viewing File: /opt/imunify360/venv/lib/python3.11/site-packages/jinja2/__pycache__/optimizer.cpython-311.pyc



]jDdZddlmZddlmZdZGddeZdS)aThe 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.
)nodes)NodeTransformercJt|}||S)z^The context hint can be used to perform an static optimization
    based on the context given.)	Optimizervisit)nodeenvironment	optimizers   p/builddir/build/BUILD/imunify360-venv-2.6.3/opt/imunify360/venv/lib/python3.11/site-packages/jinja2/optimizer.pyoptimizers#+&&I??4   c$eZdZdZfdZxZS)rc||_dS)N)r	)selfr	s  r__init__zOptimizer.__init__s&r
cBtt|j|g|Ri|}t|tjr_	tj||r|dnd|j	|j
S#tj$rYnwxYw|S)N)linenor	)superr
generic_visit
isinstancerExprConstfrom_untrustedas_constrr	
Impossible)rrargskwargs	__class__s    rrzOptimizer.generic_visits3uY%%3DJ4JJJ6JJdEJ''	
{11MMT";$q''t<<; $ 02
#



sAB

BB)__name__
__module____qualname__rr
__classcell__)rs@rrrsG'''r
rN)__doc__rvisitorrrrr
r<module>r(sx$$$$$$!!!r
Back to Directory File Manager