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
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//
[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
12// Last Modified On : Tue Jul 12 17:37:45 2016
13// Update Count     : 8
[51587aa]14//
[a08ba92]15
[51b7345]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
[d3b7937]29#include "Common/utility.h"
[51b7345]30
31#include "SynTree/Visitor.h"
32
33using namespace std;
34
35namespace ControlStruct {
[a08ba92]36        void mutate( std::list< Declaration * > translationUnit ) {
[145f1fc]37                // hoist initialization out of for statements
38                ForExprMutator formut;
[4162aea9]39
[4e06c1e]40                // normalizes label definitions and generates multi-level exit labels
[a08ba92]41                LabelFixer lfix;
[4162aea9]42
43                // expand case ranges and turn fallthru into a null statement
[4e06c1e]44                CaseRangeMutator ranges;
[4162aea9]45
[a08ba92]46                //ExceptMutator exc;
47                // LabelTypeChecker lbl;
48
[145f1fc]49                mutateAll( translationUnit, formut );
[982d63f]50                acceptAll( translationUnit, lfix );
[a08ba92]51                mutateAll( translationUnit, ranges );
52                //mutateAll( translationUnit, exc );
53                //acceptAll( translationUnit, lbl );
54        }
[51b7345]55} // namespace CodeGen
[a08ba92]56
[51587aa]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.