coins.ir.hir
クラス LoopStmtImpl

java.lang.Object
  |
  +--coins.ir.hir.HIR_Impl
        |
        +--coins.ir.hir.StmtImpl
              |
              +--coins.ir.hir.LoopStmtImpl
すべての実装インタフェース:
java.lang.Cloneable, HasStringObject, HIR, HIR0, IR, IR0, LoopStmt, Stmt
直系の既知のサブクラス:
ForStmtImpl, IndexedLoopStmtImpl, RepeatStmtImpl, UntilStmtImpl, WhileStmtImpl

public abstract class LoopStmtImpl
extends StmtImpl
implements LoopStmt

  Loop-statement class.
// Components (children) of loop statement
//   child1: LoopInitPart. (Stmt)
//           This may be null.
//           getLoopInitPart returns this statement.
//   child2: ConditionalInitPart (This has been deleted. Give null.)
//           This is executed only once if loop condition is satisfied.
//           (At present, this is implemented by if-stmt attached to
//            LoopInitPart so that hir2lir has no need of
//            special treatment.)
//   child3: StartConditionPart with loopBackLabel. (LabeledStmt)
//           This should be given but its LabeledStmt may be null.
//           getLoopBackPoint() returns this LabeledStmt.
//   child4: LoopBody that is a LabeledStmt with loopBodyLabel.
//           StmtBody part of the LabeledStmt is BlockStmt
//           having LabeledStmt with loopStepLabel (LabeledStmt)
//           as the last statement of the loop-body BlockStmt.
//           An implementation of the LoopBody is
//           (labeledStmt
//            (list )
//            (block
//             sequence of statements given as pLoopBody parameter
//               of setChildrenOfLoop
//             (labeledStmt
//              (list )
//              null)))
//           LoopBody should be given but its BlockStmt may have
//           no executable statements.
//           getLoopBodyPart() returns this LabeledStmt.
//   child5: EndCondition.  (ExpStmt)
//           This may be null.
//           getLoopEndCondition() returns the expression of the ExpStmt.
//   child6: LoopStepPart jumping to loopBackLabel. (Stmt)
//           This may be null.
//           getLoopStepPart() returns this statement.
//   child7: LoopEndpart with loopEndLabel. (LabeledStmt)
//           This should be given but its LabeledStmt may be null.
//           getLoopEndPart() returns this LabeledStmt.


フィールドの概要
 Label fLoopBackLabel
           
 Label fLoopEndLabel
           
(パッケージプライベート)  LoopInf fLoopInf
           
 Label fLoopStepLabel
           
 
クラス coins.ir.hir.StmtImpl から継承したフィールド
fMultiBlock, fNextStmt, fPrevStmt
 
クラス coins.ir.hir.HIR_Impl から継承したフィールド
fAdditionalChild, fChildCount, fChildNode1, fChildNode2, fDbgLevel, fHirAnnex, fOperator, fParentNode, fType, hirRoot, inversionTable, machineParam, sourceLanguage
 
インタフェース coins.ir.hir.HIR から継承したフィールド
OP_CODE_NAME, OP_CODE_NAME_DENSE
 
インタフェース coins.ir.IR から継承したフィールド
OP_INF, OP_LIST, OP_PROG, OP_SUBP_DEF
 
