coins.opt
Class ConstFoldingHir

java.lang.Object
  extended bycoins.opt.ConstFolding
      extended bycoins.opt.ConstFoldingHir

public class ConstFoldingHir
extends ConstFolding

This class performs constant folding operations that are specific to HIR.


Field Summary
 HIR hir
           
 Opt opt
           
 
Fields inherited from class coins.opt.ConstFolding
flowRoot, fResults, fSubpFlow, JAVA_BYTE_SIZE, JAVA_CHAR_SIZE, JAVA_INT_SIZE, JAVA_LONG_SIZE, JAVA_SHORT_SIZE
 
Constructor Summary
ConstFoldingHir(FlowResults pResults)
          ConstFoldingHir Creates new ConstFoldingHir
 
Method Summary
static HIR foldBinary(HIR pParent, FlowRoot pFlowRoot)
          foldBinary
static HIR foldUnary(HIR pParent, FlowRoot pFlowRoot)
          foldUnary
(package private)  IR getChild1(IR pIR)
          getChild1
(package private)  IR getChild2(IR pIR)
          getChild2
(package private)  boolean isConstNode(IR pIR)
          isConstNode
 
Methods inherited from class coins.opt.ConstFolding
doBBlock, doSubp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hir

public final HIR hir

opt

public final Opt opt
Constructor Detail

ConstFoldingHir

public ConstFoldingHir(FlowResults pResults)
ConstFoldingHir Creates new ConstFoldingHir

Method Detail

isConstNode

boolean isConstNode(IR pIR)
isConstNode


getChild1

IR getChild1(IR pIR)
getChild1


getChild2

IR getChild2(IR pIR)
getChild2


foldUnary

public static HIR foldUnary(HIR pParent,
                            FlowRoot pFlowRoot)
foldUnary


foldBinary

public static HIR foldBinary(HIR pParent,
                             FlowRoot pFlowRoot)
foldBinary