ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decaygc_noraiijacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change
on this file since 86242b0 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.5 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 | // MultRet.h -- |
---|
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 : Mon May 18 12:39:20 2015 |
---|
13 | // Update Count : 3 |
---|
14 | // |
---|
15 | |
---|
16 | #ifndef _MULTRET_H_ |
---|
17 | #define _MULTRET_H_ |
---|
18 | |
---|
19 | #include "SynTree/Mutator.h" |
---|
20 | #include "SynTree/Visitor.h" |
---|
21 | |
---|
22 | #include "SynTree/Expression.h" |
---|
23 | #include "SynTree/Statement.h" |
---|
24 | |
---|
25 | namespace Tuples { |
---|
26 | class MVRMutator : public Mutator { |
---|
27 | typedef Mutator Parent; |
---|
28 | public: |
---|
29 | MVRMutator(); |
---|
30 | ~MVRMutator(); |
---|
31 | |
---|
32 | virtual Statement *mutate( ExprStmt *exprStmt ); |
---|
33 | virtual Expression *mutate( ApplicationExpr *appExpr ); |
---|
34 | |
---|
35 | bool hasCode() const { return ( newCode != 0 ); } |
---|
36 | CompoundStmt *getCode() const { return newCode; } |
---|
37 | CompoundStmt *getVars() const { return newVars; } |
---|
38 | |
---|
39 | bool hasResults() const { return ( ! results.empty()); } |
---|
40 | std::list<Expression *> &get_results() { return results; } |
---|
41 | private: |
---|
42 | CompoundStmt *newVars; |
---|
43 | CompoundStmt *newCode; |
---|
44 | std::list<Expression *> argsToAdd; |
---|
45 | std::list<Expression *> results; |
---|
46 | |
---|
47 | static int curVal; |
---|
48 | DeclStmt *newVar( DeclarationWithType * ); |
---|
49 | void add_pending( Declaration * ); |
---|
50 | }; |
---|
51 | } // namespace Tuples |
---|
52 | |
---|
53 | #endif // _MULTRET_H_ |
---|
54 | |
---|
55 | // Local Variables: // |
---|
56 | // tab-width: 4 // |
---|
57 | // mode: c++ // |
---|
58 | // compile-command: "make install" // |
---|
59 | // End: // |
---|
Note: See
TracBrowser
for help on using the repository browser.