Welcome to the NetCologne GmbH open source mirroring service!

This machine mirrors various open-source projects. 20 Gbit/s uplink.

If there are any issues or you want another project mirrored, please contact mirror-service -=AT=- netcologne DOT de !

Comma: comma::AstResource Class Reference

comma::AstResource Class Reference

#include <AstResource.h>

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

List of all members.

Public Member Functions

 AstResource (TextProvider &txtProvider, IdentifierPool &idPool)
TextProvidergetTextProvider ()
IdentifierPoolgetIdentifierPool ()
IdentifierInfogetIdentifierInfo (const char *name) const
IdentifierInfogetIdentifierInfo (const char *name, unsigned len) const
IdentifierInfogetIdentifierInfo (const std::string &name) const
FunctionTypegetFunctionType (Type **argTypes, unsigned numArgs, Type *returnType)
 Returns a uniqued FunctionType.
ProcedureTypegetProcedureType (Type **argTypes, unsigned numArgs)
 Returns a uniqued ProcedureType.
DiscreteTypecreateDiscreteSubtype (DiscreteType *base, Expr *low, Expr *high, TypeDecl *decl=0)
ExceptionDeclcreateExceptionDecl (IdentifierInfo *name, Location loc, DeclRegion *region)
 Creates an exception declaration.
FunctionDeclcreatePrimitiveDecl (PO::PrimitiveID ID, Location loc, Type *type, DeclRegion *region)
Domain type constructors.



DomainTypecreateDomainType (DomainTypeDecl *decl)
DomainTypecreateDomainSubtype (DomainType *rootTy, IdentifierInfo *name)
 Creates a subtype of the given domain type node.
Enumeration declaration and type constructors.



EnumerationDeclcreateEnumDecl (IdentifierInfo *name, Location loc, std::pair< IdentifierInfo *, Location > *elems, unsigned numElems, DeclRegion *parent)
 Creates an enumeration declaration node.
EnumerationDeclcreateEnumSubtypeDecl (IdentifierInfo *name, Location loc, EnumerationType *subtype, Expr *low, Expr *high, DeclRegion *parent)
 Creates a constrained enumeration subtype declaration node.
EnumerationDeclcreateEnumSubtypeDecl (IdentifierInfo *name, Location loc, EnumerationType *subtype, DeclRegion *parent)
 Creates an unconstrained enumeration subtype declaration node.
EnumerationTypecreateEnumType (EnumerationDecl *decl)
 Returns an EnumerationType node.
EnumerationTypecreateEnumSubtype (EnumerationType *base, EnumerationDecl *decl=0)
 Returns an unconstrained subtype of the given EnumerationType.
EnumerationTypecreateEnumSubtype (EnumerationType *base, Expr *low, Expr *high, EnumerationDecl *decl=0)
 Returns a constrained enumeration subtype.
Integer declaration and type constructors.



IntegerDeclcreateIntegerDecl (IdentifierInfo *name, Location loc, Expr *lowRange, Expr *highRange, DeclRegion *parent)
 Creates an integer declaration node.
IntegerDeclcreateIntegerSubtypeDecl (IdentifierInfo *name, Location loc, IntegerType *subtype, Expr *lower, Expr *upper, DeclRegion *parent)
 Creates a constrained integer subtype declaration node.
IntegerDeclcreateIntegerSubtypeDecl (IdentifierInfo *name, Location loc, IntegerType *subtype, DeclRegion *parent)
 Creates an unconstrained integer subtype declaration node.
IntegerTypecreateIntegerType (IntegerDecl *decl, const llvm::APInt &low, const llvm::APInt &high)
 Returns an IntegerType node with the given static bounds.
IntegerTypecreateIntegerSubtype (IntegerType *base, Expr *low, Expr *high, IntegerDecl *decl=0)
IntegerTypecreateIntegerSubtype (IntegerType *base, const llvm::APInt &low, const llvm::APInt &high, IntegerDecl *decl=0)
IntegerTypecreateIntegerSubtype (IntegerType *base, IntegerDecl *decl=0)
 Returns an unconstrained integer subtype.
Array declaration and type constructors.



