source: src/ControlStruct/Mutate.cc @ 948b0c8

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 948b0c8 was 0db6fc0, checked in by Rob Schluntz <rschlunt@…>, 7 years ago

convert several passes to PassVisitor?

  • Property mode set to 100644
File size: 1.2 KB
Line 
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//
7// Mutate.cc --
8//
9// Author           : Rodolfo G. Esteves
10// Created On       : Mon May 18 07:44:20 2015
11// Last Modified By : Peter A. Buhr
12// Last Modified On : Thu Aug  4 11:39:08 2016
13// Update Count     : 9
14//
15
16#include <algorithm>
17#include <iostream>
18#include <cassert>
19#include <list>
20
21#include "Mutate.h"
22#include "LabelFixer.h"
23#include "MLEMutator.h"
24#include "ForExprMutator.h"
25//#include "ExceptMutator.h"
26
27#include "Common/utility.h"
28#include "Common/PassVisitor.h"
29
30#include "SynTree/Visitor.h"
31
32using namespace std;
33
34namespace ControlStruct {
35        void mutate( std::list< Declaration * > translationUnit ) {
36                // hoist initialization out of for statements
37                PassVisitor<ForExprMutator> formut;
38
39                // normalizes label definitions and generates multi-level exit labels
40                LabelFixer lfix;
41
42                //ExceptMutator exc;
43
44                mutateAll( translationUnit, formut );
45                acceptAll( translationUnit, lfix );
46                //mutateAll( translationUnit, exc );
47        }
48} // namespace CodeGen
49
50// Local Variables: //
51// tab-width: 4 //
52// mode: c++ //
53// compile-command: "make install" //
54// End: //
Note: See TracBrowser for help on using the repository browser.