Changeset def751f for src/main.cc


Ignore:
Timestamp:
Jul 25, 2022, 3:17:25 PM (3 years ago)
Author:
JiadaL <j82liang@…>
Branches:
ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
Children:
b0d9ff7
Parents:
4e2befe3 (diff), ffec1bf (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' into qualifiedEnum

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main.cc

    r4e2befe3 rdef751f  
    1010// Created On       : Fri May 15 23:12:02 2015
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Tue Jul 12 12:02:00 2022
    13 // Update Count     : 675
     12// Last Modified On : Mon Jul 18 11:08:00 2022
     13// Update Count     : 676
    1414//
    1515
     
    330330                Stats::Time::StopBlock();
    331331
    332                 PASS( "Translate Exception Declarations", ControlStruct::translateExcept( translationUnit ) );
    333                 if ( exdeclp ) {
    334                         dump( translationUnit );
    335                         return EXIT_SUCCESS;
    336                 } // if
    337 
    338                 CodeTools::fillLocations( translationUnit );
    339 
    340332                if( useNewAST ) {
    341                         CodeTools::fillLocations( translationUnit );
    342 
    343333                        if (Stats::Counters::enabled) {
    344334                                ast::pass_visitor_stats.avg = Stats::Counters::build<Stats::Counters::AverageCounter<double>>("Average Depth - New");
     
    349339                        forceFillCodeLocations( transUnit );
    350340
    351                         // Must happen before auto-gen, or anything that examines ops.
     341                        PASS( "Translate Exception Declarations", ControlStruct::translateExcept( transUnit ) );
     342                        if ( exdeclp ) {
     343                                dump( move( transUnit ) );
     344                                return EXIT_SUCCESS;
     345                        }
     346
    352347                        PASS( "Verify Ctor, Dtor & Assign", Validate::verifyCtorDtorAssign( transUnit ) );
    353 
    354348                        PASS( "Hoist Type Decls", Validate::hoistTypeDecls( transUnit ) );
    355349                        // Hoist Type Decls pulls some declarations out of contexts where
     
    359353
    360354                        PASS( "Replace Typedefs", Validate::replaceTypedef( transUnit ) );
    361 
    362                         // Must happen before auto-gen.
    363355                        PASS( "Fix Return Types", Validate::fixReturnTypes( transUnit ) );
    364 
    365                         // Must happen before Link Reference to Types, it needs correct
    366                         // types for mangling.
    367356                        PASS( "Enum and Pointer Decay", Validate::decayEnumsAndPointers( transUnit ) );
    368357
    369                         // Must happen before auto-gen, because it uses the sized flag.
    370358                        PASS( "Link Reference To Types", Validate::linkReferenceToTypes( transUnit ) );
    371359
    372                         // Must happen after Link References To Types,
    373                         // because aggregate members are accessed.
    374360                        PASS( "Fix Qualified Types", Validate::fixQualifiedTypes( transUnit ) );
    375 
    376361                        PASS( "Hoist Struct", Validate::hoistStruct( transUnit ) );
    377362                        PASS( "Eliminate Typedef", Validate::eliminateTypedef( transUnit ) );
    378 
    379                         // Check as early as possible. Can't happen before
    380                         // LinkReferenceToType, observed failing when attempted
    381                         // before eliminateTypedef
    382363                        PASS( "Validate Generic Parameters", Validate::fillGenericParameters( transUnit ) );
    383 
    384364                        PASS( "Translate Dimensions", Validate::translateDimensionParameters( transUnit ) );
    385365                        PASS( "Check Function Returns", Validate::checkReturnStatements( transUnit ) );
    386 
    387                         // Must happen before Autogen.
    388366                        PASS( "Fix Return Statements", InitTweak::fixReturnStatements( transUnit ) );
    389 
    390367                        PASS( "Implement Concurrent Keywords", Concurrency::implementKeywords( transUnit ) );
    391 
    392                         // Must be after implement concurrent keywords; because uniqueIds
    393                         //   must be set on declaration before resolution.
    394                         // Must happen before autogen routines are added.
    395368                        PASS( "Forall Pointer Decay", Validate::decayForallPointers( transUnit ) );
    396 
    397                         // Must happen before autogen routines are added.
    398369                        PASS( "Hoist Control Declarations", ControlStruct::hoistControlDecls( transUnit ) );
    399370
    400                         // Must be after enum and pointer decay.
    401                         // Must be before compound literals.
    402371                        PASS( "Generate Autogen Routines", Validate::autogenerateRoutines( transUnit ) );
    403372
     
    470439                        PASS( "Translate Tries", ControlStruct::translateTries( transUnit ) );
    471440                        PASS( "Gen Waitfor", Concurrency::generateWaitFor( transUnit ) );
     441                        PASS( "Convert Specializations",  GenPoly::convertSpecializations( transUnit ) ); // needs to happen before tuple types are expanded
     442
    472443
    473444                        translationUnit = convert( move( transUnit ) );
    474445                } else {
     446                        PASS( "Translate Exception Declarations", ControlStruct::translateExcept( translationUnit ) );
     447                        if ( exdeclp ) {
     448                                dump( translationUnit );
     449                                return EXIT_SUCCESS;
     450                        } // if
     451
    475452                        // add the assignment statement after the initialization of a type parameter
    476453                        PASS( "Validate", SymTab::validate( translationUnit ) );
     
    538515                        PASS( "Translate Tries", ControlStruct::translateTries( translationUnit ) );
    539516                        PASS( "Gen Waitfor", Concurrency::generateWaitFor( translationUnit ) );
     517                        PASS( "Convert Specializations",  GenPoly::convertSpecializations( translationUnit ) ); // needs to happen before tuple types are expanded
     518
    540519                }
    541520
    542                 PASS( "Convert Specializations",  GenPoly::convertSpecializations( translationUnit ) ); // needs to happen before tuple types are expanded
     521
     522                // PASS( "Convert Specializations",  GenPoly::convertSpecializations( translationUnit ) ); // needs to happen before tuple types are expanded
    543523
    544524                PASS( "Expand Tuples", Tuples::expandTuples( translationUnit ) ); // xxx - is this the right place for this?
Note: See TracChangeset for help on using the changeset viewer.