Optimizer Class

Inheritance diagram of Optimizer

class Optimizer(environment)

Methods

__init__(environment)
generic_visit(node, *args, **kwargs)
get_visitor(node) Return the visitor function for this node or None if no visitor
visit(node, *args, **kwargs) Visit a node.
visit_Add(node) Do constant folding.
visit_And(node) Do constant folding.
visit_Call(node) Do constant folding.
visit_Compare(node) Do constant folding.
visit_CondExpr(node) Do constant folding.
visit_Div(node) Do constant folding.
visit_Filter(node) Do constant folding.
visit_FloorDiv(node) Do constant folding.
visit_Getattr(node) Do constant folding.
visit_Getitem(node) Do constant folding.
visit_If(node) Eliminate dead code.
visit_Mod(node) Do constant folding.
visit_Mul(node) Do constant folding.
visit_Neg(node) Do constant folding.
visit_Not(node) Do constant folding.
visit_Or(node) Do constant folding.
visit_Pos(node) Do constant folding.
visit_Pow(node) Do constant folding.
visit_Sub(node) Do constant folding.
visit_Test(node) Do constant folding.
visit_list(node, *args, **kwargs) As transformers may return lists in some places this method

Descriptions

class Optimizer

Method details

__init__(environment)
visit_Add(node)

Do constant folding.

visit_And(node)

Do constant folding.

visit_Call(node)

Do constant folding.

visit_Compare(node)

Do constant folding.

visit_CondExpr(node)

Do constant folding.

visit_Div(node)

Do constant folding.

visit_Filter(node)

Do constant folding.

visit_FloorDiv(node)

Do constant folding.

visit_Getattr(node)

Do constant folding.

visit_Getitem(node)

Do constant folding.

visit_If(node)

Eliminate dead code.

visit_Mod(node)

Do constant folding.

visit_Mul(node)

Do constant folding.

visit_Neg(node)

Do constant folding.

visit_Not(node)

Do constant folding.

visit_Or(node)

Do constant folding.

visit_Pos(node)

Do constant folding.

visit_Pow(node)

Do constant folding.

visit_Sub(node)

Do constant folding.

visit_Test(node)

Do constant folding.

Inherited member details

generic_visit(node, *args, **kwargs)
get_visitor(node)

Return the visitor function for this node or None if no visitor exists for this node. In that case the generic visit function is used instead.

visit(node, *args, **kwargs)

Visit a node.

visit_list(node, *args, **kwargs)

As transformers may return lists in some places this method can be used to enforce a list as return value.

Table Of Contents

Previous topic

optimize

Next topic

optimize