UocInfo Class Reference

#include <UocInfo.hxx>


Public Member Functions

bool isSourceUoc ()
bool isInterfaceUoc ()
 UocInfo (const std::string &_uocName, const std::string &_origin, boost::shared_ptr< AST > _uocAst)
 UocInfo (boost::shared_ptr< UocInfo > uoc)
void Compile ()
void DoBackend ()
void PrettyPrint (std::ostream &out, bool decorate=false)
 top-level wrapper for the pretty printer
void ShowTypes (std::ostream &out)
void findDefForms (boost::shared_ptr< AST > start, boost::shared_ptr< AST > local=boost::GC_NULL, boost::shared_ptr< AST > top=boost::GC_NULL)
void wrapEnvs ()
void unwrapEnvs ()
bool DoResolve (std::ostream &errStream, bool init, ResolverFlags rflags)
bool Resolve (std::ostream &errStream, bool init, ResolverFlags rflags, std::string pre)
bool DoTypeCheck (std::ostream &errStream, bool init, TI_Flags ti_flags)
bool TypeCheck (std::ostream &errStream, bool init, TI_Flags ti_flags, std::string pre)
bool RandT (std::ostream &errStream, bool init=false, ResolverFlags rflags=RSLV_NO_FLAGS, TI_Flags ti_flags=TI_NO_FLAGS, std::string pre="Internal Compiler error :")
bool RandTexpr (std::ostream &errStream, boost::shared_ptr< AST > ast, ResolverFlags rflags=RSLV_NO_FLAGS, TI_Flags ti_flags=TI_NO_FLAGS, std::string pre="Internal Compiler error :", bool keepResults=true, boost::shared_ptr< EnvSet > altEnvSet=boost::GC_NULL)
bool instantiate (std::ostream &errStream, const FQName &fqn)
 Instantiate a single fully qualified name.
bool instantiateBatch (std::ostream &errStream, std::set< FQName > &epName)
 Instantiate a set of entry point names.

Static Public Member Functions

static boost::shared_ptr<
UocInfo
make (const std::string &_uocName, const std::string &_origin, boost::shared_ptr< AST > _uocAst)
static boost::shared_ptr<
UocInfo
make (boost::shared_ptr< UocInfo > uoc)
static boost::shared_ptr<
UocInfo
CreateUnifiedUoC ()
static boost::shared_ptr<
UocInfo
findInterface (const std::string &ifName)
static boost::shared_ptr<
UocInfo
importInterface (std::ostream &, const sherpa::LexLoc &loc, const std::string &ifName)
static std::string UocNameFromSrcName (const std::string &srcFileName, unsigned ndx)
static bool CompileFromFile (const boost::filesystem::path &src, bool fromCmdLine)
static void findAllDefForms ()
 Make a pass over every AST, setting up back pointers to the containing forms of all defining occurrences.
static void addAllCandidateEPs ()
static boost::shared_ptr<
AST
lookupByFqn (const FQName &fqn, boost::shared_ptr< UocInfo > &targetUoc)

Data Fields

std::string uocName
std::string origin
UocFlags flags
Pass lastCompletedPass
bool fromCommandLine
boost::shared_ptr< ASTuocAst
boost::shared_ptr< ASTEnvironmentenv
boost::shared_ptr< TSEnvironmentgamma
boost::shared_ptr< InstEnvironmentinstEnv

Static Public Attributes

static std::vector< boost::filesystem::path > searchPath
static UocMap ifList
static UocMap srcList
static PassInfo passInfo []
static OnePassInfo onePassInfo []
static bool mainIsDefined = false


Detailed Description

Definition at line 120 of file UocInfo.hxx.


Constructor & Destructor Documentation

UocInfo::UocInfo ( const std::string &  _uocName,
const std::string &  _origin,
boost::shared_ptr< AST _uocAst 
)

Referenced by make().

UocInfo::UocInfo ( boost::shared_ptr< UocInfo uoc  ) 


Member Function Documentation

void UocInfo::addAllCandidateEPs (  )  [static]

Definition at line 308 of file inter-pass.cxx.

References addCandidates(), ifList, and srcList.

Referenced by main().

void UocInfo::Compile (  ) 

Definition at line 454 of file UocInfo.cxx.

static bool UocInfo::CompileFromFile ( const boost::filesystem::path &  src,
bool  fromCmdLine 
) [static]

Referenced by main().

