All Packages Class Hierarchy This Package Previous Next Index
Class harpoon.IR.QuadSSA.SWITCH
java.lang.Object
|
+----harpoon.IR.QuadSSA.Quad
|
+----harpoon.IR.QuadSSA.SIGMA
|
+----harpoon.IR.QuadSSA.SWITCH
- public class SWITCH
- extends SIGMA
SWITCH
represents a switch construct.
- Version:
- $Id: SWITCH.java,v 1.14 1998/11/10 03:34:11 cananian Exp $
- Author:
- C. Scott Ananian <cananian@alumni.princeton.edu>
-
index
- The discriminant, compared against each value in
keys
.
-
keys
- Integer keys for switch cases.
-
SWITCH(HCodeElement, Temp, int[], Temp[])
-
-
SWITCH(HCodeElement, Temp, int[], Temp[][], Temp[])
- Creates a
SWITCH
operation.
-
clone()
- Properly clone
keys[]
array.
-
renameDefs(TempMap)
- Rename all defined variables in this Quad according to a mapping.
-
renameUses(TempMap)
- Rename all used variables in this Quad according to a mapping.
-
toString()
- Returns human-readable representation of this quad.
-
use()
- Returns the Temp used by this quad.
-
visit(QuadVisitor)
- Accept a visitor.
index
public Temp index
- The discriminant, compared against each value in
keys
.
keys
public int keys[]
- Integer keys for switch cases.
next(n)
is the jump target corresponding to
keys[n]
for 0 <= n < keys.length
.
next(keys.length)
is the default target.
SWITCH
public SWITCH(HCodeElement source,
Temp index,
int keys[],
Temp dst[][],
Temp src[])
- Creates a
SWITCH
operation.
next[n]
is the jump target corresponding to
keys[n]
for 0 <= n < keys.length
.
next[keys.length]
is the default target.
SWITCH
public SWITCH(HCodeElement source,
Temp index,
int keys[],
Temp src[])
use
public Temp[] use()
- Returns the Temp used by this quad.
- Returns:
- the
index
field.
- Overrides:
- use in class SIGMA
renameUses
public void renameUses(TempMap tm)
- Rename all used variables in this Quad according to a mapping.
- Overrides:
- renameUses in class SIGMA
renameDefs
public void renameDefs(TempMap tm)
- Rename all defined variables in this Quad according to a mapping.
- Overrides:
- renameDefs in class SIGMA
clone
public Object clone()
- Properly clone
keys[]
array.
- Overrides:
- clone in class SIGMA
visit
public void visit(QuadVisitor v)
- Accept a visitor.
- Overrides:
- visit in class SIGMA
toString
public String toString()
- Returns human-readable representation of this quad.
- Overrides:
- toString in class SIGMA
All Packages Class Hierarchy This Package Previous Next Index