Changeset 28f3a19 for src/ControlStruct
- Timestamp:
- Jun 27, 2018, 3:28:41 PM (6 years ago)
- Branches:
- new-env, with_gc
- Children:
- b21c77a
- Parents:
- 0182bfa (diff), 63238a4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- src/ControlStruct
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ControlStruct/ForExprMutator.cc
r0182bfa r28f3a19 45 45 return hoist( forStmt, forStmt->initialization ); 46 46 } 47 Statement *ForExprMutator::postmutate( WhileStmt *whileStmt ) { 48 return hoist( whileStmt, whileStmt->initialization ); 49 } 47 50 } // namespace ControlStruct 48 51 -
src/ControlStruct/ForExprMutator.h
r0182bfa r28f3a19 18 18 class IfStmt; 19 19 class ForStmt; 20 class WhileStmt; 20 21 class Statement; 21 22 … … 25 26 Statement *postmutate( IfStmt * ); 26 27 Statement *postmutate( ForStmt * ); 28 Statement *postmutate( WhileStmt * ); 27 29 }; 28 30 } // namespace ControlStruct -
src/ControlStruct/Mutate.cc
r0182bfa r28f3a19 27 27 #include "SynTree/Visitor.h" // for acceptAll 28 28 29 using namespace std; 29 namespace ControlStruct { 30 void fixLabels( std::list< Declaration * > & translationUnit ) { 31 PassVisitor<LabelFixer> lfix; 32 acceptAll( translationUnit, lfix ); 33 } 30 34 31 namespace ControlStruct { 32 void mutate( std::list< Declaration * > translationUnit ) { 33 // hoist initialization out of for statements 35 void hoistControlDecls( std::list< Declaration * > & translationUnit ) { 34 36 PassVisitor<ForExprMutator> formut; 35 36 // normalizes label definitions and generates multi-level exit labels37 PassVisitor<LabelFixer> lfix;38 39 37 mutateAll( translationUnit, formut ); 40 acceptAll( translationUnit, lfix );41 38 } 42 39 } // namespace CodeGen -
src/ControlStruct/Mutate.h
r0182bfa r28f3a19 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // Mutate.h -- 7 // Mutate.h -- 8 8 // 9 9 // Author : Rodolfo G. Esteves … … 20 20 class Declaration; 21 21 22 /// Desugars Cforall control structures 22 23 namespace ControlStruct { 23 /// Desugars Cforall control structures 24 void mutate( std::list< Declaration* > translationUnit ); 24 /// normalizes label definitions and generates multi-level exit labels 25 void fixLabels( std::list< Declaration * > & translationUnit ); 26 27 /// hoist initialization out of for statements 28 void hoistControlDecls( std::list< Declaration * > & translationUnit ); 25 29 } // namespace ControlStruct 26 30
Note: See TracChangeset
for help on using the changeset viewer.