source:
src/ControlStruct/Mutate.cc
@
f1bcd004
Last change on this file since f1bcd004 was be9288a, checked in by , 7 years ago | |
---|---|
|
|
File size: 1.5 KB |
Rev | Line | |
---|---|---|
[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 | // | |
[982d63f] | 7 | // Mutate.cc -- |
[51587aa] | 8 | // |
[843054c2] | 9 | // Author : Rodolfo G. Esteves |
[51587aa] | 10 | // Created On : Mon May 18 07:44:20 2015 |
[4e06c1e] | 11 | // Last Modified By : Peter A. Buhr |
[8688ce1] | 12 | // Last Modified On : Thu Aug 4 11:39:08 2016 |
13 | // Update Count : 9 | |
[51587aa] | 14 | // |
[a08ba92] | 15 | |
[d180746] | 16 | #include <iterator> // for back_inserter, inserter |
17 | #include <list> // for list | |
[51b7345] | 18 | |
[be9288a] | 19 | #include "Common/PassVisitor.h" // for mutateAll |
[d180746] | 20 | #include "Common/SemanticError.h" // for SemanticError |
21 | #include "ForExprMutator.h" // for ForExprMutator | |
22 | #include "LabelFixer.h" // for LabelFixer | |
[51b7345] | 23 | #include "Mutate.h" |
[d180746] | 24 | #include "SynTree/Declaration.h" // for Declaration |
25 | #include "SynTree/Mutator.h" // for mutateAll | |
[51b7345] | 26 | //#include "ExceptMutator.h" |
27 | ||
[d180746] | 28 | #include "Common/PassVisitor.h" // for PassVisitor |
29 | #include "SynTree/Visitor.h" // for acceptAll | |
[51b7345] | 30 | |
31 | using namespace std; | |
32 | ||
33 | namespace ControlStruct { | |
[a08ba92] | 34 | void mutate( std::list< Declaration * > translationUnit ) { |
[145f1fc] | 35 | // hoist initialization out of for statements |
[0db6fc0] | 36 | PassVisitor<ForExprMutator> formut; |
[4162aea9] | 37 | |
[4e06c1e] | 38 | // normalizes label definitions and generates multi-level exit labels |
[a08ba92] | 39 | LabelFixer lfix; |
[4162aea9] | 40 | |
[a08ba92] | 41 | //ExceptMutator exc; |
42 | ||
[145f1fc] | 43 | mutateAll( translationUnit, formut ); |
[982d63f] | 44 | acceptAll( translationUnit, lfix ); |
[a08ba92] | 45 | //mutateAll( translationUnit, exc ); |
46 | } | |
[51b7345] | 47 | } // namespace CodeGen |
[a08ba92] | 48 | |
[51587aa] | 49 | // Local Variables: // |
50 | // tab-width: 4 // | |
51 | // mode: c++ // | |
52 | // compile-command: "make install" // | |
53 | // End: // |
Note: See TracBrowser
for help on using the repository browser.