Changeset db4ecc5


Ignore:
Timestamp:
Apr 14, 2016, 3:22:42 PM (9 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)

Location:
src
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/FixInit.cc

    r7eabc25 rdb4ecc5  
    1010// Created On       : Wed Jan 13 16:29:30 2016
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Thu Mar 31 13:54:58 2016
     12// Last Modified On : Thu Apr 14 15:19:11 2016
    1313// Update Count     : 30
    1414//
     
    1717#include <list>
    1818#include "RemoveInit.h"
     19#include "ResolvExpr/Resolver.h"
    1920#include "SynTree/Declaration.h"
    2021#include "SynTree/Type.h"
     
    2324#include "SynTree/Initializer.h"
    2425#include "SynTree/Mutator.h"
     26#include "SymTab/Indexer.h"
    2527#include "GenPoly/PolyMutator.h"
    2628
     
    3133        }
    3234
     35        class InsertImplicitCalls : public Mutator {
     36        public:
     37                /// wrap function application expressions as ImplicitCopyCtorExpr nodes
     38                /// so that it is easy to identify which function calls need their parameters
     39                /// to be copy constructed
     40                static void insert( std::list< Declaration * > & translationUnit );
     41
     42                virtual Expression * mutate( ApplicationExpr * appExpr );
     43        };
     44
     45        class ResolveCopyCtors : public SymTab::Indexer {
     46        public:
     47                /// generate temporary ObjectDecls for each argument and return value of each
     48                /// ImplicitCopyCtorExpr, generate/resolve copy construction expressions for each,
     49                /// and generate/resolve destructors for both arguments and return value temporaries
     50                static void resolveImplicitCalls( std::list< Declaration * > & translationUnit );
     51
     52                virtual void visit( ImplicitCopyCtorExpr * impCpCtorExpr );
     53
     54                /// create and resolve ctor/dtor expression: fname(var, [cpArg])
     55                ApplicationExpr * makeCtorDtor( const std::string & fname, ObjectDecl * var, Expression * cpArg = NULL );
     56        };
     57
    3358        class FixInit : public GenPoly::PolyMutator {
    3459          public:
     60                /// expand each object declaration to use its constructor after it is declared.
     61                /// insert destructor calls at the appropriate places
    3562                static void fixInitializers( std::list< Declaration * > &translationUnit );
    3663
    37                 virtual ObjectDecl * mutate( ObjectDecl *objDecl );
     64                virtual DeclarationWithType * mutate( ObjectDecl *objDecl );
    3865
    3966                virtual CompoundStmt * mutate( CompoundStmt * compoundStmt );
     
    4673        };
    4774
     75        class FixCopyCtors : public GenPoly::PolyMutator {
     76          public:
     77                /// expand ImplicitCopyCtorExpr nodes into the temporary declarations, copy constructors,
     78                /// call expression, and destructors
     79                static void fixCopyCtors( std::list< Declaration * > &translationUnit );
     80
     81                virtual Expression * mutate( ImplicitCopyCtorExpr * impCpCtorExpr );
     82
     83          private:
     84                // stack of list of statements - used to differentiate scopes
     85                std::list< std::list< Statement * > > dtorStmts;
     86        };
     87
    4888        void fix( std::list< Declaration * > & translationUnit ) {
     89                InsertImplicitCalls::insert( translationUnit );
     90                ResolveCopyCtors::resolveImplicitCalls( translationUnit );
    4991                FixInit::fixInitializers( translationUnit );
     92                // FixCopyCtors must happen after FixInit, so that destructors are placed correctly
     93                FixCopyCtors::fixCopyCtors( translationUnit );
     94        }
     95
     96        void InsertImplicitCalls::insert( std::list< Declaration * > & translationUnit ) {
     97                InsertImplicitCalls inserter;
     98                mutateAll( translationUnit, inserter );
     99        }
     100
     101        void ResolveCopyCtors::resolveImplicitCalls( std::list< Declaration * > & translationUnit ) {
     102                ResolveCopyCtors resolver;
     103                acceptAll( translationUnit, resolver );
    50104        }
    51105
     
    55109        }
    56110
    57         ObjectDecl *FixInit::mutate( ObjectDecl *objDecl ) {
     111        void FixCopyCtors::fixCopyCtors( std::list< Declaration * > & translationUnit ) {
     112                FixCopyCtors fixer;
     113                mutateAll( translationUnit, fixer );
     114        }
     115
     116        Expression * InsertImplicitCalls::mutate( ApplicationExpr * appExpr ) {
     117                if ( VariableExpr * function = dynamic_cast< VariableExpr * > ( appExpr->get_function() ) ) {
     118                        if ( function->get_var()->get_linkage() == LinkageSpec::Intrinsic ) {
     119                                // optimization: don't need to copy construct in order to call intrinsic functions
     120                                return appExpr;
     121                        } else if ( FunctionDecl * func = dynamic_cast< FunctionDecl * > ( function->get_var() ) ) {
     122                                // if (  )
     123                                // // optimization: don't need to copy construct in order to call a copy constructor
     124                                // return appExpr;
     125                        }
     126                }
     127                // wrap each function call so that it is easy to identify nodes that have to be copy constructed
     128                appExpr = dynamic_cast< ApplicationExpr * >( Mutator::mutate( appExpr ) );
     129                assert( appExpr );
     130                return new ImplicitCopyCtorExpr( appExpr );
     131        }
     132
     133        ApplicationExpr * ResolveCopyCtors::makeCtorDtor( const std::string & fname, ObjectDecl * var, Expression * cpArg ) {
     134                assert( var );
     135                UntypedExpr * untyped = new UntypedExpr( new NameExpr( fname ) );
     136                untyped->get_args().push_back( new AddressExpr( new VariableExpr( var ) ) );
     137                if (cpArg) untyped->get_args().push_back( cpArg );
     138
     139                // resolve copy constructor
     140                // should only be one alternative for copy ctor and dtor expressions, since
     141                // all arguments are fixed (VariableExpr and already resolved expression)
     142                ApplicationExpr * resolved = dynamic_cast< ApplicationExpr * >( ResolvExpr::findVoidExpression( untyped, *this ) );
     143
     144                assert( resolved );
     145                delete untyped;
     146                return resolved;
     147        }
     148
     149        void ResolveCopyCtors::visit( ImplicitCopyCtorExpr *impCpCtorExpr ) {
     150                static UniqueName tempNamer("_tmp_cp");
     151                static UniqueName retNamer("_tmp_cp_ret");
     152
     153                // resolve function call
     154                Expression * newExpr = ResolvExpr::findVoidExpression( impCpCtorExpr->get_callExpr(), *this );
     155                delete impCpCtorExpr->get_callExpr();
     156                ApplicationExpr * appExpr = dynamic_cast< ApplicationExpr * >( newExpr );
     157                assert( appExpr );
     158                impCpCtorExpr->set_callExpr( appExpr );
     159
     160                // take each argument and attempt to copy construct it.
     161                for ( Expression * & arg : appExpr->get_args() ) {
     162                        // xxx - need to handle tuple arguments
     163                        assert( ! arg->get_results().empty() );
     164                        ObjectDecl * tmp = new ObjectDecl( tempNamer.newName(), DeclarationNode::NoStorageClass, LinkageSpec::C, 0, arg->get_results().front()->clone(), 0 );
     165
     166                        // create and resolve copy constructor
     167                        ApplicationExpr * cpCtor = makeCtorDtor( "?{}", tmp, arg );
     168
     169                        // if the chosen constructor is intrinsic, the copy is unnecessary, so
     170                        // don't create the temporary and don't call the copy constructor
     171                        VariableExpr * function = dynamic_cast< VariableExpr * >( cpCtor->get_function() );
     172                        assert( function );
     173                        if ( function->get_var()->get_linkage() != LinkageSpec::Intrinsic ) {
     174                                // replace argument to function call with temporary
     175                                arg = new VariableExpr( tmp );
     176                                impCpCtorExpr->get_tempDecls().push_back( tmp );
     177                                impCpCtorExpr->get_copyCtors().push_back( cpCtor );
     178                                impCpCtorExpr->get_dtors().push_front( makeCtorDtor( "^?{}", tmp ) );
     179                        }
     180                }
     181
     182                // each return value from the call needs to be connected with an ObjectDecl
     183                // at the call site, which is initialized with the return value and is destructed
     184                // later
     185                // xxx - handle multiple return values
     186                for ( Type * result : appExpr->get_results() ) {
     187                        ObjectDecl * ret = new ObjectDecl( retNamer.newName(), DeclarationNode::NoStorageClass, LinkageSpec::C, 0, result->clone(), new SingleInit( impCpCtorExpr->get_callExpr() ) );
     188                        impCpCtorExpr->get_returnDecls().push_back( ret );
     189                        impCpCtorExpr->get_dtors().push_front( makeCtorDtor( "^?{}", ret ) );
     190                }
     191        }
     192
     193
     194        Expression * FixCopyCtors::mutate( ImplicitCopyCtorExpr * impCpCtorExpr ) {
     195                impCpCtorExpr = dynamic_cast< ImplicitCopyCtorExpr * >( Mutator::mutate( impCpCtorExpr ) );
     196                assert( impCpCtorExpr );
     197                std::cerr << "Running FixCopyCtors on implicit copy ctor..." << std::endl;
     198
     199                std::list< Expression * > & copyCtors = impCpCtorExpr->get_copyCtors();
     200                std::list< ObjectDecl * > & tempDecls = impCpCtorExpr->get_tempDecls();
     201                std::list< ObjectDecl * > & returnDecls = impCpCtorExpr->get_returnDecls();
     202                std::list< Expression * > & dtors = impCpCtorExpr->get_dtors();
     203
     204                // add all temporary declarations and their constructors
     205                for ( ObjectDecl * obj : tempDecls ) {
     206                        assert( ! copyCtors.empty() );
     207                        stmtsToAdd.push_back( new DeclStmt( noLabels, obj ) );
     208                        stmtsToAdd.push_back( new ExprStmt( noLabels, copyCtors.front() ) );
     209                        copyCtors.pop_front();
     210                }
     211
     212                // add destructors after current statement
     213                for ( Expression * dtor : dtors ) {
     214                        stmtsToAddAfter.push_back( new ExprStmt( noLabels, dtor ) );
     215                }
     216
     217                // xxx - update to work with multiple return values
     218                ObjectDecl * returnDecl = returnDecls.empty() ? NULL : returnDecls.front();
     219
     220                // xxx - some of these aren't necessary, and can be removed once this is stable
     221                copyCtors.clear();
     222                dtors.clear();
     223                tempDecls.clear();
     224                returnDecls.clear();
     225
     226                if ( returnDecl ) {
     227                        // call is currently attached to first returnDecl
     228                        stmtsToAdd.push_back( new DeclStmt( noLabels, returnDecl ) );
     229                        return new VariableExpr( returnDecl );
     230                } else {
     231                        // add call expression - if no return values, can call directly
     232                        return impCpCtorExpr->get_callExpr();
     233                }
     234        }
     235
     236        DeclarationWithType *FixInit::mutate( ObjectDecl *objDecl ) {
     237                // first recursively handle pieces of ObjectDecl so that they aren't missed by other visitors
     238                // when the init is removed from the ObjectDecl
     239                objDecl = dynamic_cast< ObjectDecl * >( Mutator::mutate( objDecl ) );
     240
    58241                if ( ConstructorInit * ctorInit = dynamic_cast< ConstructorInit * >( objDecl->get_init() ) ) {
    59242                        // a decision should have been made by the resolver, so ctor and init are not both non-NULL
     
    170353                        insertDtors( list->begin(), list->end(), back_inserter( stmtsToAdd ) );
    171354                }
    172                 return returnStmt;
     355                return Mutator::mutate( returnStmt );
    173356        }
    174357
     
    189372                                assert( false );
    190373                }
    191                 return branchStmt;
     374                return Mutator::mutate( branchStmt );
    192375        }
    193376
  • src/InitTweak/RemoveInit.cc

    r7eabc25 rdb4ecc5  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Mon Apr 11 17:28:43 2016
     12// Last Modified On : Thu Apr 14 15:09:36 2016
    1313// Update Count     : 166
    1414//
     
    4242
    4343                RemoveInit();
     44
    4445                virtual ObjectDecl * mutate( ObjectDecl *objDecl );
    4546                virtual DeclarationWithType * mutate( FunctionDecl *functionDecl );
     
    6364                CtorDtor() : inFunction( false ) {}
    6465
    65                 virtual ObjectDecl * mutate( ObjectDecl * );
     66                virtual DeclarationWithType * mutate( ObjectDecl * );
    6667                virtual DeclarationWithType * mutate( FunctionDecl *functionDecl );
    6768                virtual Declaration* mutate( StructDecl *aggregateDecl );
     
    7172                virtual TypeDecl* mutate( TypeDecl *typeDecl );
    7273                virtual Declaration* mutate( TypedefDecl *typeDecl );
     74
     75                virtual Type * mutate( FunctionType *funcType );
    7376
    7477          protected:
     
    187190        }
    188191
    189         ObjectDecl * CtorDtor::mutate( ObjectDecl * objDecl ) {
     192        DeclarationWithType * CtorDtor::mutate( ObjectDecl * objDecl ) {
    190193                // hands off if designated or if @=
    191194                if ( tryConstruct( objDecl ) ) {
     
    233236                        }
    234237                }
    235                 return objDecl;
     238                return Mutator::mutate( objDecl );
    236239        }
    237240
     
    254257        TypeDecl* CtorDtor::mutate( TypeDecl *typeDecl ) { return typeDecl; }
    255258        Declaration* CtorDtor::mutate( TypedefDecl *typeDecl ) { return typeDecl; }
     259        Type* CtorDtor::mutate( FunctionType *funcType ) { return funcType; }
    256260
    257261} // namespace InitTweak
  • src/ResolvExpr/Resolver.cc

    r7eabc25 rdb4ecc5  
    1010// Created On       : Sun May 17 12:17:01 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Mon Apr 04 17:11:54 2016
     12// Last Modified On : Thu Apr 14 11:18:12 2016
    1313// Update Count     : 203
    1414//
     
    6161          void resolveSingleAggrInit( Declaration *, InitIterator &, InitIterator & );
    6262          void fallbackInit( ConstructorInit * ctorInit );
    63 
    6463                std::list< Type * > functionReturn;
    6564                Type *initContext;
     
    8483        }
    8584
     85
    8686        namespace {
    8787                void finishExpr( Expression *expr, const TypeEnvironment &env ) {
     
    8989                        env.makeSubstitution( *expr->get_env() );
    9090                }
    91 
    92                 Expression *findVoidExpression( Expression *untyped, const SymTab::Indexer &indexer ) {
    93                         global_renamer.reset();
    94                         TypeEnvironment env;
    95                         Expression *newExpr = resolveInVoidContext( untyped, indexer, env );
    96                         finishExpr( newExpr, env );
    97                         return newExpr;
    98                 }
    99 
     91        } // namespace
     92
     93        Expression *findVoidExpression( Expression *untyped, const SymTab::Indexer &indexer ) {
     94                global_renamer.reset();
     95                TypeEnvironment env;
     96                Expression *newExpr = resolveInVoidContext( untyped, indexer, env );
     97                finishExpr( newExpr, env );
     98                return newExpr;
     99        }
     100
     101        namespace {
    100102                Expression *findSingleExpression( Expression *untyped, const SymTab::Indexer &indexer ) {
    101103                        TypeEnvironment env;
     
    484486
    485487        void Resolver::visit( ConstructorInit *ctorInit ) {
    486                 TypeEnvironment env;
    487488                try {
    488489                        maybeAccept( ctorInit->get_ctor(), *this );
  • src/ResolvExpr/Resolver.h

    r7eabc25 rdb4ecc5  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Resolver.h -- 
     7// Resolver.h --
    88//
    99// Author           : Richard C. Bilson
    1010// Created On       : Sun May 17 12:18:34 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun May 17 12:19:32 2015
     11// Last Modified By : Rob Schluntz
     12// Last Modified On : Thu Apr 14 15:06:53 2016
    1313// Update Count     : 2
    1414//
     
    2424        void resolve( std::list< Declaration * > translationUnit );
    2525        Expression *resolveInVoidContext( Expression *expr, const SymTab::Indexer &indexer );
     26        Expression *findVoidExpression( Expression *untyped, const SymTab::Indexer &indexer );
    2627} // namespace ResolvExpr
    2728
  • src/SynTree/Expression.cc

    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:29 2015
     12// Last Modified On : Thu Apr 14 13:02:28 2016
    1313// Update Count     : 34
    1414//
     
    7878
    7979VariableExpr::VariableExpr( DeclarationWithType *_var, Expression *_aname ) : Expression( _aname ), var( _var ) {
     80        assert( var );
     81        assert( var->get_type() );
    8082        add_result( var->get_type()->clone() );
    8183        for ( std::list< Type* >::iterator i = get_results().begin(); i != get_results().end(); ++i ) {
     
    432434}
    433435
     436
     437ImplicitCopyCtorExpr::ImplicitCopyCtorExpr( ApplicationExpr * callExpr ) : callExpr( callExpr ) {
     438        assert( callExpr );
     439        cloneAll( callExpr->get_results(), results );
     440}
     441
     442ImplicitCopyCtorExpr::ImplicitCopyCtorExpr( const ImplicitCopyCtorExpr & other ) : Expression( other ), callExpr( maybeClone( other.callExpr ) ) {
     443        cloneAll( other.results, results );
     444        cloneAll( other.copyCtors, copyCtors );
     445        cloneAll( other.tempDecls, tempDecls );
     446        cloneAll( other.returnDecls, returnDecls );
     447        cloneAll( other.dtors, dtors );
     448}
     449
     450ImplicitCopyCtorExpr::~ImplicitCopyCtorExpr() {
     451        delete callExpr;
     452        deleteAll( copyCtors );
     453        deleteAll( tempDecls );
     454        deleteAll( returnDecls );
     455        deleteAll( dtors );
     456}
     457
     458void ImplicitCopyCtorExpr::print( std::ostream &os, int indent ) const {
     459        os << std::string( indent, ' ' ) <<  "Implicit Copy Constructor Expression: " << std::endl;
     460        assert( callExpr );
     461        callExpr->print( os, indent + 2 );
     462        os << std::endl << std::string( indent, ' ' ) << "with temporaries:" << std::endl;
     463        printAll(tempDecls, os, indent+2);
     464        os << std::endl << std::string( indent, ' ' ) << "with copyCtors:" << std::endl;
     465        printAll(copyCtors, os, indent+2);
     466        Expression::print( os, indent );
     467}
     468
    434469UntypedValofExpr::UntypedValofExpr( const UntypedValofExpr & other ) : Expression( other ), body ( maybeClone( other.body ) ) {}
    435470
  • 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 {
  • src/SynTree/Initializer.h

    r7eabc25 rdb4ecc5  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Mon Apr 11 17:35:30 2016
     12// Last Modified On : Tue Apr 12 13:49:13 2016
    1313// Update Count     : 19
    1414//
     
    5858class SingleInit : public Initializer {
    5959  public:
    60         SingleInit( Expression *value, const std::list< Expression *> &designators, bool maybeConstructed = false );
     60        SingleInit( Expression *value, const std::list< Expression *> &designators = std::list< Expression * >(), bool maybeConstructed = false );
    6161        SingleInit( const SingleInit &other );
    6262        virtual ~SingleInit();
     
    8383  public:
    8484        ListInit( const std::list<Initializer*> &initializers,
    85                           const std::list<Expression *> &designators, bool maybeConstructed = false );
     85                          const std::list<Expression *> &designators = std::list< Expression * >(), bool maybeConstructed = false );
    8686        virtual ~ListInit();
    8787
  • src/SynTree/Mutator.cc

    r7eabc25 rdb4ecc5  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Mon Apr 04 17:14:20 2016
     12// Last Modified On : Fri Apr 08 14:01:47 2016
    1313// Update Count     : 15
    1414//
     
    331331}
    332332
     333Expression* Mutator::mutate( ImplicitCopyCtorExpr *impCpCtorExpr ) {
     334        impCpCtorExpr->set_callExpr( maybeMutate( impCpCtorExpr->get_callExpr(), *this ) );
     335        mutateAll( impCpCtorExpr->get_copyCtors(), *this );
     336        mutateAll( impCpCtorExpr->get_tempDecls(), *this );
     337        return impCpCtorExpr;
     338}
     339
    333340Expression *Mutator::mutate( UntypedValofExpr *valofExpr ) {
    334341        mutateAll( valofExpr->get_results(), *this );
  • src/SynTree/Mutator.h

    r7eabc25 rdb4ecc5  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Mon Apr 04 17:14:44 2016
     12// Last Modified On : Fri Apr 08 13:22:04 2016
    1313// Update Count     : 9
    1414//
     
    7575        virtual Expression* mutate( TypeExpr *typeExpr );
    7676        virtual Expression* mutate( AsmExpr *asmExpr );
     77        virtual Expression* mutate( ImplicitCopyCtorExpr *impCpCtorExpr );
    7778        virtual Expression* mutate( UntypedValofExpr *valofExpr );
    7879
  • src/SynTree/SynTree.h

    r7eabc25 rdb4ecc5  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Mon Apr 04 17:16:09 2016
     12// Last Modified On : Fri Apr 08 13:49:47 2016
    1313// Update Count     : 4
    1414//
     
    8080class TypeExpr;
    8181class AsmExpr;
     82class ImplicitCopyCtorExpr;
    8283class UntypedValofExpr;
    8384
  • src/SynTree/Visitor.cc

    r7eabc25 rdb4ecc5  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Mon Apr 04 17:16:25 2016
     12// Last Modified On : Fri Apr 08 13:53:21 2016
    1313// Update Count     : 18
    1414//
     
    279279}
    280280
     281void Visitor::visit( ImplicitCopyCtorExpr *impCpCtorExpr ) {
     282        maybeAccept( impCpCtorExpr->get_callExpr(), *this );
     283        acceptAll( impCpCtorExpr->get_copyCtors(), *this );
     284        acceptAll( impCpCtorExpr->get_tempDecls(), *this );
     285}
     286
    281287void Visitor::visit( UntypedValofExpr *valofExpr ) {
    282288        acceptAll( valofExpr->get_results(), *this );
  • src/SynTree/Visitor.h

    r7eabc25 rdb4ecc5  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Mon Apr 04 17:16:36 2016
     12// Last Modified On : Fri Apr 08 13:26:31 2016
    1313// Update Count     : 6
    1414//
     
    7575        virtual void visit( TypeExpr *typeExpr );
    7676        virtual void visit( AsmExpr *asmExpr );
     77        virtual void visit( ImplicitCopyCtorExpr *impCpCtorExpr );
    7778        virtual void visit( UntypedValofExpr *valofExpr );
    7879
Note: See TracChangeset for help on using the changeset viewer.