orc.ast.oil
Class Compiler

java.lang.Object
  extended by 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.


Method Summary
static Node compile(Expr expr, Node output)
           
 Node visit(Atomic atomic)
           
 Node visit(Bar expr)
           
 Node visit(Call expr)
           
 Node visit(Constant arg)
           
 Node visit(Defs expr)
           
 Node visit(Field arg)
           
 Node visit(HasType hasType)
           
 Node visit(Isolated expr)
           
 Node visit(Pull expr)
           
 Node visit(Push expr)
           
 Node visit(Semi expr)
           
 Node visit(Silent expr)
           
 Node visit(Site arg)
           
 Node visit(TypeDecl typeDecl)
           
 Node visit(Var arg)
           
 Node visit(WithLocation expr)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

compile

public static Node compile(Expr expr,
                           Node output)

visit

public Node visit(Bar 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(Defs expr)
Specified by:
visit in interface Visitor<Node>

visit

public Node visit(Silent expr)
Specified by:
visit in interface Visitor<Node>

visit

public Node visit(Pull expr)
Specified by:
visit in interface Visitor<Node>

visit

public Node visit(Push expr)
Specified by:
visit in interface Visitor<Node>

visit

public Node visit(Semi 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(Var 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(TypeDecl typeDecl)
Specified by:
visit in interface Visitor<Node>