|
|||||||||
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.SIGMA
harpoon.IR.Quads.SWITCH
public class SWITCH
SWITCH
represents a switch construct.
Field Summary | |
---|---|
protected Temp |
index
The discriminant, compared against each value in keys . |
protected int[] |
keys
Integer keys for switch cases. |
Fields inherited from class harpoon.IR.Quads.SIGMA |
---|
dst, src |
Fields inherited from class harpoon.IR.Quads.Quad |
---|
arrayFactory |
Constructor Summary | |
---|---|
SWITCH(QuadFactory qf,
HCodeElement source,
Temp index,
int[] keys,
Temp[] src)
Creates a switch with arity defined by the keys array. |
|
SWITCH(QuadFactory qf,
HCodeElement source,
Temp index,
int[] keys,
Temp[][] dst,
Temp[] src)
Creates a SWITCH operation. |
Method Summary | ||
---|---|---|
|
accept(QuadValueVisitor<T> v)
|
|
void |
accept(QuadVisitor v)
Accept a visitor. |
|
Temp |
index()
Returns the Temp holding the discriminant. |
|
int[] |
keys()
Returns the array of integer keys for the switch cases. |
|
int |
keys(int i)
Returns a given element in the keys array. |
|
int |
keysLength()
Returns the length of the keys array. |
|
int |
kind()
Return an integer enumeration of the kind of this Quad . |
|
Quad |
rename(QuadFactory qqf,
TempMap defMap,
TempMap useMap)
Create a new Quad identical to the receiver, but
with all Temp s renamed according to a mapping. |
|
String |
toString()
Returns human-readable representation of this quad. |
|
Temp[] |
use()
Returns the Temp used by this quad. |
Methods inherited from class harpoon.IR.Quads.SIGMA |
---|
arity, assign, def, dst, dst, dst, numSigmas, removeSigma, src, src |
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 index
keys
.
protected int[] keys
next(n)
is the jump target corresponding to
keys[n]
for 0 <= n < keys.length
.
next(keys.length)
is the default target.
Constructor Detail |
---|
public SWITCH(QuadFactory qf, HCodeElement source, Temp index, int[] keys, Temp[][] dst, Temp[] src)
SWITCH
operation.
next[n]
is the jump target corresponding to
keys[n]
for 0 <= n < keys.length
.
next[keys.length]
is the default target.
index
- the discriminant.keys
- integer keys for switch cases.dst
- sigma function left-hand sides.src
- sigma function arguments.public SWITCH(QuadFactory qf, HCodeElement source, Temp index, int[] keys, Temp[] src)
Method Detail |
---|
public Temp index()
Temp
holding the discriminant.
public int[] keys()
public int keys(int i)
keys
array.
public int keysLength()
keys
array.
public Temp[] use()
Temp
used by this quad.
use
in interface UseDefable
use
in class SIGMA
index
field.public int kind()
Quad
Quad
. The enumerated values are defined in
QuadKind
.
kind
in class Quad
public Quad rename(QuadFactory qqf, TempMap defMap, TempMap useMap)
Quad
Quad
identical to the receiver, but
with all Temp
s renamed according to a mapping.
The new Quad
will have no edges.
The new Quad
will come from the specified
QuadFactory
.
rename
in class Quad
public void accept(QuadVisitor v)
Quad
accept
in class SIGMA
public <T> T accept(QuadValueVisitor<T> v)
accept
in class SIGMA
public String toString()
toString
in class SIGMA
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |