Changeset 01aeade for translator/GenPoly/PolyMutator.h
- Timestamp:
- May 19, 2015, 7:57:09 AM (9 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
- Children:
- a08ba92
- Parents:
- 51587aa
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
translator/GenPoly/PolyMutator.h
r51587aa r01aeade 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // XXX.cc--7 // PolyMutator.h -- 8 8 // 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : 12 // Last Modified On : 13 // Update Count : 011 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue May 19 07:46:45 2015 13 // Update Count : 1 14 14 // 15 /*16 * This file is part of the Cforall project17 *18 * $Id: PolyMutator.h,v 1.8 2005/08/29 20:14:13 rcbilson Exp $19 *20 */21 15 22 #ifndef GENPOLY_POLYMUTATOR_H23 #define GENPOLY_POLYMUTATOR_H16 #ifndef _POLYMUTATOR_H 17 #define _POLYMUTATOR_H 24 18 25 19 #include <map> … … 34 28 35 29 namespace GenPoly { 30 class PolyMutator : public Mutator { 31 public: 32 PolyMutator(); 36 33 37 class PolyMutator : public Mutator 38 { 39 public: 40 PolyMutator(); 41 42 virtual CompoundStmt* mutate(CompoundStmt *compoundStmt); 43 virtual Statement* mutate(IfStmt *ifStmt); 44 virtual Statement* mutate(WhileStmt *whileStmt); 45 virtual Statement* mutate(ForStmt *forStmt); 46 virtual Statement* mutate(SwitchStmt *switchStmt); 47 virtual Statement* mutate(ChooseStmt *chooseStmt); 48 virtual Statement* mutate(CaseStmt *caseStmt); 49 virtual Statement* mutate(TryStmt *returnStmt); 50 virtual Statement* mutate(CatchStmt *catchStmt); 51 virtual Statement* mutate(ExprStmt *catchStmt); 52 virtual Statement* mutate(ReturnStmt *catchStmt); 34 virtual CompoundStmt* mutate(CompoundStmt *compoundStmt); 35 virtual Statement* mutate(IfStmt *ifStmt); 36 virtual Statement* mutate(WhileStmt *whileStmt); 37 virtual Statement* mutate(ForStmt *forStmt); 38 virtual Statement* mutate(SwitchStmt *switchStmt); 39 virtual Statement* mutate(ChooseStmt *chooseStmt); 40 virtual Statement* mutate(CaseStmt *caseStmt); 41 virtual Statement* mutate(TryStmt *returnStmt); 42 virtual Statement* mutate(CatchStmt *catchStmt); 43 virtual Statement* mutate(ExprStmt *catchStmt); 44 virtual Statement* mutate(ReturnStmt *catchStmt); 53 45 54 46 virtual Expression* mutate(UntypedExpr *untypedExpr); 55 47 56 // template method 57 virtual void doBeginScope() {} 58 virtual void doEndScope() {} 59 60 protected: 61 void mutateStatementList( std::list< Statement* > &statements ); 62 Statement* mutateStatement( Statement *stmt ); 63 Expression* mutateExpression( Expression *expr ); 64 static void makeTyVarMap( Type *type, TyVarMap &tyVarMap ); 48 // template method 49 virtual void doBeginScope() {} 50 virtual void doEndScope() {} 51 protected: 52 void mutateStatementList( std::list< Statement* > &statements ); 53 Statement* mutateStatement( Statement *stmt ); 54 Expression* mutateExpression( Expression *expr ); 55 static void makeTyVarMap( Type *type, TyVarMap &tyVarMap ); 65 56 66 TyVarMap scopeTyVars; 67 TypeSubstitution *env; 68 std::list< Statement* > stmtsToAdd; 69 std::list< Statement* > stmtsToAddAfter; 70 }; 71 57 TyVarMap scopeTyVars; 58 TypeSubstitution *env; 59 std::list< Statement* > stmtsToAdd; 60 std::list< Statement* > stmtsToAddAfter; 61 }; 72 62 } // namespace 73 63 74 #endif /* #ifndef GENPOLY_POLYMUTATOR_H */ 64 #endif // _POLYMUTATOR_H 65 75 66 // Local Variables: // 76 67 // tab-width: 4 //
Note: See TracChangeset
for help on using the changeset viewer.