public abstract class CallInst extends TACInst
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
callType
Type of call (e.g., "indircall", "dircall")
|
protected java.lang.String |
destVar
(Optional) destination variable to assign result of call (null if none)
|
protected java.lang.String |
target
Target to jump to
|
Constructor and Description |
---|
CallInst(int opcode,
java.lang.String callType,
java.lang.String target,
java.lang.String destVar,
int numParams)
CallInst constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Compares this object with the parameter object
|
java.lang.String |
getDestVar()
Get the destination variable (variable to assign result to -- null if none)
|
int |
getNumParam()
Get the number of parameters (both ref. and standard but not error)
|
java.lang.String |
getString()
Get string representation of instruction (without comments)
(note: in general, you want to use toString() to get instruction string)
|
java.lang.String |
getTarget()
Get the target of the call
|
void |
setDestVar(java.lang.String destVar)
Set the destination variable (variable to assign result to -- null if none)
|
void |
setNumParam(int numParams)
Set the number of parameters (both ref. and standard but not error)
|
abstract void |
setTarget(java.lang.String target)
Set the target of the call
|
accept, addComment, checkBoolConst, checkConst, checkIntConst, checkLabel, checkStrConst, checkVar, getBinaryOpcode, getComments, getOp, getOpcode, getUnaryOpcode, isBinary, isCall, isIf, isLoad, isParam, isPhi, isReturn, isStore, isUnary, isValidID, removeComments, toString
protected java.lang.String callType
protected java.lang.String target
protected java.lang.String destVar
public CallInst(int opcode, java.lang.String callType, java.lang.String target, java.lang.String destVar, int numParams)
opcode
- opcode of call instructioncallType
- type of call (e.g., "indircall", "dircall")target
- target 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)public java.lang.String getTarget()
public abstract void setTarget(java.lang.String target)
target
- new targetpublic java.lang.String getDestVar()
public void setDestVar(java.lang.String destVar)
destVar
- new destination variablepublic int getNumParam()
public void setNumParam(int numParams)
numParams
- new number of parameterspublic boolean equals(java.lang.Object o)
public java.lang.String getString()