Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main.cc

    r9e23b446 r11df881  
    1010// Created On       : Fri May 15 23:12:02 2015
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Tue Jun  7 13:29:00 2022
    13 // Update Count     : 674
     12// Last Modified On : Mon Jul 18 11:08:00 2022
     13// Update Count     : 676
    1414//
    1515
     
    7878#include "Validate/CompoundLiteral.hpp"     // for handleCompoundLiterals
    7979#include "Validate/EliminateTypedef.hpp"    // for eliminateTypedef
     80#include "Validate/EnumAndPointerDecay.hpp" // for decayEnumsAndPointers
    8081#include "Validate/FindSpecialDecls.h"      // for findGlobalDecls
    8182#include "Validate/FixQualifiedTypes.hpp"   // for fixQualifiedTypes
     83#include "Validate/FixReturnTypes.hpp"      // for fixReturnTypes
    8284#include "Validate/ForallPointerDecay.hpp"  // for decayForallPointers
    8385#include "Validate/GenericParameter.hpp"    // for fillGenericParameters, tr...
    8486#include "Validate/HoistStruct.hpp"         // for hoistStruct
     87#include "Validate/HoistTypeDecls.hpp"      // for hoistTypeDecls
    8588#include "Validate/InitializerLength.hpp"   // for setLengthFromInitializer
    8689#include "Validate/LabelAddressFixer.hpp"   // for fixLabelAddresses
     90#include "Validate/LinkReferenceToTypes.hpp" // for linkReferenceToTypes
     91#include "Validate/ReplaceTypedef.hpp"      // for replaceTypedef
    8792#include "Validate/ReturnCheck.hpp"         // for checkReturnStatements
     93#include "Validate/VerifyCtorDtorAssign.hpp" // for verifyCtorDtorAssign
    8894#include "Virtual/ExpandCasts.h"            // for expandCasts
    8995
     
    324330                Stats::Time::StopBlock();
    325331
    326                 PASS( "Translate Exception Declarations", ControlStruct::translateExcept( translationUnit ) );
    327                 if ( exdeclp ) {
    328                         dump( translationUnit );
    329                         return EXIT_SUCCESS;
    330                 } // if
    331 
    332                 // add the assignment statement after the initialization of a type parameter
    333                 PASS( "Validate-A", SymTab::validate_A( translationUnit ) );
    334 
    335                 // Must happen before auto-gen, because it uses the sized flag.
    336                 PASS( "Link Reference To Types", SymTab::linkReferenceToTypes( translationUnit ) );
    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 after Link References To Types,
    352                         // because aggregate members are accessed.
     341                        PASS( "Translate Exception Declarations", ControlStruct::translateExcept( transUnit ) );
     342                        if ( exdeclp ) {
     343                                dump( move( transUnit ) );
     344                                return EXIT_SUCCESS;
     345                        }
     346
     347                        PASS( "Verify Ctor, Dtor & Assign", Validate::verifyCtorDtorAssign( transUnit ) );
     348                        PASS( "Hoist Type Decls", Validate::hoistTypeDecls( transUnit ) );
     349                        // Hoist Type Decls pulls some declarations out of contexts where
     350                        // locations are not tracked. Perhaps they should be, but for now
     351                        // the full fill solves it.
     352                        forceFillCodeLocations( transUnit );
     353
     354                        PASS( "Replace Typedefs", Validate::replaceTypedef( transUnit ) );
     355                        PASS( "Fix Return Types", Validate::fixReturnTypes( transUnit ) );
     356                        PASS( "Enum and Pointer Decay", Validate::decayEnumsAndPointers( transUnit ) );
     357
     358                        PASS( "Link Reference To Types", Validate::linkReferenceToTypes( transUnit ) );
     359
    353360                        PASS( "Fix Qualified Types", Validate::fixQualifiedTypes( transUnit ) );
    354 
    355361                        PASS( "Hoist Struct", Validate::hoistStruct( transUnit ) );
    356362                        PASS( "Eliminate Typedef", Validate::eliminateTypedef( transUnit ) );
    357 
    358                         // Check as early as possible. Can't happen before
    359                         // LinkReferenceToType, observed failing when attempted
    360                         // before eliminateTypedef
    361363                        PASS( "Validate Generic Parameters", Validate::fillGenericParameters( transUnit ) );
    362 
    363364                        PASS( "Translate Dimensions", Validate::translateDimensionParameters( transUnit ) );
    364365                        PASS( "Check Function Returns", Validate::checkReturnStatements( transUnit ) );
    365 
    366                         // Must happen before Autogen.
    367366                        PASS( "Fix Return Statements", InitTweak::fixReturnStatements( transUnit ) );
    368 
    369367                        PASS( "Implement Concurrent Keywords", Concurrency::implementKeywords( transUnit ) );
    370 
    371                         // Must be after implement concurrent keywords; because uniqueIds
    372                         //   must be set on declaration before resolution.
    373                         // Must happen before autogen routines are added.
    374368                        PASS( "Forall Pointer Decay", Validate::decayForallPointers( transUnit ) );
    375 
    376                         // Must happen before autogen routines are added.
    377369                        PASS( "Hoist Control Declarations", ControlStruct::hoistControlDecls( transUnit ) );
    378370
    379                         // Must be after enum and pointer decay.
    380                         // Must be before compound literals.
    381371                        PASS( "Generate Autogen Routines", Validate::autogenerateRoutines( transUnit ) );
    382372
     
    449439                        PASS( "Translate Tries", ControlStruct::translateTries( transUnit ) );
    450440                        PASS( "Gen Waitfor", Concurrency::generateWaitFor( transUnit ) );
    451                         PASS( "Convert Specializations",  GenPoly::convertSpecializations( transUnit ) ); // needs to happen before tuple types are expanded
    452 
    453441
    454442                        translationUnit = convert( move( transUnit ) );
    455443                } else {
    456                         PASS( "Validate-B", SymTab::validate_B( translationUnit ) );
    457                         PASS( "Validate-C", SymTab::validate_C( translationUnit ) );
    458                         PASS( "Validate-D", SymTab::validate_D( translationUnit ) );
    459                         PASS( "Validate-E", SymTab::validate_E( translationUnit ) );
    460                         PASS( "Validate-F", SymTab::validate_F( translationUnit ) );
     444                        PASS( "Translate Exception Declarations", ControlStruct::translateExcept( translationUnit ) );
     445                        if ( exdeclp ) {
     446                                dump( translationUnit );
     447                                return EXIT_SUCCESS;
     448                        } // if
     449
     450                        // add the assignment statement after the initialization of a type parameter
     451                        PASS( "Validate", SymTab::validate( translationUnit ) );
    461452
    462453                        if ( symtabp ) {
     
    522513                        PASS( "Translate Tries", ControlStruct::translateTries( translationUnit ) );
    523514                        PASS( "Gen Waitfor", Concurrency::generateWaitFor( translationUnit ) );
    524                         PASS( "Convert Specializations",  GenPoly::convertSpecializations( translationUnit ) ); // needs to happen before tuple types are expanded
    525 
    526515                }
    527516
    528 
    529                 // PASS( "Convert Specializations",  GenPoly::convertSpecializations( translationUnit ) ); // needs to happen before tuple types are expanded
     517                PASS( "Convert Specializations",  GenPoly::convertSpecializations( translationUnit ) ); // needs to happen before tuple types are expanded
    530518
    531519                PASS( "Expand Tuples", Tuples::expandTuples( translationUnit ) ); // xxx - is this the right place for this?
Note: See TracChangeset for help on using the changeset viewer.