OpenADFortTk (basic)
xaif2whirl::PUXlationContext Class Reference

#include <PUXlationContext.h>

Collaboration diagram for xaif2whirl::PUXlationContext:

List of all members.

Public Member Functions

 PUXlationContext (const std::string &anOriginator, PU_Info *pu_forest)
 ~PUXlationContext ()
void createXlationContext ()
void createXlationContext (XlationContext::Flags_E f)
void deleteXlationContext ()
XlationContextcurrentXlationContext ()
WN * findParentWN (WN *)
WN * findParentBlockWN (WN *)
fortTkSupport::WhirlParentMapgetWNParentMap () const
void setWNParentMap (fortTkSupport::WhirlParentMap *aWhirlParentMapP)
std::pair< ST_TAB *, PU_Info * > findSymTab (fortTkSupport::SymTabId stabId)
PU_Info * findPU (fortTkSupport::PUId aPUid)
fortTkSupport::WNId findWNId (WN *wn)
fortTkSupport::WNToWNIdMapgetWNToWNIdMap () const
void setWNToWNIdMap (fortTkSupport::WNToWNIdMap *aWNToWNIdMapP)
WN * findWN (fortTkSupport::WNId aWNId, bool mustFind=false)
fortTkSupport::WNIdToWNMapgetWNIdToWNMap () const
void setWNIdToWNMap (fortTkSupport::WNIdToWNMap *aWNIdToWNMapP)
fortTkSupport::SymbolfindSym (const std::string &scopeid, const std::string &symid)
fortTkSupport::XAIFSymToSymbolMapgetXAIFSymToSymbolMap ()
void dump (std::ostream &o, const std::string &indent) const
void ddump () const

Static Public Member Functions

static void setPrefix (const std::string &aPrefix)
static const std::string & getPrefix ()

Private Types

typedef std::list< XlationContextXlationContextStack

Private Member Functions

 PUXlationContext (const XlationContext &x)
 PUXlationContext ()
PUXlationContextoperator= (const PUXlationContext &x)
void PushNewXlationContext (XlationContext::Flags_E f)

Private Attributes

fortTkSupport::SymTabIdToSymTabMap mySymTabIdToSymTabMap
fortTkSupport::PUIdToPUMap myPUIdToPUMap
fortTkSupport::XAIFSymToSymbolMap myXAIFSymToSymbolMap
fortTkSupport::WhirlParentMapmyWNParentMapP
fortTkSupport::WNToWNIdMapmyWNToWNIdMapP
fortTkSupport::WNIdToWNMapmyWNIdToWNMapP
XlationContextStack myXlationContextStack
std::string myOriginator

Static Private Attributes

static std::string ourPrefix

Detailed Description

PUXlationContext for xaif2whirl: Represents information about a XAIF->WHIRL translation context. Designed to convey information about a parent context to children contexts.

PUXlationContext maintains an internal stack of XlationContexts, allowing users to 1) create new child contexts (push), 2) destroy and return to parent contexts (pop) and 3) query the current context. The current translation context provides information about the containing WHIRL context. There should always be at least one context on the stack. (Upon creation, one context exists on the stack.) Because this class is designed to represent information about one procedure (WHIRL PU) at a time, information that applies for a whole PU is located outside instead of inside the stack.

For xaif2whirl, a translation context for an XAIF construct corresponds to its parent construct. Thus there will be one translation context on the stack for every 'indendation' level. Context flags indicate significant facts about the parent construct and will typically correspond to XAIF concepts (as opposed to WHIRL).

Definition at line 43 of file PUXlationContext.h.


Member Typedef Documentation

Use a list instead a stack so that we can easily examine contents. The top of the stack will be the *front* of the list. (push_front, pop_front).

Definition at line 160 of file PUXlationContext.h.


Constructor & Destructor Documentation

xaif2whirl::PUXlationContext::PUXlationContext ( const std::string &  anOriginator,
PU_Info *  pu_forest 
)

the originator is some name that we can use for debugging purposes

Definition at line 14 of file PUXlationContext.cxx.

References myXlationContextStack.


Member Function Documentation

Create a new child context and make it the current context. We pass flags that should apply to the new context. Note that that these flags *do not* override any inherited flags.

Definition at line 34 of file PUXlationContext.cxx.

References PushNewXlationContext().

Here is the call graph for this function:

Definition at line 196 of file PUXlationContext.cxx.

References dump().

Here is the call graph for this function:

void xaif2whirl::PUXlationContext::dump ( std::ostream &  o,
const std::string &  indent 
) const

Definition at line 187 of file PUXlationContext.cxx.

References myOriginator, and myXlationContextStack.

Referenced by ddump().

Definition at line 68 of file PUXlationContext.cxx.

References fortTkSupport::WhirlParentMap::FindBlock(), FORTTK_DIE, and myWNParentMapP.

Referenced by xaif2whirl::FindWNBlock().

Here is the call graph for this function:

Definition at line 60 of file PUXlationContext.cxx.

References fortTkSupport::WhirlParentMap::Find(), FORTTK_DIE, and myWNParentMapP.

Here is the call graph for this function:

Definition at line 104 of file PUXlationContext.cxx.

References fortTkSupport::BaseMap< FromTy, ToTy >::Find(), and myPUIdToPUMap.

Referenced by xaif2whirl::TranslateCFG().

Here is the call graph for this function:

fortTkSupport::Symbol * xaif2whirl::PUXlationContext::findSym ( const std::string &  scopeid,
const std::string &  symid 
)

Definition at line 170 of file PUXlationContext.cxx.

References fortTkSupport::XAIFSymToSymbolMap::Find(), and myXAIFSymToSymbolMap.

Referenced by xaif2whirl::GetSymbol().

Here is the call graph for this function:

std::pair< ST_TAB *, PU_Info * > xaif2whirl::PUXlationContext::findSymTab ( fortTkSupport::SymTabId  stabId)

Definition at line 100 of file PUXlationContext.cxx.

References fortTkSupport::SymTabIdToSymTabMap::Find(), and mySymTabIdToSymTabMap.

Referenced by xaif2whirl::xlate_Scope().

Here is the call graph for this function:

Definition at line 108 of file PUXlationContext.cxx.

References fortTkSupport::BaseMap< FromTy, ToTy >::Find(), FORTTK_DIE, and myWNToWNIdMapP.

Here is the call graph for this function:

const std::string & xaif2whirl::PUXlationContext::getPrefix ( ) [static]

Definition at line 183 of file PUXlationContext.cxx.

References ourPrefix.

Referenced by xaif2whirl::CreateST().

PUXlationContext& xaif2whirl::PUXlationContext::operator= ( const PUXlationContext x) [private]

no def

void xaif2whirl::PUXlationContext::setPrefix ( const std::string &  aPrefix) [static]

Definition at line 179 of file PUXlationContext.cxx.

References ourPrefix.

Referenced by xaif2whirl::XAIF_SAXHandler::startElement().


Member Data Documentation

some string passed to the ctor to indicate who created this

Definition at line 176 of file PUXlationContext.h.

Referenced by dump().

std::string xaif2whirl::PUXlationContext::ourPrefix [static, private]

Definition at line 154 of file PUXlationContext.h.

Referenced by getPrefix(), and setPrefix().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines