cs132.vapor.ast
Class VBuiltIn

java.lang.Object
  extended by cs132.vapor.ast.Node
      extended by cs132.vapor.ast.VInstr
          extended by cs132.vapor.ast.VBuiltIn

public class VBuiltIn
extends VInstr

The invocation of a built-in operation (for primitive operations like add, sub, etc).


Nested Class Summary
static class VBuiltIn.Op
          An built-in operation in Vapor.
 
Nested classes/interfaces inherited from class cs132.vapor.ast.VInstr
VInstr.Visitor<E extends Throwable>, VInstr.VisitorP<P,E extends Throwable>, VInstr.VisitorPR<P,R,E extends Throwable>, VInstr.VisitorR<R,E extends Throwable>
 
Field Summary
 VOperand[] args
          The arguments to the operation
 VVarRef dest
          The variable/register in which to store the result of the operation.
 VBuiltIn.Op op
          The operation being performed.
 
Fields inherited from class cs132.vapor.ast.Node
sourcePos
 
Constructor Summary
VBuiltIn(SourcePos sourcePos, VBuiltIn.Op op, VOperand[] args, VVarRef dest)
           
 
Method Summary
<P,E extends Throwable>
void
accept(P p, VInstr.VisitorP<P,E> v)
          Relay for VInstr.VisitorP
<P,R,E extends Throwable>
R
accept(P p, VInstr.VisitorPR<P,R,E> v)
          Relay for VInstr.VisitorPR
<E extends Throwable>
void
accept(VInstr.Visitor<E> v)
          Relay for VInstr.Visitor
<R,E extends Throwable>
R
accept(VInstr.VisitorR<R,E> v)
          Relay for VInstr.VisitorR
static boolean isError(VInstr instr)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

op

public final VBuiltIn.Op op
The operation being performed.


args

public final VOperand[] args
The arguments to the operation


dest

public final VVarRef dest
The variable/register in which to store the result of the operation. This is optional and might be null.

Constructor Detail

VBuiltIn

public VBuiltIn(SourcePos sourcePos,
                VBuiltIn.Op op,
                VOperand[] args,
                VVarRef dest)
Method Detail

isError

public static final boolean isError(VInstr instr)

accept

public <E extends Throwable> void accept(VInstr.Visitor<E> v)
            throws E extends Throwable
Description copied from class: VInstr
Relay for VInstr.Visitor

Specified by:
accept in class VInstr
Throws:
E extends Throwable

accept

public <R,E extends Throwable> R accept(VInstr.VisitorR<R,E> v)
         throws E extends Throwable
Description copied from class: VInstr
Relay for VInstr.VisitorR

Specified by:
accept in class VInstr
Throws:
E extends Throwable

accept

public <P,E extends Throwable> void accept(P p,
                                           VInstr.VisitorP<P,E> v)
            throws E extends Throwable
Description copied from class: VInstr
Relay for VInstr.VisitorP

Specified by:
accept in class VInstr
Throws:
E extends Throwable

accept

public <P,R,E extends Throwable> R accept(P p,
                                          VInstr.VisitorPR<P,R,E> v)
         throws E extends Throwable
Description copied from class: VInstr
Relay for VInstr.VisitorPR

Specified by:
accept in class VInstr
Throws:
E extends Throwable