polyglot.visit
Class ConstantFolder

java.lang.Object
  extended bypolyglot.visit.NodeVisitor
      extended bypolyglot.visit.ConstantFolder

public class ConstantFolder
extends NodeVisitor

Visitor which performs constant folding.


Constructor Summary
ConstantFolder(TypeSystem ts, NodeFactory nf)
           
 
Method Summary
 Node leave(Node old, Node n, NodeVisitor v_)
           
 NodeFactory nodeFactory()
           
 TypeSystem typeSystem()
           
 
Methods inherited from class polyglot.visit.NodeVisitor
begin, enter, enter, finish, finish, leave, override, override, toString, visitEdge
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConstantFolder

public ConstantFolder(TypeSystem ts,
                      NodeFactory nf)
Method Detail

typeSystem

public TypeSystem typeSystem()

nodeFactory

public NodeFactory nodeFactory()

leave

public Node leave(Node old,
                  Node n,
                  NodeVisitor v_)
Overrides:
leave in class NodeVisitor