|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cs132.vapor.ast.Node cs132.vapor.ast.VInstr cs132.vapor.ast.VBranch
public class VBranch
A branch instruction (if
and if0
).
Nested Class Summary |
---|
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 | |
---|---|
boolean |
positive
For if branches, positive is true . |
VLabelRef<VCodeLabel> |
target
The code label that will be executed next if the branch is taken. |
VOperand |
value
The value being branched on. |
Fields inherited from class cs132.vapor.ast.Node |
---|
sourcePos |
Constructor Summary | |
---|---|
VBranch(SourcePos sourcePos,
boolean positive,
VOperand value,
VLabelRef<VCodeLabel> target)
|
Method Summary | ||
---|---|---|
|
accept(P p,
VInstr.VisitorP<P,E> v)
Relay for VInstr.VisitorP |
|
|
accept(P p,
VInstr.VisitorPR<P,R,E> v)
Relay for VInstr.VisitorPR |
|
|
accept(VInstr.Visitor<E> v)
Relay for VInstr.Visitor |
|
|
accept(VInstr.VisitorR<R,E> v)
Relay for VInstr.VisitorR |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final boolean positive
if
branches, positive
is true
. For
if0
branches, positive
is false
.
public final VOperand value
if
branches, the branch will be
taken if value
is non-zero. For if0
branches, the
branch will be taken if value
is zero.
public final VLabelRef<VCodeLabel> target
Constructor Detail |
---|
public VBranch(SourcePos sourcePos, boolean positive, VOperand value, VLabelRef<VCodeLabel> target)
Method Detail |
---|
public <E extends Throwable> void accept(VInstr.Visitor<E> v) throws E extends Throwable
VInstr
VInstr.Visitor
accept
in class VInstr
E extends Throwable
public <R,E extends Throwable> R accept(VInstr.VisitorR<R,E> v) throws E extends Throwable
VInstr
VInstr.VisitorR
accept
in class VInstr
E extends Throwable
public <P,E extends Throwable> void accept(P p, VInstr.VisitorP<P,E> v) throws E extends Throwable
VInstr
VInstr.VisitorP
accept
in class VInstr
E extends Throwable
public <P,R,E extends Throwable> R accept(P p, VInstr.VisitorPR<P,R,E> v) throws E extends Throwable
VInstr
VInstr.VisitorPR
accept
in class VInstr
E extends Throwable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |