Changes in src/SynTree/Expression.cc [e04ef3a:bb8ea30]
- File:
-
- 1 edited
-
src/SynTree/Expression.cc (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Expression.cc
re04ef3a rbb8ea30 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Mon Jun 13 16:03:39 201613 // Update Count : 4 211 // Last Modified By : Rob Schluntz 12 // Last Modified On : Fri May 13 13:19:09 2016 13 // Update Count : 40 14 14 // 15 15 … … 32 32 Expression::Expression( Expression *_aname ) : env( 0 ), argName( _aname ) {} 33 33 34 Expression::Expression( const Expression &other ) : env( maybeClone( other.env ) ), argName( maybeClone( other.get_argName() ) ) , extension( other.extension ){34 Expression::Expression( const Expression &other ) : env( maybeClone( other.env ) ), argName( maybeClone( other.get_argName() ) ) { 35 35 cloneAll( other.results, results ); 36 36 } … … 60 60 argName->print( os, indent+2 ); 61 61 } // if 62 63 if ( extension ) {64 os << std::string( indent, ' ' ) << "with extension:";65 } // if66 62 } 67 63 … … 82 78 83 79 VariableExpr::VariableExpr( DeclarationWithType *_var, Expression *_aname ) : Expression( _aname ), var( _var ) { 84 assert( var );85 assert( var->get_type() );86 80 add_result( var->get_type()->clone() ); 87 81 for ( std::list< Type* >::iterator i = get_results().begin(); i != get_results().end(); ++i ) { … … 470 464 } 471 465 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 502 466 UntypedValofExpr::UntypedValofExpr( const UntypedValofExpr & other ) : Expression( other ), body ( maybeClone( other.body ) ) {} 503 467
Note:
See TracChangeset
for help on using the changeset viewer.