インタフェース coins.ir.hir.HIR0 から継承したフィールド
FLAG_C_PTR, FLAG_CONST_EXP, FLAG_INIT_BLOCK, FLAG_LOOP_WITH_CONDITIONAL_INIT, FLAG_NOCHANGE, FLAG_NONTERMINAL, OP_ADD, OP_ADD_ASSIGN, OP_ADDR, OP_AND, OP_AND_ASSIGN, OP_ARROW, OP_ASM, OP_ASSIGN, OP_BLOCK, OP_CALL, OP_CMP_EQ, OP_CMP_GE, OP_CMP_GT, OP_CMP_LE, OP_CMP_LT, OP_CMP_NE, OP_COMMA, OP_CONST, OP_CONTENTS, OP_CONV, OP_DECAY, OP_DIV, OP_DIV_ASSIGN, OP_ELEM, OP_ENCLOSE, OP_EQ_ZERO, OP_EXP_STMT, OP_EXPLIST, OP_EXPREPEAT, OP_FOR, OP_IF, OP_INDEX, OP_INDEXED_LOOP, OP_JUMP, OP_LABEL, OP_LABEL_DEF, OP_LABELED_STMT, OP_LG_AND, OP_LG_OR, OP_MOD, OP_MOD_ASSIGN, OP_MULT, OP_MULT_ASSIGN, OP_NEG, OP_NOT, OP_NULL, OP_OFFSET, OP_OR, OP_OR_ASSIGN, OP_PARAM, OP_PHI, OP_POST_DECR, OP_POST_INCR, OP_PRE_DECR, OP_PRE_INCR, OP_QUAL, OP_REPEAT, OP_RETURN, OP_SELECT, OP_SEQ, OP_SETDATA, OP_SHIFT_L_ASSIGN, OP_SHIFT_LL, OP_SHIFT_R, OP_SHIFT_R_ASSIGN, OP_SHIFT_RL, OP_SIZEOF, OP_STMT, OP_STMT_UPPER, OP_SUB, OP_SUB_ASSIGN, OP_SUBP, OP_SUBS, OP_SWITCH, OP_SYM, OP_TYPE, OP_UNDECAY, OP_UNTIL, OP_VAR, OP_WHILE, OP_XOR, OP_XOR_ASSIGN
 
コンストラクタの概要
LoopStmtImpl()
           
LoopStmtImpl(HirRoot pHirRoot)
           
 
メソッドの概要
 void accept(HirVisitor pVisitor)
          accept Acceptor used in HIR visitor.
 void addToConditionalInitPart(Stmt pStmt)
          addToConditionalInitPart ConditionalInitPart is executed once if the LoopStartCondition is satisfied.
 void addToLoopBodyPart(Stmt pStmt)
          Add the statement pStmt before the step-labeled statement (as the last statement except the null statement with the loop-step label).
 void addToLoopEndPart(Stmt pStmt)
          Add pStmt as the statement next to the existing loop-end statement.
 void addToLoopInitPart(Stmt pStmt)
          Add pStmt as the last statement of loop-init-part.
 void addToLoopStepPart(Stmt pStmt)
          Add the statement pStmt to the loop-step part (add as the statement next to the existing statement of the loop-step part).
 java.lang.Object clone()
          clone Override Object.clone in HIR.
 void combineWithConditionalExp(Stmt pStmt, HIR pCond)
          Combine pStmt with conditional expression part pCond of control statement so that pStmt should be executed before pCond.
 BlockStmt getConditionalInitPart()
          getConditionalInitPart Get the BlockStmt containing the statements added by addToConditionalInitPart.
 Stmt getConditionalInitPart2()
           
 Label getLoopBackLabel()
           
 LabeledStmt getLoopBackPoint()
          getLoopBackPoint Get the statement with loopBackLabel.
 Label getLoopBodyLabel()
           
 Stmt getLoopBodyPart()
          getLoopBodyPart Get the loop body that is repetitively executed.
 Exp getLoopEndCondition()
          getLoopEndCondition Get the loop end conditional expression.
 Label getLoopEndLabel()
           
 LabeledStmt getLoopEndPart()
          getLoopEndPart Get the loop end part having the loopEndLabel.
 LoopInf getLoopInf()
          This method is not used anymore.
 Stmt getLoopInitPart()
           Get the loop initiation part that is executed before repetition.
 Exp getLoopStartCondition()
          getLoopStartCondition Get the loop start conditional expression that has the loopBackLabel.
 Label getLoopStepLabel()
           
 Stmt getLoopStepPart()
          getLoopStepPart Get the loop step part that is executed before jumping to loopBackLabel.
 boolean isLoopStmt()
           
 boolean isSimpleForLoop()
          isSimpleForLoop Check if this is a simple for loop, that is, an instance of ForStmt and conditional init part is null and loop end condition is null.
 boolean isSimpleIndexedLoop()
          isSimpleIndexedLoop Check if this is a simple indexed loop, that is, an instance of IndexedLoopStmt and conditional init part is null and loop end condition is null.
 boolean isSimpleRepeatLoop()
          isSimpleRepeatLoop Check if this is a simple repeat-while-true loop, that is, an instance of RepeatStmt and conditional init part is null and loop start condition is null and loop step part is null.
 boolean isSimpleUntilLoop()
           
 boolean isSimpleWhileLoop()
          isSimpleWhileLoop Check if this is a simple while loop, that is, an instance of WhileStmt and conditional init part is null and loop step part is null and loop end condition is null.
