|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcfg.TACInst
cfg.ParamInst
cfg.ErrParamInst
public class ErrParamInst
A class representing a three-address code error parameter instruction (ErrParamInst). These parameters are used in calls to error subroutines to hold things such as filenames and line numbers, etc. An error parameter instruction consists of a type (e.g., ErrParamInst.FILENAME, etc.) and a source value (inherited from ParamInst). From TACInst it also inherits an opcode (ERRPARAM).
Field Summary | |
---|---|
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.) |
Fields inherited from class cfg.ParamInst |
---|
paramType, 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 | |
---|---|
ErrParamInst(int type,
java.lang.String value)
ErrParamInst constructor |
Method Summary | ||
---|---|---|
|
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.) |
Methods inherited from class cfg.ParamInst |
---|
getParamType, getSource, setSource |
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 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
Constructor Detail |
---|
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)Method Detail |
---|
public int getType()
public boolean equals(java.lang.Object o)
equals
in class ParamInst
o
- object to compare the reference object with
public java.lang.String getString()
getString
in class ParamInst
public <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 |