Changeset f43146e4


Ignore:
Timestamp:
Oct 27, 2023, 2:11:39 PM (14 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
0b5e780
Parents:
bef4f1a
Message:

Updated some stats/counters to trigger off the new AST. Others will just have to be updated/re-added later because the support code to run them is missing and I don't know what stats we might need in the future.

Location:
src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Pass.cpp

    rbef4f1a rf43146e4  
    1919
    2020PassVisitorStats pass_visitor_stats;
     21// TODO: There was a counter for every syntax node created.
     22//   This has not been translated to the new ast.
    2123// Stats::Counters::SimpleCounter * BaseSyntaxNode::new_nodes = nullptr;
    2224
  • src/main.cc

    rbef4f1a rf43146e4  
    9494        using namespace Stats::Counters;
    9595        {
    96                 static auto group = build<CounterGroup>( "Pass Visitor" );
     96                static auto group = build<CounterGroup>( "Pass Visitor Template" );
    9797                auto pass = build<CounterGroup>( name, group );
    98                 pass_visitor_stats.depth = 0;
    99                 pass_visitor_stats.avg = build<AverageCounter<double>>( "Average Depth", pass );
    100                 pass_visitor_stats.max = build<MaxCounter<double>>( "Max Depth", pass );
     98                ast::pass_visitor_stats.depth = 0;
     99                ast::pass_visitor_stats.avg = build<AverageCounter<double>>( "Average Depth", pass );
     100                ast::pass_visitor_stats.max = build<MaxCounter<double>>( "Max Depth", pass );
    101101        }
    102102        {
     
    319319
    320320                Stats::Time::StopBlock();
    321 
    322                 if (Stats::Counters::enabled) {
    323                         ast::pass_visitor_stats.avg = Stats::Counters::build<Stats::Counters::AverageCounter<double>>("Average Depth - New");
    324                         ast::pass_visitor_stats.max = Stats::Counters::build<Stats::Counters::MaxCounter<double>>("Max depth - New");
    325                 }
    326321
    327322                PASS( "Hoist Type Decls", Validate::hoistTypeDecls, transUnit );
Note: See TracChangeset for help on using the changeset viewer.