Changeset 25793da
- Timestamp:
- Sep 14, 2022, 4:36:56 PM (2 years ago)
- Branches:
- ADT, ast-experimental, master, pthread-emulation
- Children:
- 95e5018
- Parents:
- 01865fb (diff), ce31925 (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. - Location:
- src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Concurrency/WaitforNew.cpp
r01865fb r25793da 101 101 namespace { 102 102 103 class GenerateWaitForCore :103 class GenerateWaitForCore final : 104 104 public ast::WithSymbolTable, public ast::WithConstTranslationUnit { 105 105 const ast::FunctionDecl * decl_waitfor = nullptr; -
src/ControlStruct/ExceptTranslateNew.cpp
r01865fb r25793da 32 32 } 33 33 34 class TranslateThrowsCore : public ast::WithGuards {34 class TranslateThrowsCore final : public ast::WithGuards { 35 35 const ast::ObjectDecl * terminateHandlerExcept; 36 36 enum Context { NoHandler, TerHandler, ResHandler } currentContext; … … 136 136 137 137 138 class TryMutatorCore {138 class TryMutatorCore final { 139 139 // The built in types used in translation. 140 140 const ast::StructDecl * except_decl; -
src/GenPoly/InstantiateGenericNew.cpp
r01865fb r25793da 85 85 86 86 /// Maps a key and a TypeList to a valuue. Also supports scoping. 87 class InstantiationMap {87 class InstantiationMap final { 88 88 /// Wraps value for a specific (AggregateDecl, TypeList) combination. 89 89 using Instantiation = std::pair<TypeList, ast::ptr<ast::AggregateDecl>>; -
src/GenPoly/SpecializeNew.cpp
r01865fb r25793da 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( -
src/Tuples/TupleExpansionNew.cpp
r01865fb r25793da 101 101 102 102 /// Replaces Tuple Assign & Index Expressions, and Tuple Types. 103 struct TupleMainExpander :103 struct TupleMainExpander final : 104 104 public ast::WithGuards, 105 105 public ast::WithVisitorRef<TupleMainExpander>, … … 254 254 } 255 255 256 struct TupleExprExpander {256 struct TupleExprExpander final { 257 257 ast::Expr const * postvisit( ast::TupleExpr const * expr ) { 258 258 return replaceTupleExpr( expr->location, -
src/Virtual/ExpandCasts.cc
r01865fb r25793da 317 317 }; 318 318 319 struct ExpandCastsCore {319 struct ExpandCastsCore final { 320 320 void previsit( ast::FunctionDecl const * decl ); 321 321 void previsit( ast::StructDecl const * decl ); -
src/main.cc
r01865fb r25793da 623 623 624 624 625 static const char optstring[] = ":c:ghlLmNnpd OAP:S:twW:D:";625 static const char optstring[] = ":c:ghlLmNnpdP:S:twW:D:"; 626 626 627 627 enum { PreludeDir = 128 }; … … 637 637 { "prototypes", no_argument, nullptr, 'p' }, 638 638 { "deterministic-out", no_argument, nullptr, 'd' }, 639 { "old-ast", no_argument, nullptr, 'O'},640 { "new-ast", no_argument, nullptr, 'A'},641 639 { "print", required_argument, nullptr, 'P' }, 642 640 { "prelude-dir", required_argument, nullptr, PreludeDir }, … … 660 658 "do not generate prelude prototypes => prelude not printed", // -p 661 659 "only print deterministic output", // -d 662 "Use the old-ast", // -O663 "Use the new-ast", // -A664 660 "print", // -P 665 661 "<directory> prelude directory for debug/nodebug", // no flag … … 770 766 deterministic_output = true; 771 767 break; 772 case 'O': // don't print non-deterministic output773 useNewAST = false;774 break;775 case 'A': // don't print non-deterministic output776 useNewAST = true;777 break;778 768 case 'P': // print options 779 769 for ( int i = 0;; i += 1 ) {
Note: See TracChangeset
for help on using the changeset viewer.