Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/GenPoly.h

    r8488c715 r7754cde  
    2020#include <string>
    2121#include <iostream>
    22 #include <utility>
    2322
    2423#include "SynTree/Declaration.h"
    25 #include "SynTree/Type.h"
    2624#include "SynTree/TypeSubstitution.h"
    2725
     
    3432
    3533        /// 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 );
    3737
    3838        /// returns polymorphic type if is polymorphic type, NULL otherwise; will look up substitution in env if provided
     
    4848        Type *isPolyPtr( Type *type, const TyVarMap &tyVars, const TypeSubstitution *env = 0 );
    4949
    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 );
    5352
    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 
    58         /// Returns a pointer to the base FunctionType if ty is the type of a function (or pointer to one), NULL otherwise
    59         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 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        
    6853        /// Prints type variable map
    6954        void printTyVarMap( std::ostream &os, const TyVarMap &tyVarMap );
     
    7459        /// Gets the name of the alignof parameter for the type
    7560        std::string alignofName( Type *ty );
    76 
    77         /// Gets the name of the offsetof parameter for the type
    78         std::string offsetofName( Type *ty );
    7961} // namespace GenPoly
    8062
Note: See TracChangeset for help on using the changeset viewer.