Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Common/PassVisitor.h

    r47498bd r712348a  
    44
    55#include <stack>
    6 
     6#include <type_traits>
     7
     8#include "Common/Stats.h"
    79#include "Common/utility.h"
    810
     
    153155        virtual void visit( ConstructorInit * ctorInit ) override final;
    154156
    155         virtual void visit( Subrange * subrange ) override final;
    156 
    157157        virtual void visit( Constant * constant ) override final;
    158158
     
    255255        virtual Initializer * mutate( ConstructorInit * ctorInit ) override final;
    256256
    257         virtual Subrange * mutate( Subrange * subrange ) override final;
    258 
    259257        virtual Constant * mutate( Constant * constant ) override final;
    260258
     
    300298
    301299
    302         TypeSubstitution **             get_env_ptr    () { return env_impl             ( pass, 0); }
     300        auto                                    get_env_ptr    () -> decltype(env_impl( pass, 0)) { return env_impl( pass, 0); }
    303301        std::list< Statement* > *       get_beforeStmts() { return stmtsToAddBefore_impl( pass, 0); }
    304302        std::list< Statement* > *       get_afterStmts () { return stmtsToAddAfter_impl ( pass, 0); }
     
    347345};
    348346
     347class WithConstTypeSubstitution {
     348protected:
     349        WithConstTypeSubstitution() = default;
     350        ~WithConstTypeSubstitution() = default;
     351
     352public:
     353        const TypeSubstitution * env = nullptr;
     354};
     355
    349356class WithStmtsToAdd {
    350357protected:
     
    426433};
    427434
     435#include "Common/Stats.h"
     436
     437extern struct PassVisitorStats {
     438        size_t depth = 0;
     439        Stats::Counters::MaxCounter<double> * max = nullptr;
     440        Stats::Counters::AverageCounter<double> * avg = nullptr;
     441} pass_visitor_stats;
     442
    428443#include "SynTree/TypeSubstitution.h"
    429444#include "PassVisitor.impl.h"
Note: See TracChangeset for help on using the changeset viewer.