OpenADFortTk (basic)
src/xaif2whirl/XlationContext.h
Go to the documentation of this file.
00001 // -*-Mode: C++;-*-
00002 // $Header: /Volumes/cvsrep/developer/OpenADFortTk/src/xaif2whirl/XlationContext.h,v 1.9 2006/05/12 16:12:24 utke Exp $
00003 
00004 #ifndef XlationContext_INCLUDED
00005 #define XlationContext_INCLUDED
00006 
00007 //************************** System Include Files ***************************
00008 
00009 #include <list>
00010 #include <iostream>
00011 
00012 #include "Open64IRInterface/Open64BasicTypes.h"
00013 
00014 namespace xaif2whirl{
00015 
00021   class XlationContext {
00022   public: 
00023 
00024     XlationContext();
00025   
00026     ~XlationContext();
00027     
00028     void dump(std::ostream& o, const std::string& indent) const;
00029 
00030     void ddump() const;
00031 
00032     enum Flags_E {
00033       NOFLAG           = 0x00000000,
00034       ACTIVETYPE       = 0x00000001, // active symbol ref, determined from symbol type (inheritUp)
00035       VALUESELECTOR    = 0x00000002, // value selector, is also set for passive vars (inheritDown) 
00036       DERIVSELECTOR    = 0x00000004, // deriv selector (inheritDown)
00037       SUPPRESSSELECTOR = 0x00000008, // suppress any selectors for certain intrinsics (inheritDown)
00038       VARREF           = 0x00000010, // within variable reference (inheritDown)
00039       LVALUE           = 0x00000020, // var ref should be an lvalue (inheritDown) 
00040       ARRAY            = 0x00000040, // an array reference (inheritDown)
00041       ARRAYIDX         = 0x00000080, // an array index expr (inheritDown)
00042       EXPRSIMPLE       = 0x00000100  // within a 'simple' expr, used exclusively for CFG exprs. (inheritDown)
00043     };
00044 
00045     bool isFlag(Flags_E f) const;
00046     void setFlag(Flags_E f);
00047     void unsetFlag(Flags_E f);
00048     void inheritFlagsUp(const XlationContext& childContext);
00049     void inheritFlagsDown(const XlationContext& parentContext);
00050   
00051   private:
00052 
00056     unsigned int myFlags;
00057 
00058   };
00059 
00060 }// end namespace
00061 
00062 #endif 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines