coins.backend
クラス Function

java.lang.Object
  |
  +--coins.backend.ModuleElement
        |
        +--coins.backend.Function

public class Function
extends ModuleElement

Represent a function.


フィールドの概要
static int FORM_NORMAL
          Form Status: FORM_NORMAL, FORM_SSA, FORM_SSA2
static int FORM_SSA
           
static int FORM_SSA2
           
 SymTab localSymtab
          Local symbol table
 LirFactory newLir
          Factory object for creating LirNode
 LirNode origEpilogue
          Original epilogue instruction.
 LirNode origPrologue
          Original prologue instruction.
static coins.backend.Function.ToCFG toCFG
          Launcher object for CFG transformation.
static coins.backend.Function.ToLinear toLinear
          Transform to linear (non-CFG).
static LocalTransformer toMachineCodeTrig
          Transformer which converts a function to machine instructions.
 
クラス coins.backend.ModuleElement から継承したフィールド
module, root, sourceLineNo, symbol
 
コンストラクタの概要
Function(Module module, ImList ptr)
          Parse S-expression function description and convert to internal form
 
メソッドの概要
 Symbol addSymbol(java.lang.String name, int storage, int type, int boundary, int offset, ImList opt)
          Add local symbol
 Symbol addSymbol(Symbol original, int type)
          Add temporary symbol
 boolean apply(BiList transList)
          Apply transformations listed in the transList.
 boolean apply(ImList transList)
          Apply transformations listed in the transList.
 LocalAnalysis apply(LocalAnalyzer analyzer)
          Apply some analysis
 boolean apply(LocalTransformer xformer)
          Apply some transformation/optimization.
 boolean apply(LocalTransformer xformer, ImList args)
          Apply some transformation/optimization with argument.
 boolean apply(java.lang.Object trans)
          Apply transformation (generic form).
 boolean apply(java.lang.Object[] transVector)
          Apply transformations listed in the transVector.
 boolean apply(java.lang.String hook)
          Apply transformation assigned to Hook.
 BiList firstInstrList()
          Return first instruction block.
 FlowGraph flowGraph()
          Return Control flow graph of this L-function.
 int form()
          Get form
 int frameSize()
          Return frame size of this function (value is positive).
 Symbol getSymbol(java.lang.String name)
          Find symbol whose name is name.
 Label internLabel(java.lang.String name)
          Install new label whose name is name to this function.
 BiList lirList()
          Return Instruction list of this L-function.
 LirNode newFrame(java.lang.String name, int type)
          Create new frame variable.
 Label newLabel()
          Generate new label and return it.
 LirNode newReg(java.lang.String name, int type)
          Create new named register variable.
 LirNode newTemp(int type)
          Create new temporary register variable.
 void printIt(java.io.PrintWriter out)
          Print for debugging.
 void printIt(java.io.PrintWriter out, LocalAnalysis[] anals)
          Dump internal data structure of the Function with some analyses.
 void printIt(java.io.PrintWriter out, LocalAnalyzer[] anals)
          Dump internal data structure of the Function with some analyses.
 void printStandardForm(java.io.PrintWriter out)
          Print L-function in standard form.
 void purgeAnalysis()
          Purge former analysis
 void reload(ImList ptr)
          Reload new L-function description from sexp.
 LocalAnalysis require(LocalAnalyzer analyzer)
          Require analysis.
 void reserveLabelVariantNo(int variant)
          Reserve label variant number variant.
 void setForm(int form)
          Set form
 Symbol[] symVector()
          Return vector of symbols visible from this function.
 int timeStamp()
          Return this function's version number.
 java.lang.Object toSexp()
          Convert to external LIR format.
 java.lang.String toString()
           
 void touch()
          Notify this function having been modified.
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

フィールドの詳細

newLir

public final LirFactory newLir
Factory object for creating LirNode


localSymtab

public final SymTab localSymtab
Local symbol table


origPrologue

public final LirNode origPrologue
Original prologue instruction.


origEpilogue

public final LirNode origEpilogue
Original epilogue instruction.


FORM_NORMAL

public static final int FORM_NORMAL
Form Status: FORM_NORMAL, FORM_SSA, FORM_SSA2

関連項目:
定数フィールド値

