Changes in src/GenPoly/GenPoly.h [8488c715:7754cde]
- File:
-
- 1 edited
-
src/GenPoly/GenPoly.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/GenPoly.h
r8488c715 r7754cde 20 20 #include <string> 21 21 #include <iostream> 22 #include <utility>23 22 24 23 #include "SynTree/Declaration.h" 25 #include "SynTree/Type.h"26 24 #include "SynTree/TypeSubstitution.h" 27 25 … … 34 32 35 33 /// true iff function has polymorphic return type 36 ReferenceToType *isPolyRet( FunctionType *function ); 34 bool isPolyRet( FunctionType *function, std::string &name, const TyVarMap &otherTyVars ); 35 bool isPolyRet( FunctionType *function, std::string &name ); 36 bool isPolyRet( FunctionType *function, const TyVarMap &otherTyVars ); 37 37 38 38 /// returns polymorphic type if is polymorphic type, NULL otherwise; will look up substitution in env if provided … … 48 48 Type *isPolyPtr( Type *type, const TyVarMap &tyVars, const TypeSubstitution *env = 0 ); 49 49 50 /// if the base type (after dereferencing N >= 0 pointers) is a polymorphic type, returns the base type, NULL otherwise; 51 /// N will be stored in levels, if provided, will look up substitution in env if provided 52 Type *hasPolyBase( Type *type, int *levels = 0, const TypeSubstitution *env = 0 ); 50 /// Returns a pointer to the base FunctionType if ty is the type of a function (or pointer to one), NULL otherwise 51 FunctionType * getFunctionType( Type *ty ); 53 52 54 /// if the base type (after dereferencing N >= 0 pointers) is a polymorphic type in tyVars, returns the base type, NULL otherwise;55 /// N will be stored in levels, if provided, will look up substitution in env if provided56 Type *hasPolyBase( Type *type, const TyVarMap &tyVars, int *levels = 0, const TypeSubstitution *env = 0 );57 58 /// Returns a pointer to the base FunctionType if ty is the type of a function (or pointer to one), NULL otherwise59 FunctionType *getFunctionType( Type *ty );60 61 /// If expr (after dereferencing N >= 0 pointers) is a variable expression, returns the variable expression, NULL otherwise;62 /// N will be stored in levels, if provided63 VariableExpr *getBaseVar( Expression *expr, int *levels = 0 );64 65 /// Adds the declarations in the forall list of type (and its pointed-to type if it's a pointer type) to `tyVarMap`66 void makeTyVarMap( Type *type, TyVarMap &tyVarMap );67 68 53 /// Prints type variable map 69 54 void printTyVarMap( std::ostream &os, const TyVarMap &tyVarMap ); … … 74 59 /// Gets the name of the alignof parameter for the type 75 60 std::string alignofName( Type *ty ); 76 77 /// Gets the name of the offsetof parameter for the type78 std::string offsetofName( Type *ty );79 61 } // namespace GenPoly 80 62
Note:
See TracChangeset
for help on using the changeset viewer.