Changeset 51587aa for translator/Tuples/MultRet.h
- Timestamp:
- May 18, 2015, 11:45:33 PM (9 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
- Children:
- 01aeade
- Parents:
- 0dd3a2f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
translator/Tuples/MultRet.h
r0dd3a2f r51587aa 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 : Richard C. Bilson 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 1 16 #ifndef _MULTRET_H_ 2 17 #define _MULTRET_H_ … … 9 24 10 25 namespace Tuples { 11 class MVRMutator : public Mutator 12 { 13 typedef Mutator Parent; 26 class MVRMutator : public Mutator { 27 typedef Mutator Parent; 28 public: 29 MVRMutator(); 30 ~MVRMutator(); 14 31 15 public: 16 MVRMutator(); 17 ~MVRMutator(); 32 virtual Statement *mutate( ExprStmt *exprStmt ); 33 virtual Expression *mutate( ApplicationExpr *appExpr ); 18 34 19 virtual Statement *mutate( ExprStmt *exprStmt ); 20 virtual Expression *mutate( ApplicationExpr *appExpr ); 35 bool hasCode() const { return ( newCode != 0 ); } 36 CompoundStmt *getCode() const { return newCode; } 37 CompoundStmt *getVars() const { return newVars; } 21 38 22 bool hasCode() const { return ( newCode != 0 ); } 23 CompoundStmt *getCode() const { return newCode; } 24 CompoundStmt *getVars() const { return newVars; } 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; 25 46 26 bool hasResults() const { return (! results.empty()); } 27 std::list<Expression *> &get_results() { return results; } 28 29 private: 30 CompoundStmt *newVars; 31 CompoundStmt *newCode; 32 std::list<Expression *> argsToAdd; 33 std::list<Expression *> results; 34 35 static int curVal; 36 DeclStmt *newVar( DeclarationWithType * ); 37 void add_pending( Declaration * ); 38 }; 39 47 static int curVal; 48 DeclStmt *newVar( DeclarationWithType * ); 49 void add_pending( Declaration * ); 50 }; 40 51 } // namespace Tuples 41 52 53 #endif // _MULTRET_H_ 42 54 43 #endif // #ifndef _MULTRET_H_ 44 45 /* 46 Local Variables: 47 mode: c++ 48 End: 49 */ 55 // Local Variables: // 56 // tab-width: 4 // 57 // mode: c++ // 58 // compile-command: "make install" // 59 // End: //
Note: See TracChangeset
for help on using the changeset viewer.