source: src/ControlStruct/Mutate.cc @ 00c32e9

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change on this file since 00c32e9 was 4e06c1e, checked in by Peter A. Buhr <pabuhr@…>, 8 years ago

changes for switch and choose statements

  • Property mode set to 100644
File size: 1.4 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 : Tue Jul 12 17:37:45 2016
13// Update Count     : 8
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 "CaseRangeMutator.h"
25#include "ForExprMutator.h"
26#include "LabelTypeChecker.h"
27//#include "ExceptMutator.h"
28
29#include "Common/utility.h"
30
31#include "SynTree/Visitor.h"
32
33using namespace std;
34
35namespace ControlStruct {
36        void mutate( std::list< Declaration * > translationUnit ) {
37                // hoist initialization out of for statements
38                ForExprMutator formut;
39
40                // normalizes label definitions and generates multi-level exit labels
41                LabelFixer lfix;
42
43                // expand case ranges and turn fallthru into a null statement
44                CaseRangeMutator ranges;
45
46                //ExceptMutator exc;
47                // LabelTypeChecker lbl;
48
49                mutateAll( translationUnit, formut );
50                acceptAll( translationUnit, lfix );
51                mutateAll( translationUnit, ranges );
52                //mutateAll( translationUnit, exc );
53                //acceptAll( translationUnit, lbl );
54        }
55} // namespace CodeGen
56
57// Local Variables: //
58// tab-width: 4 //
59// mode: c++ //
60// compile-command: "make install" //
61// End: //
Note: See TracBrowser for help on using the repository browser.