|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcfg.TACInst
cfg.ReturnInst
public class ReturnInst
A class representing a three-address code return instruction (ReturnInst). An return instruction consists of an optional source operand holding the result of the return expression. From TACInst it also inherits an opcode (RETN).
Field Summary | |
---|---|
protected java.lang.String |
source
Source operand holding result of the return expression (null if none) |
Fields inherited from class cfg.TACInst |
---|
BINADD, BINAND, BINDIV, BINMOD, BINMUL, BINOR, BINSUB, comments, DIRCALL, ERRPARAM, IF, INDIRCALL, LDADDR, LDCONST, LDENTRY, LDVAR, NUM_INSN_TYPES, opcode, PHI, REFPARAM, RETN, STDPARAM, STENTRY, UNNEG, UNNOT |
Constructor Summary | |
---|---|
ReturnInst(java.lang.String source)
ReturnInst constructor |
Method Summary | ||
---|---|---|
|
accept(TACInstVisitor<ReturnType,ArgumentType> visitor,
ArgumentType o)
Abstract visitor method. |
|
boolean |
equals(java.lang.Object o)
Compares this object with the parameter object |
|
java.lang.String |
getSource()
Get the soure operand (result of return expression, null if none) |
|
java.lang.String |
getString()
Get string representation of instruction (without comments) (note: in general, you want to use toString() to get instruction string) |
|
void |
setSource(java.lang.String source)
Set the soure operand (result of return expression, to null if none) |
Methods inherited from class cfg.TACInst |
---|
addComment, checkBoolConst, checkConst, checkIntConst, checkLabel, checkStrConst, checkVar, getBinaryOpcode, getComments, getOp, getOpcode, getUnaryOpcode, isBinary, isCall, isIf, isLoad, isParam, isReturn, isStore, isUnary, isValidID, removeComments, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.lang.String source
Constructor Detail |
---|
public ReturnInst(java.lang.String source)
source
- source operand holding result of the return expressionMethod Detail |
---|
public java.lang.String getSource()
public void setSource(java.lang.String source)
source
- new source operandpublic boolean equals(java.lang.Object o)
equals
in class TACInst
o
- object to compare the reference object with
public java.lang.String getString()
getString
in class TACInst
public <ReturnType,ArgumentType> ReturnType accept(TACInstVisitor<ReturnType,ArgumentType> visitor, ArgumentType o)
TACInst
accept
in class TACInst
visitor
- TACInstVisitor.o
- Data to pass down.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |