Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Expression.cc

    re04ef3a rbb8ea30  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Jun 13 16:03:39 2016
    13 // Update Count     : 42
     11// Last Modified By : Rob Schluntz
     12// Last Modified On : Fri May 13 13:19:09 2016
     13// Update Count     : 40
    1414//
    1515
     
    3232Expression::Expression( Expression *_aname ) : env( 0 ), argName( _aname ) {}
    3333
    34 Expression::Expression( const Expression &other ) : env( maybeClone( other.env ) ), argName( maybeClone( other.get_argName() ) ), extension( other.extension ) {
     34Expression::Expression( const Expression &other ) : env( maybeClone( other.env ) ), argName( maybeClone( other.get_argName() ) ) {
    3535        cloneAll( other.results, results );
    3636}
     
    6060                argName->print( os, indent+2 );
    6161        } // if
    62 
    63         if ( extension ) {
    64                 os << std::string( indent, ' ' ) << "with extension:";
    65         } // if
    6662}
    6763
     
    8278
    8379VariableExpr::VariableExpr( DeclarationWithType *_var, Expression *_aname ) : Expression( _aname ), var( _var ) {
    84         assert( var );
    85         assert( var->get_type() );
    8680        add_result( var->get_type()->clone() );
    8781        for ( std::list< Type* >::iterator i = get_results().begin(); i != get_results().end(); ++i ) {
     
    470464}
    471465
    472 
    473 ImplicitCopyCtorExpr::ImplicitCopyCtorExpr( ApplicationExpr * callExpr ) : callExpr( callExpr ) {
    474         assert( callExpr );
    475         cloneAll( callExpr->get_results(), results );
    476 }
    477 
    478 ImplicitCopyCtorExpr::ImplicitCopyCtorExpr( const ImplicitCopyCtorExpr & other ) : Expression( other ), callExpr( maybeClone( other.callExpr ) ) {
    479         cloneAll( other.tempDecls, tempDecls );
    480         cloneAll( other.returnDecls, returnDecls );
    481         cloneAll( other.dtors, dtors );
    482 }
    483 
    484 ImplicitCopyCtorExpr::~ImplicitCopyCtorExpr() {
    485         delete callExpr;
    486         deleteAll( tempDecls );
    487         deleteAll( returnDecls );
    488         deleteAll( dtors );
    489 }
    490 
    491 void ImplicitCopyCtorExpr::print( std::ostream &os, int indent ) const {
    492         os << std::string( indent, ' ' ) <<  "Implicit Copy Constructor Expression: " << std::endl;
    493         assert( callExpr );
    494         callExpr->print( os, indent + 2 );
    495         os << std::endl << std::string( indent, ' ' ) << "with temporaries:" << std::endl;
    496         printAll(tempDecls, os, indent+2);
    497         os << std::endl << std::string( indent, ' ' ) << "with return temporaries:" << std::endl;
    498         printAll(returnDecls, os, indent+2);
    499         Expression::print( os, indent );
    500 }
    501 
    502466UntypedValofExpr::UntypedValofExpr( const UntypedValofExpr & other ) : Expression( other ), body ( maybeClone( other.body ) ) {}
    503467
Note: See TracChangeset for help on using the changeset viewer.