FORM_SSA

public static final int FORM_SSA
関連項目:
定数フィールド値

FORM_SSA2

public static final int FORM_SSA2
関連項目:
定数フィールド値

toCFG

public static coins.backend.Function.ToCFG toCFG
Launcher object for CFG transformation.


toLinear

public static coins.backend.Function.ToLinear toLinear
Transform to linear (non-CFG).


toMachineCodeTrig

public static final LocalTransformer toMachineCodeTrig
Transformer which converts a function to machine instructions.

コンストラクタの詳細

Function

public Function(Module module,
                ImList ptr)
         throws SyntaxError
Parse S-expression function description and convert to internal form

メソッドの詳細

firstInstrList

public BiList firstInstrList()
Return first instruction block.


reload

public void reload(ImList ptr)
            throws SyntaxError
Reload new L-function description from sexp.

SyntaxError

flowGraph

public FlowGraph flowGraph()
Return Control flow graph of this L-function. If L-function is not in CFG, changed to CFG automatically.


lirList

public BiList lirList()
Return Instruction list of this L-function. If L-function is in CFG mode, changed to non-CFG automatically.


newLabel

public Label newLabel()
Generate new label and return it.


internLabel

public Label internLabel(java.lang.String name)
                  throws SyntaxError
Install new label whose name is name to this function. If null is given, generate new unique label.

SyntaxError

reserveLabelVariantNo

public void reserveLabelVariantNo(int variant)
Reserve label variant number variant.


addSymbol

public Symbol addSymbol(java.lang.String name,
                        int storage,
                        int type,
                        int boundary,
                        int offset,
                        ImList opt)
Add local symbol


addSymbol

public Symbol addSymbol(Symbol original,
                        int type)
Add temporary symbol


getSymbol

public Symbol getSymbol(java.lang.String name)
Find symbol whose name is name.


symVector

public Symbol[] symVector()
Return vector of symbols visible from this function.


frameSize

public int frameSize()
Return frame size of this function (value is positive).


newTemp

public LirNode newTemp(int type)
Create new temporary register variable.


newReg

public LirNode newReg(java.lang.String name,
                      int type)
Create new named register variable.


newFrame

public LirNode newFrame(java.lang.String name,
                        int type)
Create new frame variable.


setForm

public void setForm(int form)
Set form


form

public int form()
Get form


timeStamp

public int timeStamp()
Return this function's version number.


touch

public void touch()
Notify this function having been modified.


purgeAnalysis

public void purgeAnalysis()
Purge former analysis


apply

public LocalAnalysis apply(LocalAnalyzer analyzer)
Apply some analysis


require

public LocalAnalysis require(LocalAnalyzer analyzer)
Require analysis.


apply

public boolean apply(java.lang.Object trans)
Apply transformation (generic form).


apply

public boolean apply(java.lang.String hook)
Apply transformation assigned to Hook.


apply

public boolean apply(ImList transList)
Apply transformations listed in the transList.


apply

public boolean apply(BiList transList)
Apply transformations listed in the transList.


apply

public boolean apply(java.lang.Object[] transVector)
Apply transformations listed in the transVector.


apply

public boolean apply(LocalTransformer xformer)
Apply some transformation/optimization.


apply

public boolean apply(LocalTransformer xformer,
                     ImList args)
Apply some transformation/optimization with argument.


toSexp

public java.lang.Object toSexp()
Convert to external LIR format.

定義:
クラス ModuleElement 内の toSexp

printStandardForm

public void printStandardForm(java.io.PrintWriter out)
Print L-function in standard form.

定義:
クラス ModuleElement 内の printStandardForm

printIt

public void printIt(java.io.PrintWriter out)
クラス ModuleElement の記述:
Print for debugging.

定義:
クラス ModuleElement 内の printIt

printIt

public void printIt(java.io.PrintWriter out,
                    LocalAnalyzer[] anals)
Dump internal data structure of the Function with some analyses.

定義:
クラス ModuleElement 内の printIt

printIt

public void printIt(java.io.PrintWriter out,
                    LocalAnalysis[] anals)
Dump internal data structure of the Function with some analyses.


toString

public java.lang.String toString()
オーバーライド:
クラス java.lang.Object 内の toString