ArrayDeclcreateArrayDecl (IdentifierInfo *name, Location loc, unsigned rank, DSTDefinition **indices, Type *component, bool isConstrained, DeclRegion *parent)
 Creates an Array declaration node.
ArrayTypecreateArrayType (ArrayDecl *decl, unsigned rank, DiscreteType **indices, Type *component, bool isConstrained)
ArrayTypecreateArraySubtype (IdentifierInfo *name, ArrayType *base, DiscreteType **indices)
 Returns a constrained array subtype node.
ArrayTypecreateArraySubtype (IdentifierInfo *name, ArrayType *base)
 Returns an unconstrained array subtype node.
Record declaration and type constructors.



RecordDeclcreateRecordDecl (IdentifierInfo *name, Location loc, DeclRegion *parent)
 Creates a Record declaration node.
RecordTypecreateRecordType (RecordDecl *decl)
 Returns a record type corresponding to the given declaration.
RecordTypecreateRecordSubtype (IdentifierInfo *name, RecordType *base)
 Returns a subtype of the given record type.
Access declaration and type constructors.



AccessDeclcreateAccessDecl (IdentifierInfo *name, Location loc, Type *targetType, DeclRegion *parent)
 Creates an access type declaration node.
AccessTypecreateAccessType (AccessDecl *decl, Type *targetType)
AccessTypecreateAccessSubtype (IdentifierInfo *name, AccessType *baseType)
 Creates an access subtype using the given access type as a base.
Incomplete declaration and type constructors.



IncompleteTypeDeclcreateIncompleteTypeDecl (IdentifierInfo *name, Location loc, DeclRegion *parent)
 Creates an incomplete type declaration node.
IncompleteTypecreateIncompleteType (IncompleteTypeDecl *decl)
 Returns an incomplete type corresponding to the given declaration.
IncompleteTypecreateIncompleteSubtype (IdentifierInfo *name, IncompleteType *base)
 Returns a subtype of the given incomplete type.
Language Defined AST Nodes.

Provides access to basic nodes which represent the various language defined type and exception declarations. Eventually this interface will be superseded by a set of standard packages defining these nodes.



EnumerationDeclgetTheBooleanDecl () const
EnumerationTypegetTheBooleanType () const
EnumerationDeclgetTheCharacterDecl () const
EnumerationTypegetTheCharacterType () const
IntegerDeclgetTheRootIntegerDecl () const
IntegerTypegetTheRootIntegerType () const
IntegerDeclgetTheIntegerDecl () const
IntegerTypegetTheIntegerType () const
IntegerDeclgetTheNaturalDecl () const
IntegerTypegetTheNaturalType () const
IntegerDeclgetThePositiveDecl () const
IntegerTypegetThePositiveType () const
ArrayDeclgetTheStringDecl () const
ArrayTypegetTheStringType () const
ExceptionDeclgetTheProgramError () const
ExceptionDeclgetTheConstraintError () const
ExceptionDeclgetTheAssertionError () const

Detailed Description

Definition at line 39 of file AstResource.h.


Constructor & Destructor Documentation

AstResource::AstResource ( TextProvider txtProvider,
IdentifierPool idPool 
)

Definition at line 21 of file AstResource.cpp.


Member Function Documentation

AccessDecl * AstResource::createAccessDecl ( IdentifierInfo name,
Location  loc,
Type targetType,
DeclRegion parent 
)

Creates an access type declaration node.

Definition at line 481 of file AstResource.cpp.

AccessType * AstResource::createAccessSubtype ( IdentifierInfo name,
AccessType baseType 
)

Creates an access subtype using the given access type as a base.

Definition at line 496 of file AstResource.cpp.

AccessType * AstResource::createAccessType ( AccessDecl decl,
Type targetType 
)

Creates an access type corresponding to the given declaration and target type node.

Definition at line 489 of file AstResource.cpp.

ArrayDecl * AstResource::createArrayDecl ( IdentifierInfo name,
Location  loc,
unsigned  rank,
DSTDefinition **  indices,
Type component,
bool  isConstrained,
DeclRegion parent 
)

Creates an Array declaration node.

Definition at line 420 of file AstResource.cpp.

