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>

Variable Index

 o index
The discriminant, compared against each value in keys.
 o keys
Integer keys for switch cases.

Constructor Index

 o SWITCH(HCodeElement, Temp, int[], Temp[])
 o SWITCH(HCodeElement, Temp, int[], Temp[][], Temp[])
Creates a SWITCH operation.

Method Index

 o clone()
Properly clone keys[] array.
 o renameDefs(TempMap)
Rename all defined variables in this Quad according to a mapping.
 o renameUses(TempMap)
Rename all used variables in this Quad according to a mapping.
 o toString()
Returns human-readable representation of this quad.
 o use()
Returns the Temp used by this quad.
 o visit(QuadVisitor)
Accept a visitor.

Variables

 o index
 public Temp index
The discriminant, compared against each value in keys.

 o 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.

Constructors

 o 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.

 o SWITCH
 public SWITCH(HCodeElement source,
               Temp index,
               int keys[],
               Temp src[])

Methods

 o use
 public Temp[] use()
Returns the Temp used by this quad.

Returns:
the index field.
Overrides:
use in class SIGMA
 o renameUses
 public void renameUses(TempMap tm)
Rename all used variables in this Quad according to a mapping.

Overrides:
renameUses in class SIGMA
 o renameDefs
 public void renameDefs(TempMap tm)
Rename all defined variables in this Quad according to a mapping.

Overrides:
renameDefs in class SIGMA
 o clone
 public Object clone()
Properly clone keys[] array.

Overrides:
clone in class SIGMA
 o visit
 public void visit(QuadVisitor v)
Accept a visitor.

Overrides:
visit in class SIGMA
 o 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