cfg
Class DirCallInst
java.lang.Object
cfg.TACInst
cfg.CallInst
cfg.DirCallInst
public class DirCallInst
- extends CallInst
A class representing a three-address code indirect call instruction
(DirCallInst).
An direct call instruction consists of a target label to jump to (inherited
from
CallInst), an optional destination variable to assign the result of the call
to
(inherited from CallInst), and the number of parameters (ref. and standard)
used
by the call (inherited from CallInst). From TACInst it also inherits an
opcode
(DIRCALL).
- 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 |
DirCallInst(java.lang.String targLabel,
java.lang.String destVar,
int numParams)
DirCallInst constructor |
Method Summary |
<ReturnType,ArgumentType>
ReturnType |
|
accept(TACInstVisitor<ReturnType,ArgumentType> visitor,
ArgumentType o)
Abstract visitor method. |
void |
setTarget(java.lang.String target)
Set the target of the call |
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 |
DirCallInst
public DirCallInst(java.lang.String targLabel,
java.lang.String destVar,
int numParams)
- DirCallInst constructor
- Parameters:
targLabel
- target label to jump todestVar
- (Optional) destination variable to assign result of call
(null if none)numParams
- number of parameters (both ref. and standard but not
error)
setTarget
public void setTarget(java.lang.String target)
- Set the target of the call
- Specified by:
setTarget
in class CallInst
- Parameters:
target
- new target
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.