public abstract class LoadInst extends TACInst
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
destination
Destination variable
|
protected java.lang.String |
source
Source operand (type of source varies in different load instructions)
|
Constructor and Description |
---|
LoadInst(int opcode,
java.lang.String destination,
java.lang.String source)
LoadInst constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Compares this object with the parameter object
|
java.lang.String |
getDestination()
Get the destination operand variable
|
java.lang.String |
getSource()
Get the source operand
|
java.lang.String |
getString()
Get string representation of instruction (without comments)
(note: in general, you want to use toString() to get instruction string)
|
void |
setDestination(java.lang.String destination)
Set the destination operand variable
|
abstract void |
setSource(java.lang.String source)
Set the source operand
|
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 destination
protected java.lang.String source
public LoadInst(int opcode, java.lang.String destination, java.lang.String source)
opcode
- opcode of load instructiondestination
- destination variablesource
- source operand (type of source varies in different loads)public java.lang.String getDestination()
public void setDestination(java.lang.String destination)
destination
- new destination operandpublic java.lang.String getSource()
public abstract void setSource(java.lang.String source)
source
- new source operandpublic boolean equals(java.lang.Object o)
public java.lang.String getString()