Changeset 23a08aa0 for src/GenPoly/SpecializeNew.cpp
- Timestamp:
- Sep 19, 2022, 8:11:02 PM (3 years ago)
- Branches:
- ADT, ast-experimental, master, pthread-emulation
- Children:
- aa9f215
- Parents:
- ebf8ca5 (diff), ae1d151 (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/GenPoly/SpecializeNew.cpp
rebf8ca5 r23a08aa0 240 240 } 241 241 242 namespace { 243 struct TypeInstFixer : public ast::WithShortCircuiting { 244 std::map<const ast::TypeDecl *, std::pair<int, int>> typeMap; 245 246 void previsit(const ast::TypeDecl *) { visit_children = false; } 247 const ast::TypeInstType * postvisit(const ast::TypeInstType * typeInst) { 248 if (typeMap.count(typeInst->base)) { 249 ast::TypeInstType * newInst = mutate(typeInst); 250 auto const & pair = typeMap[typeInst->base]; 251 newInst->expr_id = pair.first; 252 newInst->formal_usage = pair.second; 253 return newInst; 254 } 255 return typeInst; 256 } 257 }; 258 } 242 struct TypeInstFixer final : public ast::WithShortCircuiting { 243 std::map<const ast::TypeDecl *, std::pair<int, int>> typeMap; 244 245 void previsit(const ast::TypeDecl *) { visit_children = false; } 246 const ast::TypeInstType * postvisit(const ast::TypeInstType * typeInst) { 247 if (typeMap.count(typeInst->base)) { 248 ast::TypeInstType * newInst = mutate(typeInst); 249 auto const & pair = typeMap[typeInst->base]; 250 newInst->expr_id = pair.first; 251 newInst->formal_usage = pair.second; 252 return newInst; 253 } 254 return typeInst; 255 } 256 }; 259 257 260 258 const ast::Expr * SpecializeCore::createThunkFunction(
Note:
See TracChangeset
for help on using the changeset viewer.