protected  Stmt makeConditionalInitPart(Exp pStartCondition, Stmt pConditionalInitPart)
           
 void replaceBodyPart(LabeledStmt pNewStmt)
          Replace the loop body with pNewStmt.
 void replaceConditionalInitPart(LabeledStmt pNewStmt)
           
 void setChildrenOfLoop(Stmt pInitPart, Label pLoopBackLabel, Stmt pConditionalInitPart, Exp pStartCondition, Stmt pLoopBody, Label pLoopStepLabel, Exp pEndCondition, Stmt pLoopStepPart, Label pLoopEndLabel, Stmt pLoopEndPart)
           
 void setLoopEndCondition(Exp pCondition)
          Set the expression pCondition as the loop-end condition expression.
 void setLoopInf(LoopInf pLoopInf)
          This method is not used anymore.
 void setLoopStartCondition(Exp pCondition)
          Set the expression pCondition as the loop-start condition expression.
 
クラス coins.ir.hir.StmtImpl から継承したメソッド
addNextStmt, addNextStmt, adjustMultiBlockFlag, adjustMultiBlockFlag, ancestorControlStmtOfConditionalExp, attachLabel, attachLabelAsFirstOne, backTraceLabeledStmt, combineStmt, copyPosition, cutLabelLinkOfStmt, deleteNextStmt, deletePreviousStmt, deleteThisStmt, getBlockStmt, getFileName, getLabel, getLabelDefList, getLabeledStmt, getLineNumber, getNextStmt, getPreviousStmt, getStmtWithLabel, getUpperStmt, insertPreviousStmt, insertPreviousStmt, isBranchStmt, isMultiBlock, isolateThisStmt, printLinkage, replaceThisStmtWith, setFileName, setLineNumber, toStringDetail, traceFirstStmt, traceLastStmt
 
クラス coins.ir.hir.HIR_Impl から継承したメソッド
addInf, addrExp, asmStmt, assignStmt, blockStmt, callStmt, checkLinkage, conditionalExp, conditionalExp1, constNode, contains, contentsExp, convExp, copyInfListFrom, copyWithOperands, copyWithOperandsChangingLabels, cutParentLink, cutParentLink, decayExp, elemNode, exp, exp, exp, expList, expRepeat, expStmt, falseNode, fatalError, finishHir, flagsAreAllFalse, forStmt, forStmt, functionExp, getChild, getChild1, getChild2, getChildCount, getChildNumber, getClone, getExpId, getFlag, getFlagBox, getFlowAnalSym, getIndentSpace, getIndex, getInf, getInfList, getInfString, getIrName, getNextNode, getNextNodeSeeingAncestor, getOperator, getParent, getResultOperand, getResultVar, getSourceNode, getSourceNode1, getSourceNode2, getStmtContainingThisNode, getSym, getSymOrExpId, getType, getWork, hirClone, hirIterator, hirList, hirNodeClone, hirSeq, hirSeq, hirSeq, ifStmt, indexedLoopStmt, indexedLoopStmt, infStmt, infStmt, intConstNode, intConstNode, irList, irList, isEmpty, isHIR, isLIR, isSameAs, isStmt, isSym, isTerminal, isTree, isTree, jumpStmt, labelDef, labeledStmt, labelNode, nullNode, nullStmt, offsetConstNode, phiExp, pointedExp, print, print, program, qualifiedExp, removeInf, repeatStmt, repeatStmt, replaceOperator, replaceResultOperand, replaceResultVar, replaceSource, replaceSource1, replaceSource2, replaceThisNode, returnStmt, returnStmt, setChild, setChild1, setChild2, setChildren, setChildren, setChildren, setChildren, setDataStmt, setFlag, setIndex, setIndexNumberToAllNodes, setIndexNumberToAllNodes, setIndexNumberToAllNodes2, setParameters, setParent, setType, setWork, severeError, sizeofExp, sizeofExp, slightError, subpDefinition, subpDefinition, subpDefinition, subpIterator, subpNode, subscriptedExp, subscriptedExp, switchStmt, symNode, toString, toStringShort, toStringWithChildren, trueNode, typeNode, undecayExp, undecayExp, undecayExp, undecayExp, varNode, warinig, whileStmt, whileStmt, withInf
 
