Ignore:
Timestamp:
Apr 14, 2016, 3:22:42 PM (10 years ago)
Author:
Rob Schluntz <rschlunt@…>
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, with_gc
Children:
70a06f6
Parents:
7eabc25
Message:

add ImplicitCopyCtorExpr node, implicit copy constructors are inserted into the right places (but there is room for elision)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Expression.h

    r7eabc25 rdb4ecc5  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed Dec 09 14:10:21 2015
     12// Last Modified On : Thu Apr 14 12:04:58 2016
    1313// Update Count     : 19
    1414//
     
    2222#include "Mutator.h"
    2323#include "Constant.h"
     24#include "Common/UniqueName.h"
    2425
    2526/// Expression is the root type for all expressions
     
    539540};
    540541
     542/// ImplicitCopyCtorExpr represents the application of a function to a set of parameters,
     543/// along with a set of copy constructor calls, one for each argument.
     544class ImplicitCopyCtorExpr : public Expression {
     545public:
     546        ImplicitCopyCtorExpr( ApplicationExpr * callExpr );
     547        ImplicitCopyCtorExpr( const ImplicitCopyCtorExpr & other );
     548        virtual ~ImplicitCopyCtorExpr();
     549
     550        ApplicationExpr *get_callExpr() const { return callExpr; }
     551        void set_callExpr( ApplicationExpr *newValue ) { callExpr = newValue; }
     552
     553        std::list< Expression * > & get_copyCtors() { return copyCtors; }
     554        void set_copyCtors( std::list< Expression * > newValue ) { copyCtors = newValue; }
     555
     556        std::list< ObjectDecl * > & get_tempDecls() { return tempDecls; }
     557        void set_tempDecls( std::list< ObjectDecl * > newValue ) { tempDecls = newValue; }
     558
     559        std::list< ObjectDecl * > & get_returnDecls() { return returnDecls; }
     560        void set_returnDecls( std::list< ObjectDecl * > newValue ) { returnDecls = newValue; }
     561
     562        std::list< Expression * > & get_dtors() { return dtors; }
     563        void set_dtors( std::list< Expression * > newValue ) { dtors = newValue; }
     564
     565        virtual ImplicitCopyCtorExpr *clone() const { return new ImplicitCopyCtorExpr( *this ); }
     566        virtual void accept( Visitor &v ) { v.visit( this ); }
     567        virtual Expression *acceptMutator( Mutator &m ) { return m.mutate( this ); }
     568        virtual void print( std::ostream &os, int indent = 0 ) const;
     569  private:
     570        ApplicationExpr * callExpr;
     571        std::list< Expression * > copyCtors;
     572        std::list< ObjectDecl * > tempDecls;
     573        std::list< ObjectDecl * > returnDecls;
     574        std::list< Expression * > dtors;
     575};
     576
    541577/// ValofExpr represents a GCC 'lambda expression'
    542578class UntypedValofExpr : public Expression {
Note: See TracChangeset for help on using the changeset viewer.