coins.ffront
クラス TypeUtility

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

public class TypeUtility
extends java.lang.Object


フィールドの概要
(パッケージプライベート)  FirToHir fHir
           
(パッケージプライベート)  HirUtility fHirUtil
           
(パッケージプライベート)  HIR hir
           
(パッケージプライベート)  HirRoot hirRoot
           
(パッケージプライベート)  Sym sym
           
(パッケージプライベート)  SymRoot symRoot
           
 
コンストラクタの概要
TypeUtility(FirToHir fth)
           
 
メソッドの概要
(パッケージプライベート)  FortranCharacterExp castFortranCharacterExp(Exp exp)
           
(パッケージプライベート)  Type charArray(int length)
           
(パッケージプライベート)  void dp(java.lang.String msg)
           
(パッケージプライベート)  Type getArrayType(Type array_type, FirList dims, DeclManager declMgr)
          make Vector type.
 Type getBoolType()
           
 Type getCharType()
           
 StructType getComplexDoubleStructType()
          Return Double Complex type as a StructType typedef struct{ double _real; double _imag; } _complex_struct;
 StructType getComplexStructType()
          Return Complex type as a StructType typedef struct{ float _real; float _imag; } _complex_struct;
(パッケージプライベート)  Exp getDimSizeParamExp(Node n, DeclManager declMgr)
           
 Elem getDoubleImagPart()
           
 Elem getDoubleRealPart()
           
 Type getDoubleType()
           
 Type getEntryType()
           
(パッケージプライベート)  Exp getFortranCharacterLengthExp(Type type, Node hint)
           
(パッケージプライベート)  Exp getFortranCharacterLengthExp(Type type, java.lang.String name)
           
(パッケージプライベート)  Exp getFortranCharacterVectorLengthExp(VectorType type, java.lang.String name)
           
 Type getGlobalStructType(java.lang.String type_name, java.lang.String[] names, Type[] types)
          make global struct.
 Elem getImagPart()
           
 Elem getImagPart(StructType type)
           
 Type getIntType()
           
 Elem getRealPart()
           
 Elem getRealPart(StructType type)
           
 Type getRealType()
           
(パッケージプライベート)  Type getType(int typeKind)
          Make Sym Type from F77 Type kind
(パッケージプライベート)  Type getType(int typeKind, int length)
          Make Sym Type from F77 Type kind and length
(パッケージプライベート)  Type getType(Pair pTypeName)
          Make Sym Type from F77 Type Pair F77 Type is Pair(type name, optional length spec)
(パッケージプライベート)  Type getVectorBaseType(VectorType vt)
          Get vector base type if base type is char, return char vector type.
 Type getVoidType()
           
(パッケージプライベート)  boolean isComplexType(Type type)
           
(パッケージプライベート)  boolean isDoubleComplexType(Type type)
           
(パッケージプライベート)  boolean isFortranCharacterType(Type type)
          check if type is fortran character type, in other words, coins' Vector ?
(パッケージプライベート)  boolean isFortranCharacterVectorType(VectorType type)
          check if type is vector of fortran character type.
(パッケージプライベート)  Type makeVectorType(Type type, int dimnum, Exp[] dim_lp, Exp[] dim_up, int[] dim_lows, int[] dim_upps)
           
 void popSymTable()
           
 SymTable pushSymTable(Sym pSym)
           
(パッケージプライベート)  Elem searchElem(java.lang.String ident, Type type)
          search "ident" element from Struct or Union type.
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

fHir

FirToHir fHir

fHirUtil

HirUtility fHirUtil

sym

Sym sym

hir

HIR hir

symRoot

SymRoot symRoot

hirRoot

HirRoot hirRoot
コンストラクタの詳細

TypeUtility

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

getDimSizeParamExp

Exp getDimSizeParamExp(Node n,
                       DeclManager declMgr)

getArrayType

Type getArrayType(Type array_type,
                  FirList dims,
                  DeclManager declMgr)
make Vector type. ary(3,4,5) => a[5][4][3] An array dimension is limited to 7.

パラメータ:
dims - dimension information

makeVectorType

Type makeVectorType(Type type,
                    int dimnum,
                    Exp[] dim_lp,
                    Exp[] dim_up,
                    int[] dim_lows,
                    int[] dim_upps)

getType

Type getType(Pair pTypeName)
Make Sym Type from F77 Type Pair F77 Type is Pair(type name, optional length spec)

パラメータ:
pTypeName -
戻り値:
sym-type.

getType

Type getType(int typeKind,
             int length)
Make Sym Type from F77 Type kind and length

パラメータ:
typeKind -
length -
戻り値:
the Sym type.

getType

Type getType(int typeKind)
Make Sym Type from F77 Type kind

パラメータ:
typeKind -
戻り値:
the type.

charArray

Type charArray(int length)

getEntryType

public Type getEntryType()

isComplexType

boolean isComplexType(Type type)

isDoubleComplexType

boolean isDoubleComplexType(Type type)

getComplexStructType

public StructType getComplexStructType()
Return Complex type as a StructType
     typedef struct{
        float _real;
        float _imag;
     } _complex_struct;
     

戻り値:
complexStructType

getComplexDoubleStructType

public StructType getComplexDoubleStructType()
Return Double Complex type as a StructType
     typedef struct{
        double _real;
        double _imag;
     } _complex_struct;
     

戻り値:
complexStructType

getRealPart

public Elem getRealPart()

getImagPart

public Elem getImagPart()

getDoubleRealPart

public Elem getDoubleRealPart()

getDoubleImagPart

public Elem getDoubleImagPart()

getRealPart

public Elem getRealPart(StructType type)

getImagPart

public Elem getImagPart(StructType type)

getGlobalStructType

public Type getGlobalStructType(java.lang.String type_name,
                                java.lang.String[] names,
                                Type[] types)
make global struct. names and types must be same length. ex: "stname", [a, b, c], [int, float, int[10]] is given, this method define following struct type in global scope.
    struct stname{
      int a;
      float b;
      int c[10];
    };
    


searchElem

Elem searchElem(java.lang.String ident,
                Type type)
search "ident" element from Struct or Union type.


getVectorBaseType

Type getVectorBaseType(VectorType vt)
Get vector base type if base type is char, return char vector type.


isFortranCharacterType

boolean isFortranCharacterType(Type type)
check if type is fortran character type, in other words, coins' Vector ?


isFortranCharacterVectorType

boolean isFortranCharacterVectorType(VectorType type)
check if type is vector of fortran character type. in other words, coins' Vector*> ?


castFortranCharacterExp

FortranCharacterExp castFortranCharacterExp(Exp exp)

getFortranCharacterLengthExp

Exp getFortranCharacterLengthExp(Type type,
                                 Node hint)

getFortranCharacterLengthExp

Exp getFortranCharacterLengthExp(Type type,
                                 java.lang.String name)

getFortranCharacterVectorLengthExp

Exp getFortranCharacterVectorLengthExp(VectorType type,
                                       java.lang.String name)

pushSymTable

public SymTable pushSymTable(Sym pSym)

popSymTable

public void popSymTable()

getRealType

public Type getRealType()

getDoubleType

public Type getDoubleType()

getIntType

public Type getIntType()

getBoolType

public Type getBoolType()

getVoidType

public Type getVoidType()

getCharType

public Type getCharType()

dp

void dp(java.lang.String msg)