shared_ptr< UocInfo > UocInfo::CreateUnifiedUoC (  )  [static]

Definition at line 256 of file UocInfo.cxx.

Referenced by main().

void UocInfo::DoBackend (  ) 

Definition at line 530 of file UocInfo.cxx.

bool UocInfo::DoResolve ( std::ostream &  errStream,
bool  init,
ResolverFlags  rflags 
)

Definition at line 2876 of file Symtab.cxx.

References assert(), CHKERR, boost::GC_NULL, idc_type, initEnv(), Environment< T >::make(), Options::noPrelude, resolve(), RSLV_SYM_NO_PRELUDE, uocAst, uocName, and USE_MODE.

Referenced by Resolve().

bool UocInfo::DoTypeCheck ( std::ostream &  errStream,
bool  init,
TI_Flags  ti_flags 
)

Definition at line 5520 of file TypeInfer.cxx.

References assert(), at_define, at_recdef, checkImpreciseTypes(), CHKERR, DEBUG, Options::debugTvP, gamma, initGamma(), instEnv, TCConstraints::make(), Environment< T >::make(), Trail::make(), Options::noPrelude, TI_NO_PRELUDE, typeInfer(), uocAst, uocName, and USE_MODE.

Referenced by TypeCheck().

void UocInfo::findAllDefForms (  )  [static]

Make a pass over every AST, setting up back pointers to the containing forms of all defining occurrences.

Definition at line 269 of file inter-pass.cxx.

References ifList, and srcList.

Referenced by main().

void UocInfo::findDefForms ( boost::shared_ptr< AST start,
boost::shared_ptr< AST local = boost::GC_NULL,
boost::shared_ptr< AST top = boost::GC_NULL 
)

shared_ptr< UocInfo > UocInfo::findInterface ( const std::string &  ifName  )  [static]

Definition at line 359 of file UocInfo.cxx.

shared_ptr< UocInfo > UocInfo::importInterface ( std::ostream &  ,
const sherpa::LexLoc loc,
const std::string &  ifName 
) [static]

Definition at line 369 of file UocInfo.cxx.

References PassInfo::name, passInfo, and ShowTypes().

Referenced by main().

bool UocInfo::instantiate ( std::ostream &  errStream,
const FQName fqn 
)

Instantiate a single fully qualified name.

bool UocInfo::instantiateBatch ( std::ostream &  errStream,
std::set< FQName > &  epName 
)

Instantiate a set of entry point names.

bool UocInfo::isInterfaceUoc (  )  [inline]

Definition at line 140 of file UocInfo.hxx.

References at_interface, and uocAst.

bool UocInfo::isSourceUoc (  )  [inline]

Definition at line 136 of file UocInfo.hxx.

References at_module, and uocAst.

static boost::shared_ptr<AST> UocInfo::lookupByFqn ( const FQName fqn,
boost::shared_ptr< UocInfo > &  targetUoc 
) [static]

static boost::shared_ptr<UocInfo> UocInfo::make ( boost::shared_ptr< UocInfo uoc  )  [inline, static]

Definition at line 157 of file UocInfo.hxx.

References UocInfo().

static boost::shared_ptr<UocInfo> UocInfo::make ( const std::string &  _uocName,
const std::string &  _origin,
boost::shared_ptr< AST _uocAst 
) [inline, static]

Definition at line 150 of file UocInfo.hxx.

References UocInfo().

void UocInfo::PrettyPrint ( std::ostream &  out,
bool  decorate = false 
)

top-level wrapper for the pretty printer

Definition at line 1243 of file BitC-pp.cxx.

References assert(), at_interface, at_module, flags, pp_ShowTypes, and uocAst.

bool UocInfo::RandT ( std::ostream &  errStream,
bool  init = false,
ResolverFlags  rflags = RSLV_NO_FLAGS,
TI_Flags  ti_flags = TI_NO_FLAGS,
std::string  pre = "Internal Compiler error :" 
)

Definition at line 62 of file inter-pass.cxx.

References CHKERR, Resolve(), TypeCheck(), and uocAst.

bool UocInfo::RandTexpr ( std::ostream &  errStream,
boost::shared_ptr< AST ast,
ResolverFlags  rflags = RSLV_NO_FLAGS,
TI_Flags  ti_flags = TI_NO_FLAGS,
std::string  pre = "Internal Compiler error :",
bool  keepResults = true,
boost::shared_ptr< EnvSet altEnvSet = boost::GC_NULL 
)

