coins.ssa
Class DivideExpression

java.lang.Object
  extended bycoins.ssa.DivideExpression
All Implemented Interfaces:
LocalTransformer, Transformer

class DivideExpression
extends java.lang.Object
implements LocalTransformer

Divide expressions into 3 address expression.


Field Summary
static java.lang.String DIVEX
          The name of the symbol which the optimzer uses to make the temporary variables
static int THR
          The threshold of the debug print
 
Constructor Summary
DivideExpression(SsaEnvironment e, SsaSymTab symtab)
          Constructor
 
Method Summary
(package private)  LirNode divide(LirNode node, BiLink link, boolean setSrc, boolean setDst)
          Divide the expression into 3 address expression recursively.
 boolean doIt(Data data, ImList args)
          Transform the DATA component.
 boolean doIt(Function f, ImList args)
          Divide the expressions into 3 address expression.
 java.lang.String name()
          Return the name of the transforming engine.
 java.lang.String subject()
          Return brief description of the tranformation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

THR

public static final int THR
The threshold of the debug print

See Also:
Constant Field Values

DIVEX

public static final java.lang.String DIVEX
The name of the symbol which the optimzer uses to make the temporary variables

See Also:
Constant Field Values
Constructor Detail

DivideExpression

public DivideExpression(SsaEnvironment e,
                        SsaSymTab symtab)
Constructor

Parameters:
e - The environment of the SSA module
symtab - The current symbol table
Method Detail

doIt

public boolean doIt(Data data,
                    ImList args)
Description copied from interface: LocalTransformer
Transform the DATA component.

Specified by:
doIt in interface LocalTransformer
Parameters:
data - DATA to be transformed.
args - list of optional arguments.
Returns:
true if transformation suceeded.

name

public java.lang.String name()
Description copied from interface: Transformer
Return the name of the transforming engine. Used for trace tag name.

Specified by:
name in interface Transformer
Returns:
the name of the transforming engine.

subject

public java.lang.String subject()
Description copied from interface: Transformer
Return brief description of the tranformation.

Specified by:
subject in interface Transformer
Returns:
brief description of the tranformation.

doIt

public boolean doIt(Function f,
                    ImList args)
Divide the expressions into 3 address expression.

Specified by:
doIt in interface LocalTransformer
Parameters:
f - The current function
args - The list of options
Returns:
true if transformation suceeded.

divide

LirNode divide(LirNode node,
               BiLink link,
               boolean setSrc,
               boolean setDst)
Divide the expression into 3 address expression recursively.

Parameters:
node - The current LIR node
link - The place where the new expression attachs to
setSrc - Whether the current LIR node is from the source operands of the SET operator
setDst - Whether the current LIR node is from the destination operands of the SET operator
Returns:
The divided LIR node