Changeset eb5962a for src/AST/TypeSubstitution.hpp
- Timestamp:
- Jun 21, 2022, 1:39:24 PM (2 years ago)
- 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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/TypeSubstitution.hpp
r1df492a reb5962a 75 75 void add( const TypeSubstitution &other ); 76 76 void remove( const TypeInstType * formalType ); 77 const Type *lookup( const TypeInstType::TypeEnvKey & formalType ) const; 77 78 const Type *lookup( const TypeInstType * formalType ) const; 78 79 bool empty() const; … … 104 105 friend class Pass; 105 106 106 typedef std::unordered_map< TypeInstType::TypeEnvKey, ptr<Type> > Type EnvType;107 Type EnvType typeEnv;107 typedef std::unordered_map< TypeInstType::TypeEnvKey, ptr<Type> > TypeMap; 108 TypeMap typeMap; 108 109 109 110 public: 110 // has to come after declaration of type Env111 auto begin() -> decltype( type Env.begin() ) { return typeEnv.begin(); }112 auto end() -> decltype( type Env. end() ) { return typeEnv. end(); }113 auto begin() const -> decltype( type Env.begin() ) { return typeEnv.begin(); }114 auto end() const -> decltype( type Env. 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(); } 115 116 116 117 }; … … 144 145 if ( const TypeExpr *actual = actualIt->template as<TypeExpr>() ) { 145 146 if ( formal->name != "" ) { 146 type Env[ formal ] = actual->type;147 typeMap[ formal ] = actual->type; 147 148 } // if 148 149 } else {
Note: See TracChangeset
for help on using the changeset viewer.