クラス java.lang.Object から継承したメソッド
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
インタフェース coins.ir.hir.Stmt から継承したメソッド
addNextStmt, ancestorControlStmtOfConditionalExp, attachLabel, attachLabelAsFirstOne, combineStmt, copyPosition, cutLabelLinkOfStmt, deleteThisStmt, getBlockStmt, getFileName, getLabel, getLabelDefList, getLabeledStmt, getLineNumber, getPreviousStmt, getUpperStmt, insertPreviousStmt, insertPreviousStmt, isBranchStmt, isMultiBlock, isolateThisStmt, replaceThisStmtWith, setFileName, setLineNumber
 
インタフェース coins.ir.hir.HIR から継承したメソッド
addrExp, asmStmt, checkLinkage, conditionalExp, contains, copyInfListFrom, cutParentLink, exp, expList, expRepeat, forStmt, getExpId, getFlowAnalSym, getIndentSpace, getInfString, getIrName, getSourceNode, getSourceNode1, getSourceNode2, getSymOrExpId, getWork, hirNodeClone, hirSeq, hirSeq, indexedLoopStmt, indexedLoopStmt, infStmt, infStmt, intConstNode, irList, isEmpty, isStmt, isTree, nullNode, nullStmt, offsetConstNode, phiExp, repeatStmt, replaceSource, replaceSource1, replaceSource2, returnStmt, setChild1, setChild2, setChildren, setChildren, setDataStmt, setIndex, setIndexNumberToAllNodes, setParent, setType, setWork, subpDefinition, subpIterator, subscriptedExp, toString, toStringDetail, toStringShort, toStringWithChildren, undecayExp, undecayExp, undecayExp, whileStmt
 
インタフェース coins.ir.IR から継承したメソッド
addInf, getChild1, getChild2, getInf, getInfList, getParent, getSym, print, print, removeInf
 
インタフェース coins.ir.IR0 から継承したメソッド
getChild, getChildCount, getIndex, getOperator, setChild
 
インタフェース coins.ir.hir.HIR0 から継承したメソッド
assignStmt, blockStmt, callStmt, constNode, contentsExp, convExp, copyWithOperands, copyWithOperandsChangingLabels, decayExp, elemNode, exp, exp, expStmt, falseNode, finishHir, forStmt, functionExp, getChildNumber, getFlag, getFlagBox, getNextStmt, getStmtContainingThisNode, getType, hirClone, hirIterator, hirList, hirSeq, ifStmt, intConstNode, irList, isSameAs, jumpStmt, labelDef, labeledStmt, labelNode, pointedExp, print, program, qualifiedExp, repeatStmt, replaceThisNode, returnStmt, setFlag, setIndexNumberToAllNodes, sizeofExp, sizeofExp, subpDefinition, subpNode, subscriptedExp, switchStmt, symNode, trueNode, undecayExp, varNode, whileStmt
 

フィールドの詳細

fLoopBackLabel

public Label fLoopBackLabel

fLoopStepLabel

public Label fLoopStepLabel

fLoopEndLabel

public Label fLoopEndLabel

fLoopInf

LoopInf fLoopInf
コンストラクタの詳細

LoopStmtImpl

public LoopStmtImpl()

LoopStmtImpl

public LoopStmtImpl(HirRoot pHirRoot)
メソッドの詳細

setChildrenOfLoop

public void setChildrenOfLoop(Stmt pInitPart,
                              Label pLoopBackLabel,
                              Stmt pConditionalInitPart,
                              Exp pStartCondition,
                              Stmt pLoopBody,
                              Label pLoopStepLabel,
                              Exp pEndCondition,
                              Stmt pLoopStepPart,
                              Label pLoopEndLabel,
                              Stmt pLoopEndPart)

getLoopInitPart

