Changes in / [10e90cb:c5ac6d5]
- Location:
- src
- Files:
-
- 7 edited
-
GenPoly/Box.cc (modified) (1 diff)
-
GenPoly/CopyParams.cc (modified) (1 diff)
-
GenPoly/DeclMutator.cc (modified) (14 diffs)
-
GenPoly/Lvalue.cc (modified) (1 diff)
-
InitTweak/FixGlobalInit.cc (modified) (1 diff)
-
InitTweak/GenInit.cc (modified) (1 diff)
-
SynTree/Attribute.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/Box.cc
r10e90cb rc5ac6d5 62 62 namespace GenPoly { 63 63 namespace { 64 const std::list<Label> noLabels; 65 64 66 FunctionType *makeAdapterType( FunctionType *adaptee, const TyVarMap &tyVars ); 65 67 -
src/GenPoly/CopyParams.cc
r10e90cb rc5ac6d5 45 45 46 46 CopyParams::CopyParams() : namer( "_cp" ) {} 47 48 static const std::list< Label > noLabels; 47 49 48 50 void CopyParams::visit( FunctionDecl *funcDecl ) { -
src/GenPoly/DeclMutator.cc
r10e90cb rc5ac6d5 20 20 21 21 namespace GenPoly { 22 namespace { 23 const std::list<Label> noLabels; 24 } 25 22 26 DeclMutator::DeclMutator() : Mutator(), declsToAdd(1), declsToAddAfter(1) {} 23 27 24 28 DeclMutator::~DeclMutator() {} 25 29 26 30 void DeclMutator::mutateDeclarationList( std::list< Declaration* > &decls ) { 27 31 for ( std::list< Declaration* >::iterator decl = decls.begin(); ; ++decl ) { … … 30 34 31 35 if ( decl == decls.end() ) break; 32 36 33 37 // run mutator on declaration 34 38 *decl = maybeMutate( *decl, *this ); … … 51 55 newBack->splice( newBack->end(), *back ); 52 56 declsToAdd.pop_back(); 53 57 54 58 back = declsToAddAfter.rbegin(); 55 59 newBack = back + 1; … … 62 66 CompoundStmt *compoundStmt = dynamic_cast< CompoundStmt* >(stmt); 63 67 if ( compoundStmt ) return mutate( compoundStmt ); 64 68 65 69 doBeginScope(); 66 70 67 71 // run mutator on statement 68 72 stmt = maybeMutate( stmt, *this ); … … 98 102 doBeginScope(); 99 103 100 104 101 105 for ( std::list< Statement* >::iterator stmt = stmts.begin(); ; ++stmt ) { 102 106 // add any new declarations after the previous statement … … 108 112 109 113 if ( stmt == stmts.end() ) break; 110 114 111 115 // run mutator on statement 112 116 *stmt = maybeMutate( *stmt, *this ); … … 119 123 declsToAdd.back().clear(); 120 124 } 121 125 122 126 doEndScope(); 123 127 } … … 135 139 return compoundStmt; 136 140 } 137 141 138 142 Statement* DeclMutator::mutate(IfStmt *ifStmt) { 139 143 ifStmt->set_condition( maybeMutate( ifStmt->get_condition(), *this ) ); … … 142 146 return ifStmt; 143 147 } 144 148 145 149 Statement* DeclMutator::mutate(WhileStmt *whileStmt) { 146 150 whileStmt->set_condition( maybeMutate( whileStmt->get_condition(), *this ) ); … … 148 152 return whileStmt; 149 153 } 150 154 151 155 Statement* DeclMutator::mutate(ForStmt *forStmt) { 152 156 mutateAll( forStmt->get_initialization(), *this ); … … 156 160 return forStmt; 157 161 } 158 162 159 163 Statement* DeclMutator::mutate(SwitchStmt *switchStmt) { 160 164 switchStmt->set_condition( maybeMutate( switchStmt->get_condition(), *this ) ); … … 162 166 return switchStmt; 163 167 } 164 168 165 169 Statement* DeclMutator::mutate(CaseStmt *caseStmt) { 166 170 caseStmt->set_condition( maybeMutate( caseStmt->get_condition(), *this ) ); … … 168 172 return caseStmt; 169 173 } 170 174 171 175 Statement* DeclMutator::mutate(TryStmt *tryStmt) { 172 176 tryStmt->set_block( maybeMutate( tryStmt->get_block(), *this ) ); … … 175 179 return tryStmt; 176 180 } 177 181 178 182 Statement* DeclMutator::mutate(CatchStmt *catchStmt) { 179 183 catchStmt->set_decl( maybeMutate( catchStmt->get_decl(), *this ) ); -
src/GenPoly/Lvalue.cc
r10e90cb rc5ac6d5 35 35 namespace GenPoly { 36 36 namespace { 37 const std::list<Label> noLabels; 38 37 39 /// Replace uses of lvalue returns with appropriate pointers 38 40 class Pass1 : public Mutator { -
src/InitTweak/FixGlobalInit.cc
r10e90cb rc5ac6d5 26 26 27 27 namespace InitTweak { 28 namespace { 29 const std::list<Label> noLabels; 30 } 31 28 32 class GlobalFixer : public Visitor { 29 33 public: -
src/InitTweak/GenInit.cc
r10e90cb rc5ac6d5 16 16 #include <stack> 17 17 #include <list> 18 18 #include "GenInit.h" 19 19 #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 30 20 #include "SynTree/Declaration.h" 21 #include "SynTree/Type.h" 31 22 #include "SynTree/Expression.h" 23 #include "SynTree/Statement.h" 32 24 #include "SynTree/Initializer.h" 33 25 #include "SynTree/Mutator.h" 34 #include "SynTree/Statement.h"35 #include "SynTree/Type.h"36 37 26 #include "SymTab/Autogen.h" 38 27 #include "SymTab/Mangler.h" 28 #include "GenPoly/PolyMutator.h" 29 #include "GenPoly/DeclMutator.h" 30 #include "GenPoly/ScopedSet.h" 31 #include "ResolvExpr/typeops.h" 39 32 40 33 namespace InitTweak { 34 namespace { 35 const std::list<Label> noLabels; 36 const std::list<Expression *> noDesignators; 37 } 38 41 39 class ReturnFixer final : public GenPoly::PolyMutator { 42 40 public: -
src/SynTree/Attribute.h
r10e90cb rc5ac6d5 40 40 }; 41 41 42 const std::list< Attribute * > noAttributes;43 44 42 #endif 45 43
Note:
See TracChangeset
for help on using the changeset viewer.