|
||||||||||
| 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, REFPARAM, RETN, STDPARAM, STENTRY, UNNEG, UNNOT |
| Constructor Summary | |
|---|---|
ReturnInst(java.lang.String source)
ReturnInst constructor |
|
| Method Summary | |
|---|---|
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 expression| Method 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 TACInsto - object to compare the reference object with
public java.lang.String getString()
getString in class TACInst
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||