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 52c97dd was
843054c2,
checked in by Peter A. Buhr <pabuhr@…>, 9 years ago
|
licencing: seventh groups of files
|
-
Property mode set to
100644
|
File size:
1.6 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 | // |
---|
| 7 | // FunctionFixer.h -- |
---|
| 8 | // |
---|
[843054c2] | 9 | // Author : Rodolfo G. Esteves |
---|
[51587aa] | 10 | // Created On : Mon May 18 07:44:20 2015 |
---|
| 11 | // Last Modified By : Peter A. Buhr |
---|
| 12 | // Last Modified On : Mon May 18 23:31:58 2015 |
---|
| 13 | // Update Count : 3 |
---|
| 14 | // |
---|
| 15 | |
---|
| 16 | #ifndef _FUNCTION_FIXER_H_ |
---|
| 17 | #define _FUNCTION_FIXER_H_ |
---|
[51b7345] | 18 | |
---|
| 19 | #include "SynTree/Mutator.h" |
---|
| 20 | #include "SymTab/Indexer.h" |
---|
| 21 | |
---|
| 22 | #include "SynTree/Expression.h" |
---|
| 23 | |
---|
| 24 | namespace ArgTweak { |
---|
[51587aa] | 25 | class FunctionFixer : public Mutator { |
---|
| 26 | typedef Mutator Parent; |
---|
| 27 | public: |
---|
| 28 | FunctionFixer(SymTab::Indexer *ind = 0); |
---|
| 29 | ~FunctionFixer(); |
---|
| 30 | |
---|
| 31 | virtual DeclarationWithType *mutate( FunctionDecl *functionDecl ); |
---|
| 32 | virtual Expression *mutate( UntypedExpr *untypedExpr ) throw ( SemanticError ); |
---|
| 33 | private: |
---|
| 34 | class Matcher { |
---|
| 35 | typedef std::string key; |
---|
| 36 | typedef DeclarationWithType * pattern_type; |
---|
| 37 | typedef Expression * permutation_type; |
---|
| 38 | public: |
---|
| 39 | static key null_key; |
---|
| 40 | static permutation_type null_value; |
---|
| 41 | |
---|
| 42 | std::string extract_key( DeclarationWithType * ); |
---|
| 43 | std::string extract_key( Expression * ); |
---|
| 44 | |
---|
| 45 | bool operator()( DeclarationWithType *, Expression * ) { return true; } |
---|
| 46 | }; |
---|
| 47 | |
---|
| 48 | SymTab::Indexer *index; |
---|
| 49 | }; |
---|
| 50 | |
---|
| 51 | template < class L1, class L2, class Predicate > bool align( L1 &pattern, L2 &possible_permutation, Predicate pred ); |
---|
[51b7345] | 52 | } // namespace ArgTweak |
---|
| 53 | |
---|
[51587aa] | 54 | #endif // _FUNCTION_FIXER_H_ |
---|
[51b7345] | 55 | |
---|
[51587aa] | 56 | // Local Variables: // |
---|
| 57 | // tab-width: 4 // |
---|
| 58 | // mode: c++ // |
---|
| 59 | // compile-command: "make install" // |
---|
| 60 | // End: // |
---|
Note: See
TracBrowser
for help on using the repository browser.