at.dms.kjc.sir.lowering
Class Structurer

java.lang.Object
  extended by at.dms.util.Utils
      extended by at.dms.kjc.sir.lowering.Structurer
All Implemented Interfaces:
DeepCloneable, StreamVisitor, Serializable

public class Structurer
extends Utils
implements StreamVisitor

This creates structures (inner classes) to encapsulate the state of each hierarchical unit of a stream graph.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class at.dms.util.Utils
EMPTY_LIST, getForLoopCallers
 
Method Summary
 void doStructure(SIRStructure self)
          PLAIN-VISITS
 void postVisitFeedbackLoop(SIRFeedbackLoop self, SIRFeedbackLoopIter iter)
           
 void postVisitPipeline(SIRPipeline self, SIRPipelineIter iter)
          POST-VISITS
 void postVisitSplitJoin(SIRSplitJoin self, SIRSplitJoinIter iter)
           
 void preVisitFeedbackLoop(SIRFeedbackLoop self, SIRFeedbackLoopIter iter)
           
 void preVisitPipeline(SIRPipeline self, SIRPipelineIter iter)
          PRE-VISITS
 void preVisitSplitJoin(SIRSplitJoin self, SIRSplitJoinIter iter)
           
static JClassDeclaration structure(SIRIterator toplevel, JInterfaceDeclaration[] inners, SIRInterfaceTable[] tables, SIRStructure[] structures)
          Returns an array of class declaration's corresponding to the state structures used within .
 void visitFilter(SIRFilter self, SIRFilterIter iter)
          PLAIN-VISITS
 void visitPhasedFilter(SIRPhasedFilter self, SIRPhasedFilterIter iter)
           
 
Methods inherited from class at.dms.util.Utils
asPercent, cellMathEquivalent, cMathEquivalent, cppMathEquivalent, deepClone, deepCloneInto, equalArrays, fail, getEnvironmentVariable, getExpression, hasPeeks, initArray, initArray, initLiteralArray, intArrayToList, isMathMethod, isUniform, kopi_assert, kopi_assert, makeCountdownForLoop, makeDotFileName, makeForLoop, makeForLoop, makeForLoop, makeForLoopFieldIndex, makeForLoopLocalIndex, nextPow2, passThruParens, peelMarkers, popBeforePeek, readFile, removeUnusedPops, replaceAll, setupDotFileName, simplifyMathMethod, splitQualifiedName, splitQualifiedName, toArray, toIntArray, toVector, voidToInt, writeFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

structure

public static JClassDeclaration structure(SIRIterator toplevel,
                                          JInterfaceDeclaration[] inners,
                                          SIRInterfaceTable[] tables,
                                          SIRStructure[] structures)
Returns an array of class declaration's corresponding to the state structures used within . Also mutates the stream structure within so that each function within a stream takes its state as the first parameter, and references fields via the state. Finally, puts interface declarations and interface tables in toplevel structure.


doStructure

public void doStructure(SIRStructure self)
PLAIN-VISITS


visitFilter

public void visitFilter(SIRFilter self,
                        SIRFilterIter iter)
Description copied from interface: StreamVisitor
PLAIN-VISITS

Specified by:
visitFilter in interface StreamVisitor

visitPhasedFilter

public void visitPhasedFilter(SIRPhasedFilter self,
                              SIRPhasedFilterIter iter)
Specified by:
visitPhasedFilter in interface StreamVisitor

preVisitPipeline

public void preVisitPipeline(SIRPipeline self,
                             SIRPipelineIter iter)
PRE-VISITS

Specified by:
preVisitPipeline in interface StreamVisitor

preVisitSplitJoin

public void preVisitSplitJoin(SIRSplitJoin self,
                              SIRSplitJoinIter iter)
Specified by:
preVisitSplitJoin in interface StreamVisitor

preVisitFeedbackLoop

public void preVisitFeedbackLoop(SIRFeedbackLoop self,
                                 SIRFeedbackLoopIter iter)
Specified by:
preVisitFeedbackLoop in interface StreamVisitor

postVisitPipeline

public void postVisitPipeline(SIRPipeline self,
                              SIRPipelineIter iter)
Description copied from interface: StreamVisitor
POST-VISITS

Specified by:
postVisitPipeline in interface StreamVisitor

postVisitSplitJoin

public void postVisitSplitJoin(SIRSplitJoin self,
                               SIRSplitJoinIter iter)
Specified by:
postVisitSplitJoin in interface StreamVisitor

postVisitFeedbackLoop

public void postVisitFeedbackLoop(SIRFeedbackLoop self,
                                  SIRFeedbackLoopIter iter)
Specified by:
postVisitFeedbackLoop in interface StreamVisitor