Changeset 1a59641 for src/ResolvExpr/TypeEnvironment.h
- Timestamp:
- Jul 27, 2018, 2:41:34 PM (5 years ago)
- Branches:
- new-env
- Children:
- 6fa409e
- Parents:
- 5a3e1f1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/TypeEnvironment.h
r5a3e1f1 r1a59641 78 78 typedef std::map< std::string, TypeDecl::Data > OpenVarSet; 79 79 80 /// merges one set of open vars into another 81 static inline void mergeOpenVars( OpenVarSet& dst, const OpenVarSet& src ) { 82 for ( const auto& entry : src ) { dst[ entry.first ] = entry.second; } 83 } 84 80 85 void printAssertionSet( const AssertionSet &, std::ostream &, int indent = 0 ); 81 86 void printOpenVarSet( const OpenVarSet &, std::ostream &, int indent = 0 ); … … 138 143 }; 139 144 145 //#define EXPENSIVE_ENV_VALIDATION 146 #ifdef EXPENSIVE_ENV_VALIDATION 140 147 class ValidateGuard; 148 #endif 141 149 142 150 class TypeEnvironment { … … 156 164 Bindings* bindings; 157 165 158 // for debugging 166 #ifdef EXPENSIVE_ENV_VALIDATION 167 /// for debugging 159 168 friend ValidateGuard; 160 169 const char* last_fn = "<none>"; 170 #endif 161 171 162 172 /// Merges the classes rooted at root1 and root2, returning a pair containing the root and … … 225 235 /// from the same initial environment. 226 236 /// Returns false if unsuccessful, but does NOT roll back partial changes 227 bool combine( const TypeEnvironment& o, const SymTab::Indexer& indexer ); 237 bool combine( const TypeEnvironment& o, OpenVarSet& openVars, 238 const SymTab::Indexer& indexer ); 228 239 229 240 void extractOpenVars( OpenVarSet &openVars ) const;
Note: See TracChangeset
for help on using the changeset viewer.