Changeset 7fe4adbb


Ignore:
Timestamp:
Jul 3, 2024, 3:43:13 PM (3 days ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
793eb2f
Parents:
597f284
Message:

Added some code near the end of main to improve some internal statistics (about a tenth of all allocations seem to be missing a deallocation). Also some clean-up of passes in main.

Location:
src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/Validate/ImplementEnumFunc.hpp

    r597f284 r7fe4adbb  
    22
    33namespace ast {
    4     class TranslationUnit;
     4        class TranslationUnit;
    55}
    66
    77namespace Validate {
    8     void implementEnumFunc( ast::TranslationUnit & translationUnit );
     8
     9/// Auto-Generation of enumeration functions.
     10/// Happens before fixReturnStatements because it inserts "unfixed" returns.
     11void implementEnumFunc( ast::TranslationUnit & translationUnit );
     12
    913}
  • src/main.cpp

    r597f284 r7fe4adbb  
    326326                PASS( "Translate Enum Range Expression", ControlStruct::translateEnumRange, transUnit );
    327327                PASS( "Translate Dimensions", Validate::translateDimensionParameters, transUnit );
    328                 // Need to happen before fixing returns because implementEnumFunc has ReturnStmt
    329                
    330328                PASS( "Generate Enum Attributes Functions", Validate::implementEnumFunc, transUnit );
    331329                PASS( "Check Function Returns", Validate::checkReturnStatements, transUnit );
     
    337335
    338336                PASS( "Generate Autogen Routines", Validate::autogenerateRoutines, transUnit );
    339                
     337
    340338                PASS( "Implement Actors", Concurrency::implementActors, transUnit );
    341339                PASS( "Implement Virtual Destructors", Virtual::implementVirtDtors, transUnit );
     
    456454                return EXIT_FAILURE;
    457455        } // try
     456
     457        // This pseudo-pass is used to get more accurate heap statistics.
     458        NewPass("Clean-up");
     459        Stats::Time::StartBlock("Clean-Up");
     460        transUnit.global = ast::TranslationGlobal();
     461        transUnit.decls.clear();
     462        Stats::Time::StopBlock();
    458463
    459464        Stats::print();
Note: See TracChangeset for help on using the changeset viewer.