public class Xobject extends PropObject implements IXobject, XobjectVisitable, IVarContainer
Modifier and Type | Field and Description |
---|---|
static int |
OPT_ATOMIC_STMT |
static int |
OPT_DELAYED_DECL |
static int |
OPT_F_MODULE_VAR |
static int |
OPT_GCC_EXTENSION |
static int |
OPT_GCC_SYNTAX |
static int |
OPT_GCC_THREAD |
static int |
OPT_GLOBAL |
static int |
OPT_INDUCTION_VAR |
static int |
OPT_PARSED |
static int |
OPT_REWRITTED_XMP |
static int |
OPT_SYNTAX_MODIFIED |
static int |
OPT_TO_BE_FCOMMON |
static int |
OPT_USED_IN_ARRAY_SIZE |
protected IXobject |
parent |
id
FINDKIND_ANY, FINDKIND_COMMON, FINDKIND_TAGNAME, FINDKIND_TYPEDEF_NAME, FINDKIND_VAR
Constructor and Description |
---|
Xobject(Xcode code,
Xtype type) |
Xobject(Xcode code,
Xtype type,
int optional_flags)
Constructs an Xobject with code and type.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Xobject a)
Dummy method at base class, it causes exception.
|
bottomupXobjectIterator |
bottomupIterator() |
boolean |
canGetInt() |
Xobject |
cfold(Block block) |
Xobject |
copy()
Dummy method at base class, it causes exception.
|
protected Xobject |
copyTo(Xobject o) |
boolean |
enter(XobjectVisitor visitor) |
boolean |
equals(java.lang.Object x)
check the equality of two objects
|
boolean |
equals(Xobject x) |
Xobject |
extent(int dim) |
Xobject |
extent(int dim,
Block block) |
Xobject[] |
extents() |
Xobject[] |
extents(Block block) |
Ident |
find(java.lang.String name,
int find_kind)
find symbol object.
|
Ident |
findCommonIdent(java.lang.String name) |
Ident |
findVarIdent(java.lang.String name) |
Xobject |
getArg(int i)
Return argument list in XobjArgs.
|
Xobject |
getArgOrNull(int i)
Get the i-th argument or null if no i-th argument.
|
XobjArgs |
getArgs()
Get an argument list XobjArgs.
|
double |
getFloat()
Returns floating value if XobjLong.
|
java.lang.String |
getFloatString() |
int |
getFrank(Block block)
Get rank in the term of Fortran.
|
XobjList |
getIdentList()
Get argument of 1 as XobjList.
|
int |
getInt()
Returns integer value in XobjInt.
|
LineNo |
getLineNo()
Dummy method at base class, it returns null.
|
long |
getLong()
Returns long value (64bits) if XobjLong.
|
long |
getLongHigh()
Returns high part of long value if XobjLong.
|
long |
getLongLow()
Returns low part of long value if XobjLong.
|
Ident |
getMember(java.lang.String name) |
java.lang.String |
getName()
Returns Name of Xobject.
|
protected boolean |
getOptionalFlag(int flag) |
int |
getOptionalFlags() |
IXobject |
getParent()
get parent IXobject.
|
VarScope |
getScope() |
java.lang.String |
getString()
Returns string in XobjString.
|
Xobject |
getSubscripts() |
java.lang.String |
getSym()
Returns Symbol name in XobjString.
|
Xobject |
getTail()
Dummy method at base class, it causes exception.
|
boolean |
hasNullArg() |
void |
insert(Xobject a)
Dummy method at base class, it causes exception.
|
boolean |
isArray() |
boolean |
isArrayAddr() |
boolean |
isAsgOp()
return ture if this object is an assignment with binary operation
|
boolean |
isAtomicStmt() |
boolean |
isBinaryOp()
return true if this object is binary operation.
|
boolean |
isCglobalVarOrFvar() |
boolean |
isConstant()
return true if this is an constant object
|
boolean |
isDelayedDecl() |
boolean |
isEmpty()
Returns true if no argument in XobjArgs.
|
boolean |
isEmptyList() |
boolean |
isExternalCode() |
boolean |
isFmoduleVar() |
boolean |
isGccExtension() |
boolean |
isGccSyntax() |
boolean |
isGccThread() |
boolean |
isIndexRange() |
boolean |
isInductionVar() |
boolean |
isIntConstant()
return true if this object is integer constant
|
boolean |
isLocalOrParamVar() |
boolean |
isLocalOrParamVarAddr() |
boolean |
isLogicalOp()
return true if this object is a logical operation.
|
boolean |
isOneConstant()
return true if this object is one integer constant.
|
boolean |
isParsed() |
boolean |
isPragma() |
boolean |
isRewrittedByXmp() |
boolean |
isScopeGlobal() |
boolean |
isScopeLocal() |
boolean |
isScopeParam() |
boolean |
isSet()
return ture if this object is an assignment.
|
boolean |
isSyntaxModified() |
boolean |
isTempVar() |
boolean |
isTerminal()
return true if this object is a terminal object
|
boolean |
isToBeFcommon() |
boolean |
isUnaryOp()
return true if this object is unary operation.
|
boolean |
isVarAddr() |
boolean |
isVariable()
Return true if the Xobject is a variable.
|
boolean |
isVarRef() |
boolean |
isZeroConstant()
return true if this object is zero integer constant.
|
Xobject |
lbound(int dim) |
Xobject |
lbound(int dim,
Block block) |
Xobject[] |
lbounds() |
Xobject[] |
lbounds(Block block) |
Xobject |
left()
Dummy method at base class, it causes exception.
|
int |
Nargs()
Get number of argument in XobjArgs.
|
static Xcode |
newCode() |
Xcode |
Opcode()
Returns the code of this Xobject
|
java.lang.String |
OpcodeName() |
Xobject |
operand()
Dummy method at base class, it causes exception.
|
Xobject |
removeArgs(XobjArgs a)
Remove the specified argument in XobjArgs
Dummy method at base class, it causes exception.
|
Xobject |
removeFirstArgs()
Remove the first argument in XobjArgs
Dummy method at base class, it causes exception.
|
Xobject |
removeLastArgs()
Remove the last argument in XobjArgs
Dummy method at base class, it causes exception.
|
Xobject |
right()
Dummy method at base class, it causes exception.
|
void |
setArg(int i,
Xobject x)
Set argument list in XobjArg.
|
void |
setArgs(XobjArgs l)
Set an argument list in XobjArgs.
|
void |
setIsAtomicStmt(boolean enabled) |
void |
setIsDelayedDecl(boolean enabled) |
void |
setIsFmoduleVar(boolean enabled) |
void |
setIsGccExtension(boolean enabled) |
void |
setIsGccSyntax(boolean enabled) |
void |
setIsGccThread(boolean enabled) |
void |
setIsGlobal(boolean enabled) |
void |
setIsInductionVar(boolean enabled) |
void |
setIsParsed(boolean enabled) |
void |
setIsRewrittedByXmp(boolean enabled) |
void |
setIsSyntaxModified(boolean enabled) |
void |
setIsToBeFcommon(boolean enabled) |
void |
setLeft(Xobject x)
Dummy method at base class, it causes exception.
|
void |
setLineNo(LineNo ln)
Dummy method at base class, it causes exception.
|
void |
setName(java.lang.String name)
Returns Name of Xobject.
|
void |
setOperand(Xobject x)
Dummy method at base class, it causes exception.
|
protected void |
setOptionalFlag(int flag,
boolean enabled) |
void |
setOptionalFlags(int optional_flags) |
void |
setParentRecursively(IXobject parent)
set parent IXobject.
|
void |
setRight(Xobject x)
Dummy method at base class, it causes exception.
|
void |
setScope(VarScope scope) |
void |
setType(Xtype type)
Sets the type of this Xobject
|
topdownXobjectIterator |
topdownIterator() |
java.lang.String |
toString() |
Xtype |
Type()
Returns the type of this Xobject
|
Xobject |
ubound(int dim) |
Xobject |
ubound(int dim,
Block block) |
Xobject[] |
ubounds() |
Xobject[] |
ubounds(Block block) |
getProp, getProperties, Id, remProp, remProperties, setId, setProp, setProperties
protected IXobject parent
public static final int OPT_GCC_THREAD
public static final int OPT_GCC_EXTENSION
public static final int OPT_GCC_SYNTAX
public static final int OPT_SYNTAX_MODIFIED
public static final int OPT_PARSED
public static final int OPT_USED_IN_ARRAY_SIZE
public static final int OPT_TO_BE_FCOMMON
public static final int OPT_DELAYED_DECL
public static final int OPT_GLOBAL
public static final int OPT_ATOMIC_STMT
public static final int OPT_F_MODULE_VAR
public static final int OPT_INDUCTION_VAR
public static final int OPT_REWRITTED_XMP
public Xobject(Xcode code, Xtype type, int optional_flags)
public final Xcode Opcode()
public final Xtype Type()
public final void setType(Xtype type)
public final int getOptionalFlags()
public final void setOptionalFlags(int optional_flags)
protected void setOptionalFlag(int flag, boolean enabled)
protected boolean getOptionalFlag(int flag)
public final boolean isGccThread()
public final void setIsGccThread(boolean enabled)
public final boolean isGccExtension()
public final void setIsGccExtension(boolean enabled)
public final boolean isGccSyntax()
public final void setIsGccSyntax(boolean enabled)
public final boolean isSyntaxModified()
public final void setIsSyntaxModified(boolean enabled)
public final boolean isParsed()
public final void setIsParsed(boolean enabled)
public final boolean isToBeFcommon()
public final void setIsToBeFcommon(boolean enabled)
public final boolean isDelayedDecl()
public final void setIsDelayedDecl(boolean enabled)
public final boolean isCglobalVarOrFvar()
public final void setIsGlobal(boolean enabled)
public final boolean isAtomicStmt()
public final void setIsAtomicStmt(boolean enabled)
public final boolean isFmoduleVar()
public final void setIsFmoduleVar(boolean enabled)
public final boolean isInductionVar()
public final void setIsInductionVar(boolean enabled)
public final boolean isRewrittedByXmp()
public final void setIsRewrittedByXmp(boolean enabled)
public VarScope getScope()
public final void setScope(VarScope scope)
public final boolean isScopeGlobal()
public final boolean isScopeLocal()
public final boolean isScopeParam()
public int getInt()
public boolean canGetInt()
public java.lang.String getString()
public java.lang.String getSym()
public java.lang.String getName()
public void setName(java.lang.String name)
public double getFloat()
public java.lang.String getFloatString()
public long getLong()
public long getLongHigh()
public long getLongLow()
public int getFrank(Block block)
public Xobject getSubscripts()
public Xobject getArg(int i)
public Xobject getArgOrNull(int i)
public void setArg(int i, Xobject x)
public int Nargs()
public XobjList getIdentList()
public boolean isEmpty()
public XobjArgs getArgs()
public void setArgs(XobjArgs l)
public Xobject removeArgs(XobjArgs a)
public Xobject removeFirstArgs()
public Xobject removeLastArgs()
public Xobject operand()
public Xobject left()
public Xobject right()
public void setOperand(Xobject x)
public void setLeft(Xobject x)
public void setRight(Xobject x)
public void add(Xobject a)
public Xobject getTail()
public void insert(Xobject a)
public Xobject copy()
public void setLineNo(LineNo ln)
public LineNo getLineNo()
public boolean equals(java.lang.Object x)
equals
in class java.lang.Object
public boolean equals(Xobject x)
public final java.lang.String OpcodeName()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isVariable()
public boolean isLocalOrParamVar()
public boolean isTempVar()
public boolean isVarAddr()
public boolean isLocalOrParamVarAddr()
public boolean isArray()
public boolean isArrayAddr()
public boolean isConstant()
public boolean isVarRef()
public boolean isZeroConstant()
public boolean isOneConstant()
public boolean isIntConstant()
public boolean isSet()
public boolean isBinaryOp()
public boolean isUnaryOp()
public boolean isAsgOp()
public boolean isTerminal()
public boolean isLogicalOp()
public boolean isPragma()
public boolean enter(XobjectVisitor visitor)
enter
in interface XobjectVisitable
public static Xcode newCode() throws XmException
XmException
public boolean isExternalCode()
public topdownXobjectIterator topdownIterator()
public bottomupXobjectIterator bottomupIterator()
public Ident getMember(java.lang.String name)
public IXobject getParent()
IXobject
public void setParentRecursively(IXobject parent)
IXobject
setParentRecursively
in interface IXobject
public Ident find(java.lang.String name, int find_kind)
IXobject
public Xobject lbound(int dim)
public Xobject[] lbounds()
public Xobject ubound(int dim)
public Xobject[] ubounds()
public Xobject extent(int dim)
public Xobject[] extents()
public Ident findVarIdent(java.lang.String name)
findVarIdent
in interface IVarContainer
public Ident findCommonIdent(java.lang.String name)
findCommonIdent
in interface IVarContainer
public boolean isEmptyList()
public boolean hasNullArg()
public boolean isIndexRange()