Changeset eb5962a for src/AST/Pass.impl.hpp
- Timestamp:
- Jun 21, 2022, 1:39:24 PM (22 months 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/Pass.impl.hpp
r1df492a reb5962a 182 182 183 183 // get the stmts/decls that will need to be spliced in 184 auto stmts_before = __pass::stmtsToAddBefore( core, 0 );185 auto stmts_after = __pass::stmtsToAddAfter ( core, 0 );186 auto decls_before = __pass::declsToAddBefore( core, 0 );187 auto decls_after = __pass::declsToAddAfter ( core, 0 );184 auto stmts_before = __pass::stmtsToAddBefore( core, 0 ); 185 auto stmts_after = __pass::stmtsToAddAfter ( core, 0 ); 186 auto decls_before = __pass::declsToAddBefore( core, 0 ); 187 auto decls_after = __pass::declsToAddAfter ( core, 0 ); 188 188 189 189 // These may be modified by subnode but most be restored once we exit this statemnet. … … 287 287 288 288 // get the stmts/decls that will need to be spliced in 289 auto stmts_before = __pass::stmtsToAddBefore( core, 0 );290 auto stmts_after = __pass::stmtsToAddAfter ( core, 0 );291 auto decls_before = __pass::declsToAddBefore( core, 0 );292 auto decls_after = __pass::declsToAddAfter ( core, 0 );289 auto stmts_before = __pass::stmtsToAddBefore( core, 0 ); 290 auto stmts_after = __pass::stmtsToAddAfter ( core, 0 ); 291 auto decls_before = __pass::declsToAddBefore( core, 0 ); 292 auto decls_after = __pass::declsToAddAfter ( core, 0 ); 293 293 294 294 // These may be modified by subnode but most be restored once we exit this statemnet. … … 317 317 assert(( empty( stmts_before ) && empty( stmts_after )) 318 318 || ( empty( decls_before ) && empty( decls_after )) ); 319 320 321 319 322 320 // Take all the statements which should have gone after, N/A for first iteration … … 2116 2114 if ( __visit_children() ) { 2117 2115 bool mutated = false; 2118 std::unordered_map< ast::TypeInstType::TypeEnvKey, ast::ptr< ast::Type > >new_map;2119 for ( const auto & p : node->type Env) {2116 ast::TypeSubstitution::TypeMap new_map; 2117 for ( const auto & p : node->typeMap ) { 2120 2118 guard_symtab guard { *this }; 2121 2119 auto new_node = p.second->accept( *this ); … … 2125 2123 if (mutated) { 2126 2124 auto new_node = __pass::mutate<core_t>( node ); 2127 new_node->type Env.swap( new_map );2125 new_node->typeMap.swap( new_map ); 2128 2126 node = new_node; 2129 2127 }
Note: See TracChangeset
for help on using the changeset viewer.