Ignore:
Timestamp:
Jun 21, 2022, 1:39:24 PM (22 months ago)
Author:
JiadaL <j82liang@…>
Branches:
ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
Children:
b62d1d6
Parents:
1df492a (diff), 1dbbef6 (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' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/TypeSubstitution.hpp

    r1df492a reb5962a  
    7575        void add( const TypeSubstitution &other );
    7676        void remove( const TypeInstType * formalType );
     77        const Type *lookup( const TypeInstType::TypeEnvKey & formalType ) const;
    7778        const Type *lookup( const TypeInstType * formalType ) const;
    7879        bool empty() const;
     
    104105        friend class Pass;
    105106
    106         typedef std::unordered_map< TypeInstType::TypeEnvKey, ptr<Type> > TypeEnvType;
    107         TypeEnvType typeEnv;
     107        typedef std::unordered_map< TypeInstType::TypeEnvKey, ptr<Type> > TypeMap;
     108        TypeMap typeMap;
    108109
    109110  public:
    110         // has to come after declaration of typeEnv
    111         auto begin()       -> decltype( typeEnv.begin() ) { return typeEnv.begin(); }
    112         auto   end()       -> decltype( typeEnv.  end() ) { return typeEnv.  end(); }
    113         auto begin() const -> decltype( typeEnv.begin() ) { return typeEnv.begin(); }
    114         auto   end() const -> decltype( typeEnv.  end() ) { return typeEnv.  end(); }
     111        // has to come after declaration of typeMap
     112        auto begin()       -> decltype( typeMap.begin() ) { return typeMap.begin(); }
     113        auto   end()       -> decltype( typeMap.  end() ) { return typeMap.  end(); }
     114        auto begin() const -> decltype( typeMap.begin() ) { return typeMap.begin(); }
     115        auto   end() const -> decltype( typeMap.  end() ) { return typeMap.  end(); }
    115116
    116117};
     
    144145                        if ( const TypeExpr *actual = actualIt->template as<TypeExpr>() ) {
    145146                                if ( formal->name != "" ) {
    146                                         typeEnv[ formal ] = actual->type;
     147                                        typeMap[ formal ] = actual->type;
    147148                                } // if
    148149                        } else {
Note: See TracChangeset for help on using the changeset viewer.