PNG  IHDR* pHYs+ IDATx]n#; cdLb Ǚ[at¤_:uP}>!Usă cag޿ ֵNu`ݼTâabO7uL&y^wFٝA"l[|ŲHLN밪4*sG3|Dv}?+y߉{OuOAt4Jj.u]Gz*҉sP'VQKbA1u\`& Af;HWj hsO;ogTu uj7S3/QzUr&wS`M$X_L7r2;aE+ώ%vikDA:dR+%KzƉo>eOth$z%: :{WwaQ:wz%4foɹE[9<]#ERINƻv溂E%P1i01 |Jvҗ&{b?9g=^wζXn/lK::90KwrюO\!ջ3uzuGv^;騢wq<Iatv09:tt~hEG`v;3@MNZD.1]L:{ծI3`L(÷ba")Y.iljCɄae#I"1 `3*Bdz>j<fU40⨬%O$3cGt]j%Fߠ_twJ;ABU8vP3uEԑwQ V:h%))LfraqX-ۿX]v-\9I gl8tzX ]ecm)-cgʒ#Uw=Wlێn(0hPP/ӨtQ“&J35 $=]r1{tLuǮ*i0_;NƝ8;-vݏr8+U-kruȕYr0RnC]*ެ(M:]gE;{]tg(#ZJ9y>utRDRMdr9㪩̞zֹb<ģ&wzJM"iI( .ꮅX)Qw:9,i좜\Ԛi7&N0:asϓc];=ΗOӣ APqz93 y $)A*kVHZwBƺnWNaby>XMN*45~ղM6Nvm;A=jֲ.~1}(9`KJ/V F9[=`~[;sRuk]rєT!)iQO)Y$V ی ۤmzWz5IM Zb )ˆC`6 rRa}qNmUfDsWuˤV{ Pݝ'=Kֳbg,UҘVz2ﴻnjNgBb{? ߮tcsͻQuxVCIY۠:(V뺕 ٥2;t`@Fo{Z9`;]wMzU~%UA蛚dI vGq\r82iu +St`cR.6U/M9IENDB` REDROOM
PHP 5.6.40
Preview: optimizer.py Size: 1.42 KB
//opt/imunify360/venv/lib64/python3.11/site-packages/jinja2/optimizer.py

# -*- coding: utf-8 -*-
"""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.
"""
from . import nodes
from .visitor import NodeTransformer


def optimize(node, environment):
    """The context hint can be used to perform an static optimization
    based on the context given."""
    optimizer = Optimizer(environment)
    return optimizer.visit(node)


class Optimizer(NodeTransformer):
    def __init__(self, environment):
        self.environment = environment

    def generic_visit(self, node, *args, **kwargs):
        node = super(Optimizer, self).generic_visit(node, *args, **kwargs)

        # Do constant folding. Some other nodes besides Expr have
        # as_const, but folding them causes errors later on.
        if isinstance(node, nodes.Expr):
            try:
                return nodes.Const.from_untrusted(
                    node.as_const(args[0] if args else None),
                    lineno=node.lineno,
                    environment=self.environment,
                )
            except nodes.Impossible:
                pass

        return node

Directory Contents

Dirs: 1 × Files: 27

Name Size Perms Modified Actions
- drwxr-xr-x 2025-09-15 23:01:28
Edit Download
4.15 KB lrw-r--r-- 2025-07-04 13:31:02
Edit Download
7.04 KB lrw-r--r-- 2025-07-04 13:31:02
Edit Download
11.85 KB lrw-r--r-- 2025-07-04 13:31:02
Edit Download
64.73 KB lrw-r--r-- 2025-07-04 13:31:02
Edit Download
1.42 KB lrw-r--r-- 2025-07-04 13:31:02
Edit Download
8.33 KB lrw-r--r-- 2025-07-04 13:31:02
Edit Download
1.10 KB lrw-r--r-- 2025-07-04 13:31:02
Edit Download
49.44 KB lrw-r--r-- 2025-07-04 13:31:02
Edit Download
5.30 KB lrw-r--r-- 2025-07-04 13:31:02
Edit Download
25.82 KB lrw-r--r-- 2025-07-04 13:31:02
Edit Download
40.44 KB lrw-r--r-- 2025-07-04 13:31:02
Edit Download
9.00 KB lrw-r--r-- 2025-07-04 13:31:02
Edit Download
29.62 KB lrw-r--r-- 2025-07-04 13:31:02
Edit Download
17.25 KB lrw-r--r-- 2025-07-04 13:31:02
Edit Download
4.03 KB lrw-r--r-- 2025-07-04 13:31:02
Edit Download
2.69 KB lrw-r--r-- 2025-07-04 13:31:02
Edit Download
30.37 KB lrw-r--r-- 2025-07-04 13:31:02
Edit Download
1.42 KB lrw-r--r-- 2025-07-04 13:31:02
Edit Download
34.82 KB lrw-r--r-- 2025-07-04 13:31:02
Edit Download
29.90 KB lrw-r--r-- 2025-07-04 13:31:02
Edit Download
16.73 KB lrw-r--r-- 2025-07-04 13:31:02
Edit Download
4.69 KB lrw-r--r-- 2025-07-04 13:31:02
Edit Download
21.99 KB lrw-r--r-- 2025-07-04 13:31:02
Edit Download
3.16 KB lrw-r--r-- 2025-07-04 13:31:02
Edit Download
3.12 KB lrw-r--r-- 2025-07-04 13:31:02
Edit Download
1.73 KB lrw-r--r-- 2025-07-04 13:31:02
Edit Download
1.51 KB lrw-r--r-- 2025-07-04 13:31:02
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).
© 2026 REDROOM — Secure File Manager. All rights reserved. Built with ❤️ & Red Dark UI