ArrayType * AstResource::createArraySubtype ( IdentifierInfo name,
ArrayType base 
)

Returns an unconstrained array subtype node.

Definition at line 450 of file AstResource.cpp.

ArrayType * AstResource::createArraySubtype ( IdentifierInfo name,
ArrayType base,
DiscreteType **  indices 
)

Returns a constrained array subtype node.

Definition at line 441 of file AstResource.cpp.

ArrayType * AstResource::createArrayType ( ArrayDecl decl,
unsigned  rank,
DiscreteType **  indices,
Type component,
bool  isConstrained 
)

Returns an ArrayType node with the given index and component types.

Definition at line 431 of file AstResource.cpp.

DiscreteType * AstResource::createDiscreteSubtype ( DiscreteType base,
Expr low,
Expr high,
TypeDecl decl = 0 
)

Creates a discrete subtype with the given bounds as constraints.

The actual type returned depends on the actual type of the given base.

Definition at line 404 of file AstResource.cpp.

DomainType * AstResource::createDomainSubtype ( DomainType rootTy,
IdentifierInfo name 
)

Creates a subtype of the given domain type node.

Definition at line 270 of file AstResource.cpp.

DomainType * AstResource::createDomainType ( DomainTypeDecl decl  ) 

Creates a DomainType node.

Constructs a root domain type and its first subtype. Returns the first subtype.

Definition at line 256 of file AstResource.cpp.

EnumerationDecl * AstResource::createEnumDecl ( IdentifierInfo name,
Location  loc,
std::pair< IdentifierInfo *, Location > *  elems,
unsigned  numElems,
DeclRegion parent 
)

Creates an enumeration declaration node.

Definition at line 277 of file AstResource.cpp.

EnumerationType * AstResource::createEnumSubtype ( EnumerationType base,
Expr low,
Expr high,
EnumerationDecl decl = 0 
)

Returns a constrained enumeration subtype.

Definition at line 325 of file AstResource.cpp.

EnumerationType * AstResource::createEnumSubtype ( EnumerationType base,
EnumerationDecl decl = 0 
)

Returns an unconstrained subtype of the given EnumerationType.

Definition at line 317 of file AstResource.cpp.

EnumerationDecl * AstResource::createEnumSubtypeDecl ( IdentifierInfo name,
Location  loc,
EnumerationType subtype,
DeclRegion parent 
)

Creates an unconstrained enumeration subtype declaration node.

Definition at line 300 of file AstResource.cpp.

EnumerationDecl * AstResource::createEnumSubtypeDecl ( IdentifierInfo name,
Location  loc,
EnumerationType subtype,
Expr low,
Expr high,
DeclRegion parent 
)

Creates a constrained enumeration subtype declaration node.

Definition at line 288 of file AstResource.cpp.

EnumerationType * AstResource::createEnumType ( EnumerationDecl decl  ) 

Returns an EnumerationType node.

Definition at line 310 of file AstResource.cpp.

ExceptionDecl * AstResource::createExceptionDecl ( IdentifierInfo name,
Location  loc,
DeclRegion region 
)

Creates an exception declaration.

Parameters:
name The name of this exception.
loc The location of name in the source code.
region The declarative region this exception was declared in.

Definition at line 528 of file AstResource.cpp.

IncompleteType * AstResource::createIncompleteSubtype ( IdentifierInfo name,
IncompleteType base 
)

Returns a subtype of the given incomplete type.

Definition at line 520 of file AstResource.cpp.

IncompleteType * AstResource::createIncompleteType ( IncompleteTypeDecl decl  ) 

Returns an incomplete type corresponding to the given declaration.

Definition at line 513 of file AstResource.cpp.

IncompleteTypeDecl * AstResource::createIncompleteTypeDecl ( IdentifierInfo name,
Location  loc,
DeclRegion parent 
)

Creates an incomplete type declaration node.

Definition at line 505 of file AstResource.cpp.

IntegerDecl * AstResource::createIntegerDecl ( IdentifierInfo name,
Location  loc,
Expr lowRange,
Expr highRange,
DeclRegion parent 
)

Creates an integer declaration node.

