coins.ffront
クラス IntrinsicUtility

java.lang.Object
  |
  +--coins.ffront.IntrinsicUtility

public class IntrinsicUtility
extends java.lang.Object

Intrinsic Utility


入れ子クラスの概要
(パッケージプライベート)  class IntrinsicUtility.NameAndType
          Intrinsic function's name and type.
 
フィールドの概要
(パッケージプライベート) static int ABS
           
(パッケージプライベート) static int COMPLEX_LIB
           
(パッケージプライベート) static int CONJUGATE
           
(パッケージプライベート) static int CONV_TO_CHAR
           
(パッケージプライベート) static int CONV_TO_COMPLEX
           
(パッケージプライベート) static int CONV_TO_DOUBLE
           
(パッケージプライベート) static int CONV_TO_INTEGER
           
(パッケージプライベート) static int CONV_TO_REAL
           
(パッケージプライベート) static int DCONJUGATE
           
(パッケージプライベート) static int DIM
           
(パッケージプライベート) static int DIMAGINARY_PART
           
(パッケージプライベート) static int DPROD
           
(パッケージプライベート)  DeclManager fDeclMgr
           
(パッケージプライベート)  ExecStmtManager fESMgr
           
(パッケージプライベート)  FirToHir fHir
           
(パッケージプライベート)  HirUtility fHirUtil
           
(パッケージプライベート)  TypeUtility fTypeUtil
           
(パッケージプライベート)  HIR hir
           
(パッケージプライベート) static int IMAGINARY_PART
           
(パッケージプライベート) static int INDEX
           
(パッケージプライベート) static IntrinsicUtility.NameAndType[] intrinsicTable
           
(パッケージプライベート) static int LENGTH
           
(パッケージプライベート) static int MATH_LIB
           
(パッケージプライベート) static int MATH_LIB2
           
(パッケージプライベート) static int MAX
           
(パッケージプライベート) static int MAX_I
           
(パッケージプライベート) static int MAX_R
           
(パッケージプライベート) static int MIN
           
(パッケージプライベート) static int MIN_I
           
(パッケージプライベート) static int MIN_R
           
(パッケージプライベート) static int MOD
           
(パッケージプライベート) static int NEAREST
           
(パッケージプライベート) static int NEAREST_INT
           
(パッケージプライベート) static int NOT_YET
           
(パッケージプライベート) static int POWER
           
(パッケージプライベート) static int SIGN
           
(パッケージプライベート)  Sym sym
           
(パッケージプライベート) static int TRUNCATE
           
(パッケージプライベート) static int TYPE_CHARACTER
           
(パッケージプライベート) static int TYPE_COMPLEX
           
(パッケージプライベート) static int TYPE_DCOMPLEX
           
(パッケージプライベート) static int TYPE_DOUBLE
           
(パッケージプライベート) static int TYPE_FC
           
(パッケージプライベート) static int TYPE_FI
           
(パッケージプライベート) static int TYPE_FLOAT
           
(パッケージプライベート) static int TYPE_INT
           
(パッケージプライベート) static int TYPE_NO
           
(パッケージプライベート) static int TYPE_NUMBER
           
(パッケージプライベート) static int TYPE_ONE_OR_TWO
           
(パッケージプライベート) static int TYPE_OVER_TWO
           
(パッケージプライベート) static int TYPE_REAL
           
 
コンストラクタの概要
IntrinsicUtility(FirToHir fth)
           
 
メソッドの概要
(パッケージプライベート)  boolean argsTypeCheck(IntrinsicUtility.NameAndType nat, IrList argsExps)
           
(パッケージプライベート)  Exp complexPowExp(Exp e1, Exp e2)
           
(パッケージプライベート)  Exp convertTo(Exp exp, Type type)
           
(パッケージプライベート)  void dp(java.lang.String msg)
           
(パッケージプライベート)  Exp funcMAX(IrList args)
           max(x,y,...) => temp = x; if(temp < y){ temp = y; }
(パッケージプライベート)  Exp funcMIN(IrList args)
           min(x,y,...) => temp = x; if(temp > y){ temp = y; }
(パッケージプライベート)  Exp funcNEAREST(Exp arg)
          int(a+.5) if a>=0 int(a-.5) if a<0
(パッケージプライベート)  void init_intrinsicTable()
           
