|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcfg.TACInst
cfg.LoadInst
cfg.LoadConstInst
public class LoadConstInst
A class representing a three-address code load constant instruction (LoadConstInst). A load constant instruction consists of a destination variable and a source constant (int, boolean, or String), which are both inherited from LoadInst. It also contains (non-inherited) type, which indicates the constant type (int, boolean, or String). From TACInst it also inherits an opcode (LDCONST).
Field Summary | |
---|---|
static int |
BOOL
Boolean constant ID |
static int |
INT
Integer constant ID |
static int |
NULL
Null constant ID |
static int |
STR
String constant ID |
Fields inherited from class cfg.LoadInst |
---|
destination, source |
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 | |
---|---|
LoadConstInst(java.lang.String destination,
java.lang.String source)
LoadConstInst constructor |
Method Summary | ||
---|---|---|
|
accept(TACInstVisitor<ReturnType,ArgumentType> visitor,
ArgumentType o)
Abstract visitor method. |
|
int |
getType()
Get the type of the constant (e.g., LoadConstInst.INT) |
|
void |
setSource(java.lang.String source)
Set the source operand |
Methods inherited from class cfg.LoadInst |
---|
equals, getDestination, getSource, getString, setDestination |
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 |
---|
public static final int INT
public static final int BOOL
public static final int STR
public static final int NULL
Constructor Detail |
---|
public LoadConstInst(java.lang.String destination, java.lang.String source)
destination
- destination variablesource
- source constant (int, boolean, String, or null -- String
needs double quotes)Method Detail |
---|
public int getType()
public void setSource(java.lang.String source)
setSource
in class LoadInst
source
- new source operandpublic <ReturnType,ArgumentType> ReturnType accept(TACInstVisitor<ReturnType,ArgumentType> visitor, ArgumentType o)
TACInst
accept
in class TACInst
visitor
- TACInstVisitor.o
- Data to pass down.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |