Logo Search packages:      
Sourcecode: fauhdlc version File versions

ast::ResolveTypes Class Reference

#include <ResolveTypes.hpp>

Inheritance diagram for ast::ResolveTypes:

ast::TopDownVisitor ast::Visitor

List of all members.


Detailed Description

Resolve all types.

This visitor will resolve all types from the set of candidates evaluated by the SymbolTable.

Notes: * implicit conversions: universal_integer -> any integer type. universal_real -> any floating point type. array definition: index_constraint -> "integer", in case both bounds are universal_integer and literals or attributes.

function calls: parameter must match subtype!

Definition at line 41 of file ResolveTypes.hpp.


Public Member Functions

 ResolveTypes (SymbolTable &symTab)
 c'tor
virtual void visit (AttributeDeclaration &node)
virtual void visit (TypeConversion &node)
virtual void visit (LibraryList &node)
virtual void visit (Library &node)
virtual void visit (EnumerationElement &node)
virtual void visit (RecordTypeElement &node)
virtual void visit (PhysicalTypeUnit &node)
virtual void visit (EnumerationType &node)
virtual void visit (CondalSigAssign &node)
virtual void visit (SubprogBody &node)
virtual void visit (PackageBody &node)
virtual void visit (Package &node)
virtual void visit (ProcedureDeclaration &node)
virtual void visit (Architecture &node)
virtual void visit (CaseAlternative &node)
virtual void visit (VarDeclaration &node)
virtual void visit (ExitStat &node)
virtual void visit (NextStat &node)
virtual void visit (NullStat &node)
virtual void visit (IfStat &node)
virtual void visit (ConstantDeclaration &node)
virtual void visit (SignalDeclaration &node)
virtual void visit (Entity &node)
virtual void visit (ConstArray &node)

Static Public Member Functions

static bool baseTypeEqual (const TypeDeclaration &t1, const TypeDeclaration &t2)
static DiscreteRangedetermineIndexRangeAgg (const UnconstrainedArrayType *at, const std::list< ElementAssociation * > &assocs)
static const TypeDeclarationfindBaseType (const TypeDeclaration *t)
static const
UnconstrainedArrayType
pickupIndexConstraint (const TypeDeclaration *constrainedArray, std::list< DiscreteRange * > &indexConstraint)

Protected Member Functions

template<typename T>
void listTraverse (T &l, bool &deleteFlag)
 traverse a list of AST nodes, eventually deleting a node.
template<typename T>
void listTraverse (T l)
 traverse a list of AST nodes.
virtual void process (AttributableDeclaration &node)
 Process a AttributableDeclaration.
virtual void process (Name &node)
 Process a generic Name.
virtual void process (PrefixedName &node)
 Process a generic PrefixedName.
virtual void process (TypeDeclaration &node)
 Process a generic TypeDeclaration.
virtual void process (Callable &node)
 Process a generic Callable.
virtual void process (LoopStat &node)
 Process a generic LoopStat.
virtual void process (Expression &node)
 Process a generic Expression.
virtual void process (SymbolDeclaration &node)
 Process a generic SymbolDeclaration.
virtual void process (AstNode &node)
 Process a generic AstNode.

Static Protected Attributes

static int visits = 0

Private Types

typedef std::set< const
TypeDeclaration * > 
typeSetT

Private Member Functions

void needNotEmpty (Location loc)
bool needUniqueType (Expression &node) const
bool needUniqueType (AstNode &node) const
virtual void process (SeqStat &node)
virtual void process (ConditionedStat &node)
virtual void process (LibUnit &node)
virtual void process (ValDeclaration &node)
void processAlternative (CaseAlternative &node)
void processArrayAgg (Aggregate &node)
void processArrayAssoc (ElementAssociation &node)
template<typename T>
void processConstraintType (T &node)
void processDRByName (DiscreteRange &node)
void processLeftAttr (AttributeName &node)
void processRangeAttr (AttributeName &node)
void processRightAttr (AttributeName &node)
template<typename T>
void processSubprogCall (T &node, bool mustSingle)
void processUniversal (Expression &node, const TypeDeclaration *directMatch, enum BaseType icCompatible)
virtual void visit (AttributeSpecification &node)
virtual void visit (WaveFormElem &node)
virtual void visit (Process &node)
virtual void visit (WaitStat &node)
virtual void visit (CaseStat &node)
virtual void visit (AssertStat &node)
virtual void visit (WhileLoopStat &node)
virtual void visit (ForLoopStat &node)
virtual void visit (SubtypeIndication &node)
virtual void visit (ProcCallStat &node)
virtual void visit (FunctionDeclaration &node)
virtual void visit (RecordType &node)
virtual void visit (PhysicalType &node)
virtual void visit (RangeConstraintType &node)
virtual void visit (ReturnStat &node)
virtual void visit (TemporaryName &node)
virtual void visit (Slice &node)
virtual void visit (Others &node)
virtual void visit (ElementAssociation &node)
virtual void visit (Aggregate &node)
virtual void visit (ConstReal &node)
virtual void visit (ConstInteger &node)
virtual void visit (FunctionCall &node)
virtual void visit (AttributeName &node)
virtual void visit (SelectedName &node)
virtual void visit (SimpleName &node)
virtual void visit (Subscript &node)
virtual void visit (SigAssignStat &node)
virtual void visit (VarAssignStat &node)
virtual void visit (DiscreteRange &node)
virtual void visit (UnconstrainedArrayType &node)
virtual void visit (AssociationElement &node)
virtual void visit (CompInstStat &node)

Static Private Member Functions

static void debugPrintTypes (const typeSetT &types)
static DiscreteRangefindRange (const TypeDeclaration *rangeType)
static const TypeDeclarationsubscribedType (const TypeDeclaration &array, unsigned int nIdx, Location loc)
static enum BaseType transformBaseType (enum BaseType rangeType, Location loc)

Private Attributes

SymbolTablesymbolTable
typeSetT typeCandidates

Friends

class NodeFactory::TypeDeclHelper

Classes

class  IndexTypeFilter
 transform/filter cands into an index type. More...
class  ProjectPositionalArg
class  SubscriptFilter
 compare the subscripted type to wanted type More...
class  SymbolFilter
class  TypeFilter

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

Generated by  Doxygen 1.6.0   Back to index