source: src/GenPoly/PolyMutator.h @ 67fa9f9

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change on this file since 67fa9f9 was d9fa60a, checked in by Rob Schluntz <rschlunt@…>, 8 years ago

moved substituion into MemberExpr? constructor, change generated tuple structs to generic structs, tuples containing type variables almost works

  • Property mode set to 100644
File size: 1.9 KB
RevLine 
[51587aa]1//
2// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
3//
4// The contents of this file are covered under the licence agreement in the
5// file "LICENCE" distributed with Cforall.
6//
[1ba88a0]7// PolyMutator.h --
[51587aa]8//
9// Author           : Richard C. Bilson
10// Created On       : Mon May 18 07:44:20 2015
[4e06c1e]11// Last Modified By : Peter A. Buhr
12// Last Modified On : Tue Jul 12 17:39:41 2016
13// Update Count     : 6
[51587aa]14//
[51b7345]15
[01aeade]16#ifndef _POLYMUTATOR_H
17#define _POLYMUTATOR_H
[51b7345]18
19#include <map>
20#include <string>
21#include <list>
22
23#include "GenPoly.h"
24
25#include "SynTree/SynTree.h"
26#include "SynTree/Declaration.h"
27#include "SynTree/Mutator.h"
28
29namespace GenPoly {
[01aeade]30        class PolyMutator : public Mutator {
31          public:
[1ba88a0]32                typedef Mutator Parent;
33                using Parent::mutate;
34
[01aeade]35                PolyMutator();
[51b7345]36
[01aeade]37                virtual CompoundStmt* mutate(CompoundStmt *compoundStmt);
38                virtual Statement* mutate(IfStmt *ifStmt);
39                virtual Statement* mutate(WhileStmt *whileStmt);
40                virtual Statement* mutate(ForStmt *forStmt);
41                virtual Statement* mutate(SwitchStmt *switchStmt);
42                virtual Statement* mutate(CaseStmt *caseStmt);
43                virtual Statement* mutate(TryStmt *returnStmt);
44                virtual Statement* mutate(CatchStmt *catchStmt);
45                virtual Statement* mutate(ExprStmt *catchStmt);
46                virtual Statement* mutate(ReturnStmt *catchStmt);
[1ba88a0]47
[01aeade]48                virtual Expression* mutate(UntypedExpr *untypedExpr);
[d9fa60a]49                virtual Expression* mutate( StmtExpr *stmtExpr );
[09f800b]50
51                virtual Initializer* mutate(SingleInit *SingleInit);
52
[01aeade]53                // template method
54                virtual void doBeginScope() {}
55                virtual void doEndScope() {}
56          protected:
57                void mutateStatementList( std::list< Statement* > &statements );
58                Statement* mutateStatement( Statement *stmt );
59                Expression* mutateExpression( Expression *expr );
[1ba88a0]60
[01aeade]61                TyVarMap scopeTyVars;
62                TypeSubstitution *env;
63                std::list< Statement* > stmtsToAdd;
64                std::list< Statement* > stmtsToAddAfter;
65        };
[1ba88a0]66} // namespace
[51b7345]67
[01aeade]68#endif // _POLYMUTATOR_H
69
[51587aa]70// Local Variables: //
71// tab-width: 4 //
72// mode: c++ //
73// compile-command: "make install" //
74// End: //
Note: See TracBrowser for help on using the repository browser.