Definition at line 335 of file AstResource.cpp.

IntegerType * AstResource::createIntegerSubtype ( IntegerType base,
IntegerDecl decl = 0 
)

Returns an unconstrained integer subtype.

Definition at line 396 of file AstResource.cpp.

IntegerType * AstResource::createIntegerSubtype ( IntegerType base,
const llvm::APInt &  low,
const llvm::APInt &  high,
IntegerDecl decl = 0 
)

Returns an anonymous integer subtype node constrained over the given bounds.

The resulting subtype will have IntegerLiteral expressions generated to encapsulate the provided constants.

If decl is null an anonymous integer subtype is created. Otherwise the subtype is associated with the given integer subtype declaration.

Definition at line 386 of file AstResource.cpp.

IntegerType * AstResource::createIntegerSubtype ( IntegerType base,
Expr low,
Expr high,
IntegerDecl decl = 0 
)

Returns an integer subtype node constrained over the given bounds.

If decl is null an anonymous integer subtype is created. Otherwise the subtype is associated with the given integer subtype declaration.

Definition at line 376 of file AstResource.cpp.

IntegerDecl * AstResource::createIntegerSubtypeDecl ( IdentifierInfo name,
Location  loc,
IntegerType subtype,
DeclRegion parent 
)

Creates an unconstrained integer subtype declaration node.

Definition at line 358 of file AstResource.cpp.

IntegerDecl * AstResource::createIntegerSubtypeDecl ( IdentifierInfo name,
Location  loc,
IntegerType subtype,
Expr lower,
Expr upper,
DeclRegion parent 
)

Creates a constrained integer subtype declaration node.

Definition at line 346 of file AstResource.cpp.

IntegerType * AstResource::createIntegerType ( IntegerDecl decl,
const llvm::APInt &  low,
const llvm::APInt &  high 
)

Returns an IntegerType node with the given static bounds.

Definition at line 367 of file AstResource.cpp.

FunctionDecl * AstResource::createPrimitiveDecl ( PO::PrimitiveID  ID,
Location  loc,
Type type,
DeclRegion region 
)

Creates a function declaration corresponding to the given primitive operation.

Parameters:
ID The primitive operator ID this declaration should support.
type The argument types of this function. If the operator is Boolean valued, the return type is Boolean. If the operator is the exponentiation operator, the right hand type is Natural. Otherwise, this is an arithmetic operation and the return type matches the argument types.
loc The location this operator is considered to be defined.
region The decalarative region the function should be declared in.

Definition at line 537 of file AstResource.cpp.

RecordDecl * AstResource::createRecordDecl ( IdentifierInfo name,
Location  loc,
DeclRegion parent 
)

Creates a Record declaration node.

Definition at line 458 of file AstResource.cpp.

RecordType * AstResource::createRecordSubtype ( IdentifierInfo name,
RecordType base 
)

Returns a subtype of the given record type.

Definition at line 473 of file AstResource.cpp.

RecordType * AstResource::createRecordType ( RecordDecl decl  ) 

Returns a record type corresponding to the given declaration.

Definition at line 466 of file AstResource.cpp.

FunctionType * AstResource::getFunctionType ( Type **  argTypes,
unsigned  numArgs,
Type returnType 
)

Returns a uniqued FunctionType.

Definition at line 227 of file AstResource.cpp.

IdentifierInfo* comma::AstResource::getIdentifierInfo ( const std::string &  name  )  const [inline]

Definition at line 61 of file AstResource.h.

IdentifierInfo* comma::AstResource::getIdentifierInfo ( const char *  name,
unsigned  len 
) const [inline]

Definition at line 58 of file AstResource.h.

IdentifierInfo* comma::AstResource::getIdentifierInfo ( const char *  name  )  const [inline]

Definition at line 55 of file AstResource.h.

IdentifierPool& comma::AstResource::getIdentifierPool (  )  [inline]

Definition at line 51 of file AstResource.h.

ProcedureType * AstResource::getProcedureType ( Type **  argTypes,
unsigned  numArgs 
)

Returns a uniqued ProcedureType.

Definition at line 242 of file AstResource.cpp.

