Ignore:
Timestamp:
Nov 15, 2016, 5:30:52 PM (8 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
d9fa60a
Parents:
8f9cc50
Message:

changed use of formal types to actual types for boxing return parameters and passing type variables, fix bug where generic struct's members would change types when a member is accessed on a concrete instantiation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/GenPoly.h

    r8f9cc50 r33a7b6d  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // GenPoly.h -- 
     7// GenPoly.h --
    88//
    99// Author           : Richard C. Bilson
     
    3434        /// Replaces a TypeInstType by its referrent in the environment, if applicable
    3535        Type* replaceTypeInst( Type* type, const TypeSubstitution* env );
    36        
     36
    3737        /// returns polymorphic type if is polymorphic type, NULL otherwise; will look up substitution in env if provided
    3838        Type *isPolyType( Type *type, const TypeSubstitution *env = 0 );
    39        
     39
    4040        /// returns polymorphic type if is polymorphic type in tyVars, NULL otherwise; will look up substitution in env if provided
    4141        Type *isPolyType( Type *type, const TyVarMap &tyVars, const TypeSubstitution *env = 0 );
    4242
    4343        /// 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 );
    4545
    4646        /// true iff function has dynamic-layout return type under the given type variable map
     
    5555        /// returns polymorphic type if is pointer to polymorphic type, NULL otherwise; will look up substitution in env if provided
    5656        Type *isPolyPtr( Type *type, const TypeSubstitution *env = 0 );
    57        
     57
    5858        /// returns polymorphic type if is pointer to polymorphic type in tyVars, NULL otherwise; will look up substitution in env if provided
    5959        Type *isPolyPtr( Type *type, const TyVarMap &tyVars, const TypeSubstitution *env = 0 );
     
    7676        /// Adds the declarations in the forall list of type (and its pointed-to type if it's a pointer type) to `tyVarMap`
    7777        void makeTyVarMap( Type *type, TyVarMap &tyVarMap );
    78        
     78
    7979        /// Prints type variable map
    8080        void printTyVarMap( std::ostream &os, const TyVarMap &tyVarMap );
     
    8282        /// Gets the mangled name of this type; alias for SymTab::Mangler::mangleType().
    8383        inline std::string mangleType( Type *ty ) { return SymTab::Mangler::mangleType( ty ); }
    84        
     84
    8585        /// Gets the name of the sizeof parameter for the type, given its mangled name
    8686        inline std::string sizeofName( const std::string &name ) { return std::string( "_sizeof_" ) + name; }
     
    9494        /// Gets the name of the layout function for a given aggregate type, given its declaration
    9595        inline std::string layoutofName( AggregateDecl *decl ) { return std::string( "_layoutof_" ) + decl->get_name(); }
    96        
     96
    9797} // namespace GenPoly
    9898
Note: See TracChangeset for help on using the changeset viewer.