orc.ast.oil
Class Compiler
java.lang.Object
orc.ast.oil.Compiler
- All Implemented Interfaces:
- Visitor<Node>
public final class Compiler
- extends java.lang.Object
- implements Visitor<Node>
Compiles an oil syntax tree into an execution graph.
Every node is compiled relative to an "output" node that represents
the "rest of the program". Thus the tree of compiled nodes is created bottom up.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
compile
public static Node compile(Expression expr)
compile
public static Node compile(Expression expr,
Node output)
visit
public Node visit(Parallel expr)
- Specified by:
visit
in interface Visitor<Node>
visit
public Node visit(Call expr)
- Specified by:
visit
in interface Visitor<Node>
visit
public Node visit(DeclareDefs expr)
- Specified by:
visit
in interface Visitor<Node>
visit
public Node visit(Stop expr)
- Specified by:
visit
in interface Visitor<Node>
visit
public Node visit(Pruning expr)
- Specified by:
visit
in interface Visitor<Node>
visit
public Node visit(Sequential expr)
- Specified by:
visit
in interface Visitor<Node>
visit
public Node visit(Otherwise expr)
- Specified by:
visit
in interface Visitor<Node>
visit
public Node visit(WithLocation expr)
- Specified by:
visit
in interface Visitor<Node>
visit
public Node visit(Constant arg)
- Specified by:
visit
in interface Visitor<Node>
visit
public Node visit(Field arg)
- Specified by:
visit
in interface Visitor<Node>
visit
public Node visit(Site arg)
- Specified by:
visit
in interface Visitor<Node>
visit
public Node visit(Variable arg)
- Specified by:
visit
in interface Visitor<Node>
visit
public Node visit(Atomic atomic)
- Specified by:
visit
in interface Visitor<Node>
visit
public Node visit(Isolated expr)
- Specified by:
visit
in interface Visitor<Node>
visit
public Node visit(HasType hasType)
- Specified by:
visit
in interface Visitor<Node>
visit
public Node visit(DeclareType typeDecl)
- Specified by:
visit
in interface Visitor<Node>
visit
public Node visit(Throw throwExpr)
- Specified by:
visit
in interface Visitor<Node>
visit
public Node visit(Catch catchExpr)
- Specified by:
visit
in interface Visitor<Node>