public Stmt getLoopInitPart()
インタフェース LoopStmt の記述:
 Get the loop initiation part that is executed before
 repetition.
 Ex.
 For a loop statement
   for (i=0; i

定義:
インタフェース LoopStmt 内の getLoopInitPart
戻り値:
the loop initiation part;

getConditionalInitPart

public BlockStmt getConditionalInitPart()
インタフェース LoopStmt の記述:
getConditionalInitPart Get the BlockStmt containing the statements added by addToConditionalInitPart. If there is no such statements, then return null.

定義:
インタフェース LoopStmt 内の getConditionalInitPart
戻り値:
ConditionalInitBlock containing statements added by addToConditionalInitPart.

getConditionalInitPart2

public Stmt getConditionalInitPart2()

getLoopStartCondition

public Exp getLoopStartCondition()
インタフェース LoopStmt の記述:
getLoopStartCondition
 Get the loop start conditional expression that has
 the loopBackLabel.
 For a loop statement
   for (i=0; i

定義:
インタフェース LoopStmt 内の getLoopStartCondition
戻り値:
the loop start condition expression.

getLoopBackPoint

public LabeledStmt getLoopBackPoint()
インタフェース LoopStmt の記述:
getLoopBackPoint Get the statement with loopBackLabel. Even empty loop has a LabeledStmt with loopBackLabel where its statement body may be null.

定義:
インタフェース LoopStmt 内の getLoopBackPoint
戻り値:
the statement with loopBackLabel.

getLoopBodyPart

public Stmt getLoopBodyPart()
インタフェース LoopStmt の記述:
getLoopBodyPart
 Get the loop body that is repetitively executed.
 It is a block statement (BlockStmt)
 with loop start label and the blcok
 statement contains a labeled statement.
 with loopStepLabel as its last statement.
 For a statement
   for (i = 0; i < 10; i++)
     a[i] = 0;
 a labeled statement
   _lab6: { a[i] = 0; }
 will be returned where _lab6 is a loop start label
 generated by the compiler.
 For a statement
   while (i < 10) {
     a = a + b;
     if (a >= 10) {
       i = i + 1;
       continue;
     }
     i = i + 1;
   }
 a labeled statement
   _lab10: {
     a = a + b;
     if (a >= 10) {
       i = i + 1;
       goto _lab3;
     }
     i = i + 1;
     _lab4:
   }
 will be returned where _lab10 is the loop start label
 and _lab4 is the loop step label generated by the compiler.

定義:
インタフェース LoopStmt 内の getLoopBodyPart
戻り値:
the loop body that is repetitively executed.

getLoopEndCondition

public Exp getLoopEndCondition()
インタフェース LoopStmt の記述:
getLoopEndCondition
 Get the loop end conditional expression.
 For a loop statement
   do { ... }
   while (i>0);
 the expression i>0 is returned.
 For a loop statement
   for (i=0; i

定義:
インタフェース LoopStmt 内の getLoopEndCondition
戻り値:
the loop end condition expression.

getLoopStepPart

public Stmt getLoopStepPart()
インタフェース LoopStmt の記述:
getLoopStepPart
 Get the loop step part that is executed before
 jumping to loopBackLabel.
 For a loop statement
   for (i=0; i

定義:
インタフェース LoopStmt 内の getLoopStepPart
戻り値:
the loop step part.

getLoopEndPart

public LabeledStmt getLoopEndPart()
インタフェース LoopStmt の記述:
getLoopEndPart
 Get the loop end part having the loopEndLabel.
 For a loop statement
   for (i=0; i

定義:
インタフェース LoopStmt 内の getLoopEndPart
戻り値:
the loop end part having the loopEndLabel.

getLoopBackLabel

public Label getLoopBackLabel()
定義:
インタフェース LoopStmt 内の getLoopBackLabel
戻り値:
the loopBacklabel thet is attached to loop start condition part.

getLoopBodyLabel

public Label getLoopBodyLabel()
定義:
インタフェース LoopStmt 内の getLoopBodyLabel
戻り値:
return the loopBodyLabel that is attached to the loop body repetitively executed.

getLoopStepLabel

public Label getLoopStepLabel()
定義:
インタフェース LoopStmt 内の getLoopStepLabel
戻り値:
the loopStepLabel that is attached to a null stetement placed as the last statement in the loop body part and before the loop step part.

getLoopEndLabel

public Label getLoopEndLabel()
定義:
インタフェース LoopStmt 内の getLoopEndLabel
戻り値:
the loopEndLabel that is attached to a (usually null) statement located at the end of the loop.

getLoopInf

public LoopInf getLoopInf()
インタフェース LoopStmt の記述:
This method is not used anymore. (lparallel uses LoopInfo of lparallel.)

定義:
インタフェース LoopStmt 内の getLoopInf
戻り値:
the LoopInf.

setLoopInf

public void setLoopInf(LoopInf pLoopInf)
インタフェース LoopStmt の記述:
This method is not used anymore.

定義:
インタフェース LoopStmt 内の setLoopInf

addToLoopInitPart

public void addToLoopInitPart(Stmt pStmt)
インタフェース LoopStmt の記述:
Add pStmt as the last statement of loop-init-part. If there is no loop-init-part, then pStmt is attached as the new loop-init-part. If there is already loop-init-part, then pStmt is added as the last statement of the loop-init-part.

定義:
インタフェース LoopStmt 内の addToLoopInitPart
パラメータ:
pStmt - statement to be added to loop-init-part.

addToConditionalInitPart

public void addToConditionalInitPart(Stmt pStmt)
インタフェース LoopStmt の記述:
addToConditionalInitPart
 ConditionalInitPart is executed once if the LoopStartCondition
 is satisfied. It is a block to where loop invariant expressions
 are to be moved so that they are executed only once. The
 ConditionalInitPart is created by addToConditionalInitPart(pStmt)
 as a block containing ConditionalInitBlock in the LoopInitPart
 in the following way:
 Case 1: LoopStartCondition is null:
   LoopInitPart_ is changed as follows:
     {
       oroginal LoopInitPart_;
       { // ConditionalInitBlock.
         // getConditionalInitPart() returns this else-block.
         Sequence of statements added by addToConditionalInitPart;
       }
     }
   The transformation procedure is:
     If ConditionalInitBlock is not yet created,
       create it as a BlockStmt and add it as the last statement
       of LoopInitBlock
     pStmt is added as the last statement of ConditionalInitBlock.
 case 2:  LoopStartCondition is not null and ConditionalInitPart
          is not yet created:
   LoopInitPart_ is changed as follows:
     {
       oroginal LoopInitPart_;
       if (loopStartConditionExpression == false) {
         jump to loopEndLabel;
       }else { // ConditionalInitBlock.
               // getConditionalInitPart() returns this else-block.
         Sequence of statements added by addToConditionalInitPart;
         jump to loopBodyLabel;
       }
     }

   The else-part of above if-statement is called as
   ConditionalInitBlock.
 case 3: ConditionalInitBlock is already created:
   pStmt is inserted before "goto loopBodyLabel" of ConditionalInitBlock.
 Expressions to be executed only once for this loop
 may be added to ConditionalInitBlock by calling
 addToConditionalInitPart successively.
 When ConditionalInitBlock with "jump to loopBodyLabel" is created,
   setFlag(HIR.FLAG_LOOP_WITH_CONDITIONAL_INIT, true)
 is executed to show that the loop became irreducible but
 it is a tame loop that can be treated in many optimization/
 parallelization procedures.
 No special treatment is required for ConditionalInitPart in
 HIR-to-LIR conversion, HIR-to-C conversion, HIR flow analysis,
 etc. because it takes a form of normal HIR expression.

定義:
インタフェース LoopStmt 内の addToConditionalInitPart

makeConditionalInitPart

protected Stmt makeConditionalInitPart(Exp pStartCondition,
                                       Stmt pConditionalInitPart)

addToLoopBodyPart

public void addToLoopBodyPart(Stmt pStmt)
インタフェース LoopStmt の記述:
Add the statement pStmt before the step-labeled statement (as the last statement except the null statement with the loop-step label).

定義:
インタフェース LoopStmt 内の addToLoopBodyPart
パラメータ:
pStmt - statement to be added to the boop body.

addToLoopStepPart

public void addToLoopStepPart(Stmt pStmt)
インタフェース LoopStmt の記述:
Add the statement pStmt to the loop-step part (add as the statement next to the existing statement of the loop-step part).

定義:
インタフェース LoopStmt 内の addToLoopStepPart
パラメータ:
pStmt - statement to be added to the loop-step part.

addToLoopEndPart

public void addToLoopEndPart(Stmt pStmt)
インタフェース LoopStmt の記述:
Add pStmt as the statement next to the existing loop-end statement.

定義:
インタフェース LoopStmt 内の addToLoopEndPart
パラメータ:
pStmt - statement to be added to the loop-end part.

setLoopStartCondition

public void setLoopStartCondition(Exp pCondition)
インタフェース LoopStmt の記述:
Set the expression pCondition as the loop-start condition expression.

定義:
インタフェース LoopStmt 内の setLoopStartCondition
パラメータ:
pCondition - expression to be set.

setLoopEndCondition

public void setLoopEndCondition(Exp pCondition)
インタフェース LoopStmt の記述:
Set the expression pCondition as the loop-end condition expression.

定義:
インタフェース LoopStmt 内の setLoopEndCondition
パラメータ:
pCondition - expression to be set.

replaceConditionalInitPart

public void replaceConditionalInitPart(LabeledStmt pNewStmt)
                                throws CompileError
CompileError

replaceBodyPart

public void replaceBodyPart(LabeledStmt pNewStmt)
インタフェース LoopStmt の記述:
Replace the loop body with pNewStmt.

定義:
インタフェース LoopStmt 内の replaceBodyPart
パラメータ:
pNewStmt - statement to be set as the new loop body statement.

isSimpleForLoop

public boolean isSimpleForLoop()
インタフェース LoopStmt の記述:
isSimpleForLoop
  Check if this is a simple for loop, that is,
    an instance of ForStmt and
    conditional init part is null and
    loop end condition is null.

定義:
インタフェース LoopStmt 内の isSimpleForLoop
戻り値:
true if above conditions are satisfied, else return false.

isSimpleWhileLoop

public boolean isSimpleWhileLoop()
インタフェース LoopStmt の記述:
isSimpleWhileLoop
  Check if this is a simple while loop, that is,
    an instance of WhileStmt and
    conditional init part is null and
    loop step part is null and
    loop end condition is null.

定義:
インタフェース LoopStmt 内の isSimpleWhileLoop
戻り値:
true if above conditions are satisfied, else return false.

isSimpleRepeatLoop

public boolean isSimpleRepeatLoop()
インタフェース LoopStmt の記述:
isSimpleRepeatLoop
  Check if this is a simple repeat-while-true loop, that is,
    an instance of RepeatStmt and
    conditional init part is null and
    loop start condition is null and
    loop step part is null.

定義:
インタフェース LoopStmt 内の isSimpleRepeatLoop
戻り値:
true if above conditions are satisfied, else return false.

isSimpleUntilLoop

public boolean isSimpleUntilLoop()

isSimpleIndexedLoop

public boolean isSimpleIndexedLoop()
インタフェース LoopStmt の記述:
isSimpleIndexedLoop
  Check if this is a simple indexed loop, that is,
    an instance of IndexedLoopStmt and
    conditional init part is null and
    loop end condition is null.

定義:
インタフェース LoopStmt 内の isSimpleIndexedLoop
戻り値:
true if above conditions are satisfied, else return false.

isLoopStmt

public boolean isLoopStmt()
オーバーライド:
クラス StmtImpl 内の isLoopStmt

combineWithConditionalExp

public void combineWithConditionalExp(Stmt pStmt,
                                      HIR pCond)
Combine pStmt with conditional expression part pCond of control statement so that pStmt should be executed before pCond.

定義:
インタフェース Stmt 内の combineWithConditionalExp
オーバーライド:
クラス StmtImpl 内の combineWithConditionalExp
パラメータ:
pStmt - statement to be executed before pCond.
pCond - conditional expression to be combined with pStmt.

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
クラス HIR_Impl の記述:
clone Override Object.clone in HIR.

オーバーライド:
クラス StmtImpl 内の clone
戻り値:
cloned HIR object.
例外:
java.lang.CloneNotSupportedException

accept

public void accept(HirVisitor pVisitor)
インタフェース HIR0 の記述:
accept Acceptor used in HIR visitor. See HirVisitor, HirVisitorModel1, HirVisitormodel2.

定義:
インタフェース HIR0 内の accept
オーバーライド:
クラス HIR_Impl 内の accept
パラメータ:
pVisitor - HirVisitor