TextProvider& comma::AstResource::getTextProvider (  )  [inline]

Definition at line 49 of file AstResource.h.

ExceptionDecl* comma::AstResource::getTheAssertionError (  )  const [inline]

Accessors to the language defined types. We keep these out of line since we do not want a dependence on Decl.h in AstResource.h.

Definition at line 294 of file AstResource.h.

EnumerationDecl* comma::AstResource::getTheBooleanDecl (  )  const [inline]

Accessors to the language defined types. We keep these out of line since we do not want a dependence on Decl.h in AstResource.h.

Definition at line 271 of file AstResource.h.

EnumerationType * AstResource::getTheBooleanType (  )  const

Accessors to the language defined types. We keep these out of line since we do not want a dependence on Decl.h in AstResource.h.

Definition at line 192 of file AstResource.cpp.

EnumerationDecl* comma::AstResource::getTheCharacterDecl (  )  const [inline]

Accessors to the language defined types. We keep these out of line since we do not want a dependence on Decl.h in AstResource.h.

Definition at line 274 of file AstResource.h.

EnumerationType * AstResource::getTheCharacterType (  )  const

Accessors to the language defined types. We keep these out of line since we do not want a dependence on Decl.h in AstResource.h.

Definition at line 217 of file AstResource.cpp.

ExceptionDecl* comma::AstResource::getTheConstraintError (  )  const [inline]

Accessors to the language defined types. We keep these out of line since we do not want a dependence on Decl.h in AstResource.h.

Definition at line 293 of file AstResource.h.

IntegerDecl* comma::AstResource::getTheIntegerDecl (  )  const [inline]

Accessors to the language defined types. We keep these out of line since we do not want a dependence on Decl.h in AstResource.h.

Definition at line 280 of file AstResource.h.

IntegerType * AstResource::getTheIntegerType (  )  const

Accessors to the language defined types. We keep these out of line since we do not want a dependence on Decl.h in AstResource.h.

Definition at line 202 of file AstResource.cpp.

IntegerDecl* comma::AstResource::getTheNaturalDecl (  )  const [inline]

Accessors to the language defined types. We keep these out of line since we do not want a dependence on Decl.h in AstResource.h.

Definition at line 283 of file AstResource.h.

IntegerType * AstResource::getTheNaturalType (  )  const

Accessors to the language defined types. We keep these out of line since we do not want a dependence on Decl.h in AstResource.h.

Definition at line 207 of file AstResource.cpp.

IntegerDecl* comma::AstResource::getThePositiveDecl (  )  const [inline]

Accessors to the language defined types. We keep these out of line since we do not want a dependence on Decl.h in AstResource.h.

Definition at line 286 of file AstResource.h.

IntegerType * AstResource::getThePositiveType (  )  const

Accessors to the language defined types. We keep these out of line since we do not want a dependence on Decl.h in AstResource.h.

Definition at line 212 of file AstResource.cpp.

ExceptionDecl* comma::AstResource::getTheProgramError (  )  const [inline]

Accessors to the language defined types. We keep these out of line since we do not want a dependence on Decl.h in AstResource.h.

Definition at line 292 of file AstResource.h.

IntegerDecl* comma::AstResource::getTheRootIntegerDecl (  )  const [inline]

Accessors to the language defined types. We keep these out of line since we do not want a dependence on Decl.h in AstResource.h.

Definition at line 277 of file AstResource.h.

IntegerType * AstResource::getTheRootIntegerType (  )  const

Accessors to the language defined types. We keep these out of line since we do not want a dependence on Decl.h in AstResource.h.

Definition at line 197 of file AstResource.cpp.

ArrayDecl* comma::AstResource::getTheStringDecl (  )  const [inline]

Accessors to the language defined types. We keep these out of line since we do not want a dependence on Decl.h in AstResource.h.

Definition at line 289 of file AstResource.h.

ArrayType * AstResource::getTheStringType (  )  const

Accessors to the language defined types. We keep these out of line since we do not want a dependence on Decl.h in AstResource.h.

Definition at line 222 of file AstResource.cpp.


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

Generated on 1 Feb 2010 for Comma by  doxygen 1.6.1