public class ErrParamInst extends ParamInst
Modifier and Type | Field and Description |
---|---|
static int |
ARRAYIDXID
ID for array index error parameter (used in extended compiler only)
|
static int |
ARRAYSIZEID
ID for array size error parameter (used in extended compiler only)
|
static int |
FILENAME
ID for filename error parameter (used in all error calls)
|
static int |
LINENUM
ID for line number error parameter (used in all error calls)
|
static int |
OBJECTID
ID for object type error parameter (used in class cast errors only)
|
static int |
TARGETID
ID for target type error parameter (used in class cast errors only)
|
protected int |
type
Type (ID) of error parameter (e.g., ErrParamInst.FILENAME, etc.)
|
Constructor and Description |
---|
ErrParamInst(int type,
java.lang.String value)
ErrParamInst constructor
|
Modifier and Type | Method and Description |
---|---|
<ReturnType,ArgumentType> |
accept(TACInstVisitor<ReturnType,ArgumentType> visitor,
ArgumentType o)
Abstract visitor method.
|
boolean |
equals(java.lang.Object o)
Compares this object with the parameter object
|
java.lang.String |
getString()
Get string representation of instruction (without comments)
(note: in general, you want to use toString() to get instruction string)
|
int |
getType()
Get the type (ID) of error parameter (e.g., ErrParamInst.FILENAME, etc.)
|
getParamType, getSource, setSource
addComment, checkBoolConst, checkConst, checkIntConst, checkLabel, checkStrConst, checkVar, getBinaryOpcode, getComments, getOp, getOpcode, getUnaryOpcode, isBinary, isCall, isIf, isLoad, isParam, isPhi, isReturn, isStore, isUnary, isValidID, removeComments, toString
public static final int FILENAME
public static final int LINENUM
public static final int OBJECTID
public static final int TARGETID
public static final int ARRAYSIZEID
public static final int ARRAYIDXID
protected int type
public ErrParamInst(int type, java.lang.String value)
type
- type (ID) of error parameter (e.g., ErrParamInst.FILENAME,
etc.)value
- source value of error parameter (as a string)public int getType()
public boolean equals(java.lang.Object o)
public java.lang.String getString()
public <ReturnType,ArgumentType> ReturnType accept(TACInstVisitor<ReturnType,ArgumentType> visitor, ArgumentType o)
TACInst