comma::CGContext Class Reference

#include <CGContext.h>

Collaboration diagram for comma::CGContext:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CGContext (CodeGen &CG, InstanceInfo *IInfo)
CodeGenTypesgetCGT ()



const CodeGengetCG () const
 Returns the code generator.
CodeGengetCG ()
 Returns the code generator.
const InstanceInfogetInstanceInfo () const
InstanceInfogetInstanceInfo ()
 Returns the code generator.
General Predicates.



bool generatingCapsule () const
 Returns true if we are currently generating a capsule.
bool generatingCapsuleInstance () const
 Returns true if we are generating an instance of a generic capsule.

Generic Parameters.

The AST is not rewritten in its entirety for every instance of a generic unit. The following methods provide access to maps which rewrite generic formal parameters to their corresponding actuals.



typedef std::map< Type *, Type * > ParameterMap
 The type used to map generic types to the corresponding actuals.
const ParameterMapgetParameterMap () const
 Returns the current parameter map.
DomainInstanceDeclrewriteAbstractDecl (AbstractDomainDecl *abstract) const
const DomainInstanceDeclrewriteAbstractDecl (const AbstractDomainDecl *abstract) const
 The type used to map generic types to the corresponding actuals.

Detailed Description

Definition at line 29 of file CGContext.h.


Member Typedef Documentation

The type used to map generic types to the corresponding actuals.

Definition at line 73 of file CGContext.h.


Constructor & Destructor Documentation

CGContext::CGContext ( CodeGen CG,
InstanceInfo IInfo 
)

Constructs a CGContext to encapsulate the top level state associated with the given InstanceInfo.

Definition at line 17 of file CGContext.cpp.


Member Function Documentation

bool comma::CGContext::generatingCapsule (  )  const [inline]

Returns true if we are currently generating a capsule.

Definition at line 52 of file CGContext.h.

bool CGContext::generatingCapsuleInstance (  )  const

Returns true if we are generating an instance of a generic capsule.

Definition at line 33 of file CGContext.cpp.

CodeGen& comma::CGContext::getCG (  )  [inline]

Returns the code generator.

Definition at line 39 of file CGContext.h.

const CodeGen& comma::CGContext::getCG (  )  const [inline]

Returns the code generator.

Definition at line 38 of file CGContext.h.

CodeGenTypes& comma::CGContext::getCGT (  )  [inline]

Returns the Comma to LLVM type generator.

Note that the supplied type generator is initialized to respect the current context. In particular, it will lower generic formal parameters to the representation of the actual parameter.

Definition at line 47 of file CGContext.h.

InstanceInfo* comma::CGContext::getInstanceInfo (  )  [inline]

Returns the code generator.

Definition at line 62 of file CGContext.h.

const InstanceInfo* comma::CGContext::getInstanceInfo (  )  const [inline]

Returns the InstanceInfo object associated with this context, or null if there is no capsule currently registered.

Definition at line 61 of file CGContext.h.

const ParameterMap& comma::CGContext::getParameterMap (  )  const [inline]

Returns the current parameter map.

Definition at line 76 of file CGContext.h.

const DomainInstanceDecl* comma::CGContext::rewriteAbstractDecl ( const AbstractDomainDecl abstract  )  const [inline]

The type used to map generic types to the corresponding actuals.

Definition at line 85 of file CGContext.h.

DomainInstanceDecl * CGContext::rewriteAbstractDecl ( AbstractDomainDecl abstract  )  const

Returns the instance decl corresponding to the given abstract decl using the current parameter map, or null if there is no association.

Definition at line 41 of file CGContext.cpp.


The documentation for this class was generated from the following files:

Generated on 1 Feb 2010 for Comma by  doxygen 1.6.1