Changes in / [10e90cb:c5ac6d5]


Ignore:
Location:
src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/Box.cc

    r10e90cb rc5ac6d5  
    6262namespace GenPoly {
    6363        namespace {
     64                const std::list<Label> noLabels;
     65
    6466                FunctionType *makeAdapterType( FunctionType *adaptee, const TyVarMap &tyVars );
    6567
  • src/GenPoly/CopyParams.cc

    r10e90cb rc5ac6d5  
    4545
    4646        CopyParams::CopyParams() : namer( "_cp" ) {}
     47
     48        static const std::list< Label > noLabels;
    4749
    4850        void CopyParams::visit( FunctionDecl *funcDecl ) {
  • src/GenPoly/DeclMutator.cc

    r10e90cb rc5ac6d5  
    2020
    2121namespace GenPoly {
     22        namespace {
     23                const std::list<Label> noLabels;
     24        }
     25
    2226        DeclMutator::DeclMutator() : Mutator(), declsToAdd(1), declsToAddAfter(1) {}
    2327
    2428        DeclMutator::~DeclMutator() {}
    25 
     29       
    2630        void DeclMutator::mutateDeclarationList( std::list< Declaration* > &decls ) {
    2731                for ( std::list< Declaration* >::iterator decl = decls.begin(); ; ++decl ) {
     
    3034
    3135                        if ( decl == decls.end() ) break;
    32 
     36                       
    3337                        // run mutator on declaration
    3438                        *decl = maybeMutate( *decl, *this );
     
    5155                newBack->splice( newBack->end(), *back );
    5256                declsToAdd.pop_back();
    53 
     57               
    5458                back = declsToAddAfter.rbegin();
    5559                newBack = back + 1;
     
    6266                CompoundStmt *compoundStmt = dynamic_cast< CompoundStmt* >(stmt);
    6367                if ( compoundStmt ) return mutate( compoundStmt );
    64 
     68               
    6569                doBeginScope();
    66 
     70               
    6771                // run mutator on statement
    6872                stmt = maybeMutate( stmt, *this );
     
    98102                doBeginScope();
    99103
    100 
     104               
    101105                for ( std::list< Statement* >::iterator stmt = stmts.begin(); ; ++stmt ) {
    102106                        // add any new declarations after the previous statement
     
    108112
    109113                        if ( stmt == stmts.end() ) break;
    110 
     114                       
    111115                        // run mutator on statement
    112116                        *stmt = maybeMutate( *stmt, *this );
     
    119123                        declsToAdd.back().clear();
    120124                }
    121 
     125               
    122126                doEndScope();
    123127        }
     
    135139                return compoundStmt;
    136140        }
    137 
     141       
    138142        Statement* DeclMutator::mutate(IfStmt *ifStmt) {
    139143                ifStmt->set_condition( maybeMutate( ifStmt->get_condition(), *this ) );
     
    142146                return ifStmt;
    143147        }
    144 
     148       
    145149        Statement* DeclMutator::mutate(WhileStmt *whileStmt) {
    146150                whileStmt->set_condition( maybeMutate( whileStmt->get_condition(), *this ) );
     
    148152                return whileStmt;
    149153        }
    150 
     154       
    151155        Statement* DeclMutator::mutate(ForStmt *forStmt) {
    152156                mutateAll( forStmt->get_initialization(), *this );
     
    156160                return forStmt;
    157161        }
    158 
     162       
    159163        Statement* DeclMutator::mutate(SwitchStmt *switchStmt) {
    160164                switchStmt->set_condition( maybeMutate( switchStmt->get_condition(), *this ) );
     
    162166                return switchStmt;
    163167        }
    164 
     168       
    165169        Statement* DeclMutator::mutate(CaseStmt *caseStmt) {
    166170                caseStmt->set_condition( maybeMutate( caseStmt->get_condition(), *this ) );
     
    168172                return caseStmt;
    169173        }
    170 
     174       
    171175        Statement* DeclMutator::mutate(TryStmt *tryStmt) {
    172176                tryStmt->set_block( maybeMutate( tryStmt->get_block(), *this ) );
     
    175179                return tryStmt;
    176180        }
    177 
     181       
    178182        Statement* DeclMutator::mutate(CatchStmt *catchStmt) {
    179183                catchStmt->set_decl( maybeMutate( catchStmt->get_decl(), *this ) );
  • src/GenPoly/Lvalue.cc

    r10e90cb rc5ac6d5  
    3535namespace GenPoly {
    3636        namespace {
     37                const std::list<Label> noLabels;
     38
    3739                /// Replace uses of lvalue returns with appropriate pointers
    3840                class Pass1 : public Mutator {
  • src/InitTweak/FixGlobalInit.cc

    r10e90cb rc5ac6d5  
    2626
    2727namespace InitTweak {
     28        namespace {
     29                const std::list<Label> noLabels;
     30        }
     31
    2832        class GlobalFixer : public Visitor {
    2933          public:
  • src/InitTweak/GenInit.cc

    r10e90cb rc5ac6d5  
    1616#include <stack>
    1717#include <list>
    18 
     18#include "GenInit.h"
    1919#include "InitTweak.h"
    20 #include "GenInit.h"
    21 
    22 #include "Common/PassVisitor.h"
    23 
    24 #include "GenPoly/DeclMutator.h"
    25 #include "GenPoly/PolyMutator.h"
    26 #include "GenPoly/ScopedSet.h"
    27 
    28 #include "ResolvExpr/typeops.h"
    29 
    3020#include "SynTree/Declaration.h"
     21#include "SynTree/Type.h"
    3122#include "SynTree/Expression.h"
     23#include "SynTree/Statement.h"
    3224#include "SynTree/Initializer.h"
    3325#include "SynTree/Mutator.h"
    34 #include "SynTree/Statement.h"
    35 #include "SynTree/Type.h"
    36 
    3726#include "SymTab/Autogen.h"
    3827#include "SymTab/Mangler.h"
     28#include "GenPoly/PolyMutator.h"
     29#include "GenPoly/DeclMutator.h"
     30#include "GenPoly/ScopedSet.h"
     31#include "ResolvExpr/typeops.h"
    3932
    4033namespace InitTweak {
     34        namespace {
     35                const std::list<Label> noLabels;
     36                const std::list<Expression *> noDesignators;
     37        }
     38
    4139        class ReturnFixer final : public GenPoly::PolyMutator {
    4240          public:
  • src/SynTree/Attribute.h

    r10e90cb rc5ac6d5  
    4040};
    4141
    42 const std::list< Attribute * > noAttributes;
    43 
    4442#endif
    4543
Note: See TracChangeset for help on using the changeset viewer.