Changes in src/GenPoly/GenPoly.h [3bb195cb:2c57025]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/GenPoly.h
r3bb195cb r2c57025 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // GenPoly.h -- 7 // GenPoly.h -- 8 8 // 9 9 // Author : Richard C. Bilson … … 30 30 31 31 namespace GenPoly { 32 typedef ErasableScopedMap< std::string, TypeDecl:: Kind> TyVarMap;32 typedef ErasableScopedMap< std::string, TypeDecl::Data > TyVarMap; 33 33 34 34 /// Replaces a TypeInstType by its referrent in the environment, if applicable 35 35 Type* replaceTypeInst( Type* type, const TypeSubstitution* env ); 36 36 37 37 /// returns polymorphic type if is polymorphic type, NULL otherwise; will look up substitution in env if provided 38 38 Type *isPolyType( Type *type, const TypeSubstitution *env = 0 ); 39 39 40 40 /// returns polymorphic type if is polymorphic type in tyVars, NULL otherwise; will look up substitution in env if provided 41 41 Type *isPolyType( Type *type, const TyVarMap &tyVars, const TypeSubstitution *env = 0 ); 42 42 43 43 /// returns dynamic-layout type if is dynamic-layout type in tyVars, NULL otherwise; will look up substitution in env if provided 44 Type *isDynType( Type *type, const TyVarMap &tyVars, const TypeSubstitution *env = 0 );44 ReferenceToType *isDynType( Type *type, const TyVarMap &tyVars, const TypeSubstitution *env = 0 ); 45 45 46 46 /// true iff function has dynamic-layout return type under the given type variable map … … 55 55 /// returns polymorphic type if is pointer to polymorphic type, NULL otherwise; will look up substitution in env if provided 56 56 Type *isPolyPtr( Type *type, const TypeSubstitution *env = 0 ); 57 57 58 58 /// returns polymorphic type if is pointer to polymorphic type in tyVars, NULL otherwise; will look up substitution in env if provided 59 59 Type *isPolyPtr( Type *type, const TyVarMap &tyVars, const TypeSubstitution *env = 0 ); … … 74 74 VariableExpr *getBaseVar( Expression *expr, int *levels = 0 ); 75 75 76 /// Adds the type variable `tyVar` to `tyVarMap` 77 void addToTyVarMap( TypeDecl * tyVar, TyVarMap &tyVarMap ); 78 76 79 /// Adds the declarations in the forall list of type (and its pointed-to type if it's a pointer type) to `tyVarMap` 77 80 void makeTyVarMap( Type *type, TyVarMap &tyVarMap ); 78 81 79 82 /// Prints type variable map 80 83 void printTyVarMap( std::ostream &os, const TyVarMap &tyVarMap ); … … 82 85 /// Gets the mangled name of this type; alias for SymTab::Mangler::mangleType(). 83 86 inline std::string mangleType( Type *ty ) { return SymTab::Mangler::mangleType( ty ); } 84 87 85 88 /// Gets the name of the sizeof parameter for the type, given its mangled name 86 89 inline std::string sizeofName( const std::string &name ) { return std::string( "_sizeof_" ) + name; } … … 94 97 /// Gets the name of the layout function for a given aggregate type, given its declaration 95 98 inline std::string layoutofName( AggregateDecl *decl ) { return std::string( "_layoutof_" ) + decl->get_name(); } 96 99 97 100 } // namespace GenPoly 98 101
Note:
See TracChangeset
for help on using the changeset viewer.