Ignore:
Timestamp:
Jun 30, 2016, 4:32:56 PM (9 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
ea29e73
Parents:
1b5c81ed (diff), 84d4d6f (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into gc_noraii

Conflicts:

Jenkinsfile
src/SymTab/Validate.cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/TypeSubstitution.h

    r1b5c81ed rf80e0218  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // TypeSubstitution.h -- 
     7// TypeSubstitution.h --
    88//
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Mar  2 17:33:19 2016
     11// Last Modified By : Rob Schluntz
     12// Last Modified On : Fri Apr 29 15:00:20 2016
    1313// Update Count     : 2
    1414//
     
    3333        TypeSubstitution( const TypeSubstitution &other );
    3434        virtual ~TypeSubstitution();
    35        
     35
    3636        TypeSubstitution &operator=( const TypeSubstitution &other );
    37        
     37
    3838        template< typename SynTreeClass > int apply( SynTreeClass *&input );
    3939        template< typename SynTreeClass > int applyFree( SynTreeClass *&input );
    40        
     40
    4141        void add( std::string formalType, Type *actualType );
    4242        void add( const TypeSubstitution &other );
     
    4444        Type *lookup( std::string formalType ) const;
    4545        bool empty() const;
    46        
     46
    4747        template< typename FormalIterator, typename ActualIterator >
    4848        void add( FormalIterator formalBegin, FormalIterator formalEnd, ActualIterator actualBegin );
    49        
     49
     50        /// this function is unused...
    5051        template< typename TypeInstListIterator >
    5152        void extract( TypeInstListIterator begin, TypeInstListIterator end, TypeSubstitution &result );
    52        
     53
    5354        void normalize();
    5455
     
    6364        /// Records type variable bindings from forall-statements and instantiations of generic types
    6465        template< typename TypeClass > Type *handleAggregateType( TypeClass *type );
    65        
     66
    6667        virtual Type* mutate(VoidType *basicType);
    6768        virtual Type* mutate(BasicType *basicType);
     
    7576        virtual Type* mutate(TupleType *tupleType);
    7677        virtual Type* mutate(VarArgsType *varArgsType);
    77        
     78
    7879        // TODO: worry about traversing into a forall-qualified function type or type decl with assertions
    79        
     80
    8081        void initialize( const TypeSubstitution &src, TypeSubstitution &dest );
    8182
     
    136137        return subCount;
    137138}
    138        
     139
    139140template< typename SynTreeClass >
    140141int TypeSubstitution::applyFree( SynTreeClass *&input ) {
     
    149150        return subCount;
    150151}
    151        
     152
    152153template< typename TypeInstListIterator >
    153154void TypeSubstitution::extract( TypeInstListIterator begin, TypeInstListIterator end, TypeSubstitution &result ) {
     155        // xxx - this function doesn't extract varEnv - is this intentional?
    154156        while ( begin != end ) {
    155157                TypeEnvType::iterator cur = typeEnv.find( (*begin++)->get_name() );
     
    173175}
    174176
     177std::ostream & operator<<( std::ostream & out, const TypeSubstitution & sub );
     178
    175179#endif // TYPESUBSTITUTION_H
    176180
Note: See TracChangeset for help on using the changeset viewer.