.. java:import:: fr.inria.tapenade.representation Block .. java:import:: fr.inria.tapenade.representation FGArrow .. java:import:: fr.inria.tapenade.representation FGConstants .. java:import:: fr.inria.tapenade.representation HeaderBlock .. java:import:: fr.inria.tapenade.representation ILUtils .. java:import:: fr.inria.tapenade.representation Instruction .. java:import:: fr.inria.tapenade.representation Directive .. java:import:: fr.inria.tapenade.representation SymbolTable .. java:import:: fr.inria.tapenade.representation TapEnv .. java:import:: fr.inria.tapenade.representation TapList .. java:import:: fr.inria.tapenade.representation Unit .. java:import:: fr.inria.tapenade.representation CStuff .. java:import:: fr.inria.tapenade.utils ILLang .. java:import:: fr.inria.tapenade.utils TapPair .. java:import:: fr.inria.tapenade.utils TapTriplet .. java:import:: fr.inria.tapenade.utils Tree ControlStruct ============= .. java:package:: fr.inria.tapenade.ir2tree :noindex: .. java:type:: public abstract class ControlStruct Abstract class for IfThenElse, Let, Loop, Switch,.. Controls. Fields ------ aboveControlStruct ^^^^^^^^^^^^^^^^^^ .. java:field:: protected ControlStruct aboveControlStruct :outertype: ControlStruct controlStructBlock ^^^^^^^^^^^^^^^^^^ .. java:field:: protected Block controlStructBlock :outertype: ControlStruct naturalFlow ^^^^^^^^^^^ .. java:field:: protected TapList naturalFlow :outertype: ControlStruct naturalNext ^^^^^^^^^^^ .. java:field:: protected Block naturalNext :outertype: ControlStruct structuredTree ^^^^^^^^^^^^^^ .. java:field:: protected Tree structuredTree :outertype: ControlStruct treesReverse ^^^^^^^^^^^^ .. java:field:: protected TapList treesReverse :outertype: ControlStruct Methods ------- addControlStruct ^^^^^^^^^^^^^^^^ .. java:method:: protected abstract void addControlStruct(ControlStruct struct, FGArrow arrow) :outertype: ControlStruct Insert the given "struct" into this ControlStruct, at the correct place determined by "arrow". checkLabels ^^^^^^^^^^^ .. java:method:: protected Tree checkLabels(Tree structTree, TapList naturalArrows, TapList naturalCycleArrows, TapList ignoredArrows) :outertype: ControlStruct dump ^^^^ .. java:method:: public void dump(int indent) throws java.io.IOException :outertype: ControlStruct Prints in detail the contents of this ControlStruct, onto TapEnv.curOutputStream(). :param indent: the amount of indentation to be used for this printing. generateTree ^^^^^^^^^^^^ .. java:method:: protected abstract void generateTree(boolean delayGoto, TapList> toFutureIncludes, TapList fileUserHelpStrings) :outertype: ControlStruct (Recursive) final regeneration of the structured Tree. generateTreeChained ^^^^^^^^^^^^^^^^^^^ .. java:method:: protected static TapList generateTreeChained(TapList chainedStructs, boolean delayGoto, String lastLabel, TapList> toFutureIncludes, TapList fileUserHelpStrings) :outertype: ControlStruct getBlock ^^^^^^^^ .. java:method:: protected ControlStruct getBlock(Block block) :outertype: ControlStruct insertInstructionTree ^^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected void insertInstructionTree(Tree instructionTree, boolean atTheEnd) :outertype: ControlStruct insertLetStructure ^^^^^^^^^^^^^^^^^^ .. java:method:: protected abstract void insertLetStructure() :outertype: ControlStruct (Recursive) Inserts Let structures into the tree of ControlStruct's to reflect nested local SymbolTable's. insertLetStructureChained ^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected static TapList insertLetStructureChained(TapList chainedStructs, SymbolTable refSymbolTable) :outertype: ControlStruct preGenerateBody ^^^^^^^^^^^^^^^ .. java:method:: protected Tree preGenerateBody(TapList instructions, TapList naturalArrows, TapList> toFutureIncludes, TapList fileUserHelpStrings, boolean skipSubUnits) :outertype: ControlStruct Utility called during preGenerateTree(). Prepares the list of instructions of the current Block, taking care of removing empty and phantom instructions, but keeping the comments at the best possible place. :return: the last instruction Tree. preGenerateTree ^^^^^^^^^^^^^^^ .. java:method:: protected abstract TapList preGenerateTree(TapList naturalArrows, TapList> toFutureIncludes, TapList fileUserHelpStrings, TapList enclosingStructs, boolean skipSubUnits) :outertype: ControlStruct (Recursive) preparation before tree regeneration. Labels the arrows that need explicit jumps, prepares the skeleton of the future Tree. :return: a TapList of FGArrow preGenerateTreeChained ^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected static TapList preGenerateTreeChained(TapList chainedStructs, TapList> toFutureIncludes, TapList fileUserHelpStrings, TapList naturalArrows, TapList enclosingStructs, boolean skipSubUnits) :outertype: ControlStruct propagateNaturalFlow ^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected abstract TapList propagateNaturalFlow() :outertype: ControlStruct (Recursive) precomputation of the "naturalFlow: info: the TapList of FGArrow that would naturally flow out of this ControlStruct, i.e. without any additional explicit jump. propagateNaturalFlowChained ^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected static TapList propagateNaturalFlowChained(TapList chainedStructs) :outertype: ControlStruct propagateNaturalNext ^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected abstract void propagateNaturalNext(Block naturalNext) :outertype: ControlStruct (Recursive) precomputation of the "naturalNext" info: the next Block reached by natural flow from each ControlStruct. propagateNaturalNextChained ^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected static void propagateNaturalNextChained(TapList chainedStructs, Block lastNaturalNext) :outertype: ControlStruct putDirectivesBackAsComments ^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected void putDirectivesBackAsComments(TapList directives) :outertype: ControlStruct reorderBody ^^^^^^^^^^^ .. java:method:: protected abstract void reorderBody() :outertype: ControlStruct (Recursive) Orders the lists of control structures inside, following the order of the block ranks... reorderBodyChained ^^^^^^^^^^^^^^^^^^ .. java:method:: protected static TapList reorderBodyChained(TapList chainedStructs) :outertype: ControlStruct toString ^^^^^^^^ .. java:method:: @Override public String toString() :outertype: ControlStruct turnCarryIntoJump ^^^^^^^^^^^^^^^^^ .. java:method:: protected Tree turnCarryIntoJump(FGArrow arrow) :outertype: ControlStruct