cfg
Class LoadVarInst
java.lang.Object
cfg.TACInst
cfg.LoadInst
cfg.LoadVarInst
public class LoadVarInst
- extends LoadInst
A class representing a three-address code load variable (move) instruction
(LoadVarInst). A load variable instruction consists of a destination variable
and a source variable (inherited from LoadInst). From TACInst it also
inherits an opcode (LDVAR).
- Author:
- Marc Corliss and Lori Pietraszek
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 |
LoadVarInst(java.lang.String destination,
java.lang.String source)
LoadVarInst constructor |
Method Summary |
<ReturnType,ArgumentType>
ReturnType |
|
accept(TACInstVisitor<ReturnType,ArgumentType> visitor,
ArgumentType o)
Abstract visitor method. |
void |
setSource(java.lang.String source)
Set the source operand |
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 |
LoadVarInst
public LoadVarInst(java.lang.String destination,
java.lang.String source)
- LoadVarInst constructor
- Parameters:
destination
- destination variablesource
- source variable
setSource
public void setSource(java.lang.String source)
- Set the source operand
- Specified by:
setSource
in class LoadInst
- Parameters:
source
- new source operand
accept
public <ReturnType,ArgumentType> ReturnType accept(TACInstVisitor<ReturnType,ArgumentType> visitor,
ArgumentType o)
- Description copied from class:
TACInst
- Abstract visitor method.
- Specified by:
accept
in class TACInst
- Parameters:
visitor
- TACInstVisitor.o
- Data to pass down.
- Returns:
- return value of visitor.