(パッケージプライベート)  Exp intPowExp(Exp e1, Exp e2)
          x ** y (x,y: Integer) if(y <= 4){ (x * ...)
(パッケージプライベート)  boolean isIntrinsicCall(java.lang.String id)
           
(パッケージプライベート)  Stmt makeAssignStmt(Exp e1, Exp e2)
           
(パッケージプライベート)  void makeComplexCall(java.lang.String name, Exp src, Exp dst)
           
(パッケージプライベート)  Exp makeIntrinsicCall(java.lang.String ident, FirList args)
          Make Exp node for intrinsic function call.
(パッケージプライベート)  Exp makeIntrinsicCallCont(Exp expArg, Exp expArg2, IrList argExps, int index, Node hint, Node hint2)
           
(パッケージプライベート)  Exp makeLibCall(java.lang.String name, Exp pExp, int type)
          Make Exp node for library-function call with one parameter.
(パッケージプライベート)  Exp makeLibCall2(java.lang.String name, Exp pExp1, Exp pExp2, int type)
          Make Exp node for library-function call with two parameters.
(パッケージプライベート)  int searchFuncName(java.lang.String name)
          Search a function name in intrinsicTable.
(パッケージプライベート)  Exp tempVarNode(java.lang.String str, Type type)
           
(パッケージプライベート)  boolean typeCheck(Type type, int expected_type)
           
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

intrinsicTable

static IntrinsicUtility.NameAndType[] intrinsicTable

fHir

FirToHir fHir

hir

HIR hir

sym

Sym sym

fHirUtil

HirUtility fHirUtil

fTypeUtil

TypeUtility fTypeUtil

fDeclMgr

DeclManager fDeclMgr

fESMgr

ExecStmtManager fESMgr

NOT_YET

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

MATH_LIB

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

MATH_LIB2

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

CONV_TO_REAL

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

CONV_TO_INTEGER

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

CONV_TO_DOUBLE

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

CONV_TO_COMPLEX

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

CONV_TO_CHAR

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

ABS

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

POWER

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

TRUNCATE

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

NEAREST

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

NEAREST_INT

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

LENGTH

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

IMAGINARY_PART

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

CONJUGATE

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

DIMAGINARY_PART

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

DCONJUGATE

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

COMPLEX_LIB

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

SIGN

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

DIM

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

DPROD

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

MOD

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

MAX

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

MAX_R

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

MAX_I

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

MIN

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

MIN_R

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

MIN_I

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

INDEX

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

TYPE_NO

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

TYPE_REAL

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

TYPE_DOUBLE

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

TYPE_INT

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

TYPE_COMPLEX

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

TYPE_DCOMPLEX

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

TYPE_CHARACTER

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

TYPE_FLOAT

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

TYPE_NUMBER

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

TYPE_FC

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

TYPE_FI

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

TYPE_ONE_OR_TWO

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

TYPE_OVER_TWO

static final int TYPE_OVER_TWO
関連項目:
定数フィールド値
コンストラクタの詳細

IntrinsicUtility

public IntrinsicUtility(FirToHir fth)
メソッドの詳細

searchFuncName

int searchFuncName(java.lang.String name)
Search a function name in intrinsicTable.

パラメータ:
name -
戻り値:
index of intrinsicTable if intrinsic function name else -1

isIntrinsicCall

boolean isIntrinsicCall(java.lang.String id)

makeIntrinsicCall

Exp makeIntrinsicCall(java.lang.String ident,
                      FirList args)
Make Exp node for intrinsic function call.

戻り値:
intrinsic function call Exp.

makeIntrinsicCallCont

Exp makeIntrinsicCallCont(Exp expArg,
                          Exp expArg2,
                          IrList argExps,
                          int index,
                          Node hint,
                          Node hint2)

tempVarNode

Exp tempVarNode(java.lang.String str,
                Type type)

makeAssignStmt

Stmt makeAssignStmt(Exp e1,
                    Exp e2)

intPowExp

Exp intPowExp(Exp e1,
              Exp e2)
x ** y (x,y: Integer) if(y <= 4){ (x * ...) else{ ipow(x,y) }


complexPowExp

Exp complexPowExp(Exp e1,
                  Exp e2)

funcNEAREST

Exp funcNEAREST(Exp arg)
int(a+.5) if a>=0 int(a-.5) if a<0


funcMAX

Exp funcMAX(IrList args)
    max(x,y,...)
    =>
    temp = x;
    if(temp < y){
      temp = y;
    }

戻り値:
Exp(temp)

funcMIN

Exp funcMIN(IrList args)
    min(x,y,...)
    =>
    temp = x;
    if(temp > y){
      temp = y;
    }

戻り値:
Exp(temp)

makeLibCall

Exp makeLibCall(java.lang.String name,
                Exp pExp,
                int type)
Make Exp node for library-function call with one parameter. A -> A

パラメータ:
name - library function name
pExp - actual parameter
type - return type
戻り値:
library function call Exp.

makeLibCall2

Exp makeLibCall2(java.lang.String name,
                 Exp pExp1,
                 Exp pExp2,
                 int type)
Make Exp node for library-function call with two parameters. A -> A -> A

パラメータ:
name - library function name
type - return type
戻り値:
library function call.

convertTo

Exp convertTo(Exp exp,
              Type type)

makeComplexCall

void makeComplexCall(java.lang.String name,
                     Exp src,
                     Exp dst)

typeCheck

boolean typeCheck(Type type,
                  int expected_type)

argsTypeCheck

boolean argsTypeCheck(IntrinsicUtility.NameAndType nat,
                      IrList argsExps)

init_intrinsicTable

void init_intrinsicTable()

dp

void dp(java.lang.String msg)