|
OpenADFortTk (basic)
|
00001 // ########################################################## 00002 // # This file is part of OpenADFortTk. # 00003 // # The full COPYRIGHT notice can be found in the top # 00004 // # level directory of the OpenADFortTk source tree. # 00005 // # For more information visit # 00006 // # http://www.mcs.anl.gov/openad # 00007 // ########################################################## 00008 00009 #ifndef st2xaif_INCLUDED 00010 #define st2xaif_INCLUDED 00011 /* ==================================================================== 00012 * ==================================================================== 00013 * 00014 * Description: 00015 * 00016 * TranslateSTUse: 00017 * Translate a variable reference. 00018 * 00019 * TranslateSTDecl: 00020 * Translate a variable declaration 00021 * 00022 * ST2F_deref_translate: 00023 * Translate a pointer variable to its dereferenced version. 00024 * 00025 * ST2F_Declare_Tempvar: 00026 * Declares a tempvar with the given index in the local scope. 00027 * 00028 * ST2F_FIRST_PARAM_IDX: 00029 * An index to the first parameter to be explicitly declared in 00030 * Fortran, given the type of the function and the type of the 00031 * first (implicit or explicit) argument. 00032 * 00033 * ==================================================================== 00034 * ==================================================================== 00035 */ 00036 #include <string> 00037 00038 #include "Open64IRInterface/Open64BasicTypes.h" 00039 00040 #include <xmlostream.h> 00041 #include "PUXlationContext.h" 00042 00043 namespace whirl2xaif { 00044 00045 extern void 00046 xlate_SymbolTables(xml::ostream& xos, SYMTAB_IDX symtab_lvl, 00047 fortTkSupport::ScalarizedRefTab_W2X* nonscalarsymtab, 00048 PUXlationContext& ctxt); 00049 00050 extern void 00051 xlate_SYMTAB(xml::ostream& xos, 00052 SYMTAB_IDX symtab_lvl, 00053 PUXlationContext& ctxt); 00054 00055 extern void 00056 xlate_ScalarizedRefTab(xml::ostream& xos, 00057 fortTkSupport::ScalarizedRefTab_W2X* symtab, 00058 PUXlationContext& ctxt); 00059 00060 extern void 00061 xlate_ArrayBounds(xml::ostream& xos, 00062 TY_IDX ty_idx, 00063 PUXlationContext& ctxt); 00064 00065 extern void 00066 TranslateSTDecl(xml::ostream& xos, ST* st, PUXlationContext& ctxt); 00067 00068 extern void 00069 TranslateSTUse(xml::ostream& xos, ST* st, PUXlationContext& ctxt); 00070 00071 00072 // FIXME/REMOVE 00073 extern std::string 00074 TCON2F_hollerith(TCON tvalue); 00075 00076 extern std::string 00077 TCON2F_translate(TCON tvalue, BOOL is_logical, TY_IDX object_ty); 00078 00079 extern std::string 00080 TCON2F_translate(TCON tvalue, BOOL is_logical); 00081 00082 00083 extern void 00084 ST2F_deref_translate(xml::ostream& xos, ST* st, PUXlationContext& ctxt); 00085 00086 extern void 00087 ST2F_Declare_Tempvar(TY_IDX ty, UINT idx); 00088 00089 //------------------------------------- 00090 00091 // FIXME: see: wn_attr.h WN_Call_First_Arg_Idx 00092 #define ST2F_FIRST_PARAM_IDX(funtype) \ 00093 (Func_Return_To_Param(funtype)? \ 00094 (Func_Return_Character(funtype)? 2 : 1) : 0) 00095 00096 #endif /* st2xaif_INCLUDED */ 00097 00098 }; /* namespace whirl2xaif */ 00099 00100 00101