|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectharpoon.IR.Quads.Quad
harpoon.IR.Quads.COMPONENTOF
public class COMPONENTOF
COMPONENTOF objects implement the test needed to determine
if an ASET needs to throw an exception. Specifically,
COMPONENTOF evaluates to boolean true if
a certain temporary is an instance of the component
type of a certain array, or boolean false otherwise.
The given array should never have components of primitive
type, as COMPONENTOF would always return true in
this case, given a type-safe program.
In quad-with-try form ONLY:
The component object to test (componentref) may have
the value null, in which case COMPONENTOF returns
true (it is always safe to store null
in an object array).
In all other forms the component object must be provably
non-null. An explicit null-check may be needed prior to the
COMPONENTOF if the component object cannot be
proven non-null.
ASET,
"The Java Virtual Machine Specification",
Serialized Form| Field Summary | |
|---|---|
protected Temp |
arrayref
The array object to test. |
protected Temp |
dst
The Temp in which to store the result of the test. |
protected Temp |
objectref
The component object to test. |
| Fields inherited from class harpoon.IR.Quads.Quad |
|---|
arrayFactory |
| Constructor Summary | |
|---|---|
COMPONENTOF(QuadFactory qf,
HCodeElement source,
Temp dst,
Temp arrayref,
Temp objectref)
Creates a COMPONENTOF representing a typecheck test. |
|
| Method Summary | ||
|---|---|---|
|
accept(QuadValueVisitor<T> v)
|
|
void |
accept(QuadVisitor v)
Accept a visitor. |
|
Temp |
arrayref()
Returns the array reference to test. |
|
Temp[] |
def()
Returns the Temps defined by this quad. |
|
Temp |
dst()
Returns the Temp in which to store the result of the
type check test. |
|
int |
kind()
Return an integer enumeration of the kind of this Quad. |
|
Temp |
objectref()
Returns the component object reference to test. |
|
Quad |
rename(QuadFactory qqf,
TempMap defMap,
TempMap useMap)
Create a new Quad identical to the receiver, but
with all Temps renamed according to a mapping. |
|
String |
toString()
Returns a human-readable representation of this Quad. |
|
Temp[] |
use()
Returns the Temps used by this quad. |
|
| Methods inherited from class harpoon.IR.Quads.Quad |
|---|
addEdge, addEdges, addHandlers, clone, clone, clone, compareTo, defC, edgeC, edges, getFactory, getID, getLineNumber, getSourceFile, handlers, hashCode, isPred, isSucc, map, map, map, next, next, nextEdge, nextEdge, nextLength, pred, predC, prev, prev, prevEdge, prevEdge, prevLength, remove, removeHandlers, rename, replace, succ, succC, toLongString, transferHandlers, useC |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Temp dst
Temp in which to store the result of the test.
protected Temp arrayref
protected Temp objectref
| Constructor Detail |
|---|
public COMPONENTOF(QuadFactory qf,
HCodeElement source,
Temp dst,
Temp arrayref,
Temp objectref)
COMPONENTOF representing a typecheck test.
dst - the Temp in which to store the result of the test.
The Temp specified by dst gets a
boolean true value if objectref
contains a reference to an instance
of the component type of the array in arrayref
or any subtype; or a boolean false value otherwise.
In quad-with-try form only, the result is also
true if objectref is
null; in all other forms this possibility
is a semantic error.arrayref - the array object to test. Should never be an
array of primitive component type.
The Temp specified by arrayref
should never contain the value
null at run-time.objectref - the component object to test.
The Temp specified by objectref
may contain the value null
at run-time if and only if we are in
quad-with-try form.| Method Detail |
|---|
public Temp dst()
Temp in which to store the result of the
type check test.
public Temp arrayref()
public Temp objectref()
public Temp[] use()
Temps used by this quad.
use in interface UseDefableuse in class Quadpublic Temp[] def()
Temps defined by this quad.
def in interface UseDefabledef in class Quadpublic int kind()
QuadQuad. The enumerated values are defined in
QuadKind.
kind in class Quad
public Quad rename(QuadFactory qqf,
TempMap defMap,
TempMap useMap)
QuadQuad identical to the receiver, but
with all Temps renamed according to a mapping.
The new Quad will have no edges.
The new Quad will come from the specified
QuadFactory.
rename in class Quadpublic void accept(QuadVisitor v)
Quad
accept in class Quadpublic <T> T accept(QuadValueVisitor<T> v)
accept in class Quadpublic String toString()
toString in class Quad
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||