Ignore:
Timestamp:
May 18, 2015, 11:45:33 PM (9 years ago)
Author:
Peter A. Buhr <pabuhr@…>
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
Message:

licencing: fourth groups of files

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
    116#ifndef _MULTRET_H_
    217#define _MULTRET_H_
     
    924
    1025namespace 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();
    1431
    15   public:
    16     MVRMutator();
    17     ~MVRMutator();
     32                virtual Statement  *mutate( ExprStmt        *exprStmt );
     33                virtual Expression *mutate( ApplicationExpr *appExpr  );
    1834
    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; }
    2138
    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;
    2546
    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        };
    4051} // namespace Tuples
    4152
     53#endif // _MULTRET_H_
    4254
    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.