Changes in src/GenPoly/GenPoly.h [7754cde:8488c715]
- File:
-
- 1 edited
-
src/GenPoly/GenPoly.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/GenPoly.h
r7754cde r8488c715 20 20 #include <string> 21 21 #include <iostream> 22 #include <utility> 22 23 23 24 #include "SynTree/Declaration.h" 25 #include "SynTree/Type.h" 24 26 #include "SynTree/TypeSubstitution.h" 25 27 … … 32 34 33 35 /// true iff function has polymorphic return type 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 ); 36 ReferenceToType *isPolyRet( FunctionType *function ); 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 ); 53 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 provided 56 Type *hasPolyBase( Type *type, const TyVarMap &tyVars, int *levels = 0, const TypeSubstitution *env = 0 ); 57 50 58 /// 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 );59 FunctionType *getFunctionType( Type *ty ); 52 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 provided 63 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 53 68 /// Prints type variable map 54 69 void printTyVarMap( std::ostream &os, const TyVarMap &tyVarMap ); … … 59 74 /// Gets the name of the alignof parameter for the type 60 75 std::string alignofName( Type *ty ); 76 77 /// Gets the name of the offsetof parameter for the type 78 std::string offsetofName( Type *ty ); 61 79 } // namespace GenPoly 62 80
Note:
See TracChangeset
for help on using the changeset viewer.