bool UocInfo::Resolve ( std::ostream &  errStream,
bool  init,
ResolverFlags  rflags,
std::string  pre 
)

Definition at line 2907 of file Symtab.cxx.

References DoResolve().

Referenced by RandT().

void UocInfo::ShowTypes ( std::ostream &  out  ) 

Definition at line 1254 of file BitC-pp.cxx.

References doShowTypes(), gamma, and uocAst.

Referenced by importInterface().

bool UocInfo::TypeCheck ( std::ostream &  errStream,
bool  init,
TI_Flags  ti_flags,
std::string  pre 
)

Definition at line 5588 of file TypeInfer.cxx.

References DoTypeCheck(), and uocAst.

Referenced by RandT().

void UocInfo::unwrapEnvs (  ) 

Definition at line 92 of file inter-pass.cxx.

References env, gamma, and instEnv.

std::string UocInfo::UocNameFromSrcName ( const std::string &  srcFileName,
unsigned  ndx 
) [static]

Definition at line 219 of file UocInfo.cxx.

References boost::GC_NULL, and ifList.

void UocInfo::wrapEnvs (  ) 

Definition at line 84 of file inter-pass.cxx.

References env, gamma, and instEnv.


Field Documentation

boost::shared_ptr<ASTEnvironment > UocInfo::env

Definition at line 132 of file UocInfo.hxx.

Referenced by unwrapEnvs(), and wrapEnvs().

UocFlags UocInfo::flags

Definition at line 126 of file UocInfo.hxx.

Referenced by PrettyPrint().

bool UocInfo::fromCommandLine

Definition at line 130 of file UocInfo.hxx.

boost::shared_ptr<TSEnvironment > UocInfo::gamma

Definition at line 133 of file UocInfo.hxx.

Referenced by DoTypeCheck(), ShowTypes(), unwrapEnvs(), and wrapEnvs().

UocMap UocInfo::ifList [static]

Definition at line 174 of file UocInfo.hxx.

Referenced by addAllCandidateEPs(), buildLinkedAST(), findAllDefForms(), findInterface(), FQNize(), GenerateC(), initEnv(), initGamma(), main(), UocNameFromSrcName(), and UpdateMegaEnvs().

boost::shared_ptr<InstEnvironment > UocInfo::instEnv

Definition at line 134 of file UocInfo.hxx.

Referenced by DoTypeCheck(), unwrapEnvs(), and wrapEnvs().

Pass UocInfo::lastCompletedPass

Definition at line 128 of file UocInfo.hxx.

bool UocInfo::mainIsDefined = false [static]

Definition at line 344 of file UocInfo.hxx.

Referenced by EmitGlobalInitializers(), and GenerateCoutput().

OnePassInfo UocInfo::onePassInfo [static]

Initial value:

 {
#define ONEPASS(nm, short, descrip) 
# 1 "/home/bitc/rebuild/bitc/src/compiler//onepass.def" 1











# 75 "/home/bitc/rebuild/bitc/src/compiler/UocInfo.cxx" 2
}

Definition at line 342 of file UocInfo.hxx.

Referenced by main().

std::string UocInfo::origin

Definition at line 125 of file UocInfo.hxx.

PassInfo UocInfo::passInfo [static]

Definition at line 341 of file UocInfo.hxx.

Referenced by importInterface(), and main().

vector< filesystem::path > UocInfo::searchPath [static]

Definition at line 167 of file UocInfo.hxx.

Referenced by main().

UocMap UocInfo::srcList [static]

Definition at line 175 of file UocInfo.hxx.

Referenced by addAllCandidateEPs(), buildLinkedAST(), EmitBitO(), findAllDefForms(), FQNize(), GenerateC(), main(), and UpdateMegaEnvs().

boost::shared_ptr<AST> UocInfo::uocAst

Definition at line 131 of file UocInfo.hxx.

Referenced by DoResolve(), DoTypeCheck(), isInterfaceUoc(), isSourceUoc(), PrettyPrint(), RandT(), ShowTypes(), and TypeCheck().

std::string UocInfo::uocName

Definition at line 124 of file UocInfo.hxx.

Referenced by DoResolve(), and DoTypeCheck().


The documentation for this class was generated from the following files:
Generated on Sat Feb 4 23:59:29 2012 for BitC Compiler by  doxygen 1.4.7