coins.mdf
クラス TreatLoop

java.lang.Object
  |
  +--coins.mdf.TreatNode
        |
        +--coins.mdf.TreatLoop

class TreatLoop
extends TreatNode

This class treats `LOOP statement'. In MDF module, the `LOOP statement' is a kind of special statement because it include the flow information.


フィールドの概要
protected  MdfEnvironment env
           
protected  MacroFlowGraph mfg
           
protected  Stmt root
           
protected  SymTable symTab
           
protected  java.util.LinkedList visited
           
 
コンストラクタの概要
(パッケージプライベート) TreatLoop(MdfEnvironment e, MacroFlowGraph g, LoopStmt stmt, java.util.LinkedList list)
          Constructor:
(パッケージプライベート) TreatLoop(MdfEnvironment e, MacroFlowGraph g, LoopStmt stmt, java.util.LinkedList list, MdfConditions c)
          Constructor:
 
メソッドの概要
(パッケージプライベート)  java.util.LinkedList getLabelsInLoop(HIR child, java.util.LinkedList list)
          Get the list of the labels which are included in the current LOOP statement.
protected  boolean isChange(MacroTask mt, Label label)
          Get whether the specified macro task has the specified label.
protected  BlockStmt makeJumpBlk(Label label)
          Make a new block structure which include a new JUMP statement.
(パッケージプライベート)  void replace(MacroTask mt, Label label)
          Replace the basic block if it is outside of the current loop.
protected  void replaceReturn(Label label, DeclareLocalVariables decLocal)
          Replace the return statement into the jump statement.
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

env

protected MdfEnvironment env

symTab

protected SymTable symTab

mfg

protected MacroFlowGraph mfg

visited

protected java.util.LinkedList visited

root

protected Stmt root
コンストラクタの詳細

TreatLoop

TreatLoop(MdfEnvironment e,
          MacroFlowGraph g,
          LoopStmt stmt,
          java.util.LinkedList list,
          MdfConditions c)
Constructor:

パラメータ:
e - The environment of the current MDF module
g - The current macro flow graph
stmt - The current LOOP statement
list - The list of the labels which the MDF module is already treated
c - The current conditions

TreatLoop

TreatLoop(MdfEnvironment e,
          MacroFlowGraph g,
          LoopStmt stmt,
          java.util.LinkedList list)
Constructor:

パラメータ:
e - The environment of the current MDF module
g - The current macro flow graph
stmt - The current LOOP statement
list - The list of the labels which the MDF module is already treated
メソッドの詳細

replace

void replace(MacroTask mt,
             Label label)
Replace the basic block if it is outside of the current loop.

パラメータ:
mt - The current macro task
label - The target label

getLabelsInLoop

java.util.LinkedList getLabelsInLoop(HIR child,
                                     java.util.LinkedList list)
Get the list of the labels which are included in the current LOOP statement.

パラメータ:
child - The body of the current LOOP statement
list - The list of the labels
戻り値:
The list of the labels

replaceReturn

protected void replaceReturn(Label label,
                             DeclareLocalVariables decLocal)
Replace the return statement into the jump statement.

パラメータ:
label - The label of the final return statement
decLocal - The declaration of the local variables

makeJumpBlk

protected BlockStmt makeJumpBlk(Label label)
Make a new block structure which include a new JUMP statement.

パラメータ:
label - The target label
戻り値:
A new block structure

isChange

protected boolean isChange(MacroTask mt,
                           Label label)
Get whether the specified macro task has the specified label.

パラメータ:
mt - The target macro task
label - The target label
戻り値:
True if the specified macro task has the specified label