Changes in src/GenPoly/GenPoly.h [ffad73a:bdf1954]
- File:
-
- 1 edited
-
src/GenPoly/GenPoly.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/GenPoly.h
rffad73a rbdf1954 20 20 #include <string> 21 21 #include <iostream> 22 23 22 #include "SynTree/Declaration.h" 24 #include "SynTree/TypeSubstitution.h"25 23 26 24 namespace GenPoly { 27 25 typedef std::map< std::string, TypeDecl::Kind > TyVarMap; 28 26 29 /// A function needs an adapter if it returns a polymorphic value or if any of its30 /// parameters have polymorphic type31 27 bool needsAdapter( FunctionType *adaptee, const TyVarMap &tyVarr ); 32 33 /// true iff function has polymorphic return type34 28 bool isPolyRet( FunctionType *function, std::string &name, const TyVarMap &otherTyVars ); 35 29 bool isPolyRet( FunctionType *function, std::string &name ); 36 30 bool isPolyRet( FunctionType *function, const TyVarMap &otherTyVars ); 31 // bool isPolyFun( FunctionType *fun, const TyVarMap &tyVars ); 32 bool isPolyVal( Type *type, const TyVarMap &tyVars ); 37 33 38 /// returns polymorphic type if is polymorphic type, NULL otherwise; will look up substitution in env if provided 39 Type *isPolyType( Type *type, const TyVarMap &tyVars, const TypeSubstitution *env = 0 ); 40 41 /// returns polymorphic type if is pointer to polymorphic type, NULL otherwise; will look up substitution in env if provided 42 Type *isPolyPtr( Type *type, const TyVarMap &tyVars, const TypeSubstitution *env = 0 ); 43 44 /// Prints type variable map 34 // true if type variable or any number of pointers to type variable 35 bool isPolyObj( Type *type, const TyVarMap &tyVars ); 45 36 void printTyVarMap( std::ostream &os, const TyVarMap &tyVarMap ); 46 47 /// Gets the name of the sizeof parameter for the type48 std::string sizeofName( Type *ty );49 50 /// Gets the name of the alignof parameter for the type51 std::string alignofName( Type *ty );52 37 } // namespace GenPoly 53 38
Note:
See TracChangeset
for help on using the changeset viewer.