Changeset 25793da


Ignore:
Timestamp:
Sep 14, 2022, 4:36:56 PM (2 years ago)
Author:
Thierry Delisle <tdelisle@…>
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.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • src/Concurrency/WaitforNew.cpp

    r01865fb r25793da  
    101101namespace {
    102102
    103 class GenerateWaitForCore :
     103class GenerateWaitForCore final :
    104104                public ast::WithSymbolTable, public ast::WithConstTranslationUnit {
    105105        const ast::FunctionDecl * decl_waitfor    = nullptr;
  • src/ControlStruct/ExceptTranslateNew.cpp

    r01865fb r25793da  
    3232        }
    3333
    34 class TranslateThrowsCore : public ast::WithGuards {
     34class TranslateThrowsCore final : public ast::WithGuards {
    3535        const ast::ObjectDecl * terminateHandlerExcept;
    3636        enum Context { NoHandler, TerHandler, ResHandler } currentContext;
     
    136136
    137137
    138 class TryMutatorCore {
     138class TryMutatorCore final {
    139139        // The built in types used in translation.
    140140        const ast::StructDecl * except_decl;
  • src/GenPoly/InstantiateGenericNew.cpp

    r01865fb r25793da  
    8585
    8686/// Maps a key and a TypeList to a valuue. Also supports scoping.
    87 class InstantiationMap {
     87class InstantiationMap final {
    8888        /// Wraps value for a specific (AggregateDecl, TypeList) combination.
    8989        using Instantiation = std::pair<TypeList, ast::ptr<ast::AggregateDecl>>;
  • src/GenPoly/SpecializeNew.cpp

    r01865fb r25793da  
    240240}
    241241
    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 }
     242struct 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};
    259257
    260258const ast::Expr * SpecializeCore::createThunkFunction(
  • src/Tuples/TupleExpansionNew.cpp

    r01865fb r25793da  
    101101
    102102/// Replaces Tuple Assign & Index Expressions, and Tuple Types.
    103 struct TupleMainExpander :
     103struct TupleMainExpander final :
    104104                public ast::WithGuards,
    105105                public ast::WithVisitorRef<TupleMainExpander>,
     
    254254}
    255255
    256 struct TupleExprExpander {
     256struct TupleExprExpander final {
    257257        ast::Expr const * postvisit( ast::TupleExpr const * expr ) {
    258258                return replaceTupleExpr( expr->location,
  • src/Virtual/ExpandCasts.cc

    r01865fb r25793da  
    317317};
    318318
    319 struct ExpandCastsCore {
     319struct ExpandCastsCore final {
    320320        void previsit( ast::FunctionDecl const * decl );
    321321        void previsit( ast::StructDecl const * decl );
  • src/main.cc

    r01865fb r25793da  
    623623
    624624
    625 static const char optstring[] = ":c:ghlLmNnpdOAP:S:twW:D:";
     625static const char optstring[] = ":c:ghlLmNnpdP:S:twW:D:";
    626626
    627627enum { PreludeDir = 128 };
     
    637637        { "prototypes", no_argument, nullptr, 'p' },
    638638        { "deterministic-out", no_argument, nullptr, 'd' },
    639         { "old-ast", no_argument, nullptr, 'O'},
    640         { "new-ast", no_argument, nullptr, 'A'},
    641639        { "print", required_argument, nullptr, 'P' },
    642640        { "prelude-dir", required_argument, nullptr, PreludeDir },
     
    660658        "do not generate prelude prototypes => prelude not printed", // -p
    661659        "only print deterministic output",                  // -d
    662         "Use the old-ast",                                                                      // -O
    663         "Use the new-ast",                                                                      // -A
    664660        "print",                                                                                        // -P
    665661        "<directory> prelude directory for debug/nodebug",      // no flag
     
    770766                        deterministic_output = true;
    771767                        break;
    772                   case 'O':                                     // don't print non-deterministic output
    773                         useNewAST = false;
    774                         break;
    775                   case 'A':                                     // don't print non-deterministic output
    776                         useNewAST = true;
    777                         break;
    778768                  case 'P':                                                                             // print options
    779769                        for ( int i = 0;; i += 1 ) {
Note: See TracChangeset for help on using the changeset viewer.