Changeset db4ecc5 for src/SynTree/Expression.cc
- Timestamp:
- Apr 14, 2016, 3:22:42 PM (10 years ago)
- 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
- File:
-
- 1 edited
-
src/SynTree/Expression.cc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Expression.cc
r7eabc25 rdb4ecc5 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Rob Schluntz 12 // Last Modified On : Wed Dec 09 14:10:29 201512 // Last Modified On : Thu Apr 14 13:02:28 2016 13 13 // Update Count : 34 14 14 // … … 78 78 79 79 VariableExpr::VariableExpr( DeclarationWithType *_var, Expression *_aname ) : Expression( _aname ), var( _var ) { 80 assert( var ); 81 assert( var->get_type() ); 80 82 add_result( var->get_type()->clone() ); 81 83 for ( std::list< Type* >::iterator i = get_results().begin(); i != get_results().end(); ++i ) { … … 432 434 } 433 435 436 437 ImplicitCopyCtorExpr::ImplicitCopyCtorExpr( ApplicationExpr * callExpr ) : callExpr( callExpr ) { 438 assert( callExpr ); 439 cloneAll( callExpr->get_results(), results ); 440 } 441 442 ImplicitCopyCtorExpr::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 450 ImplicitCopyCtorExpr::~ImplicitCopyCtorExpr() { 451 delete callExpr; 452 deleteAll( copyCtors ); 453 deleteAll( tempDecls ); 454 deleteAll( returnDecls ); 455 deleteAll( dtors ); 456 } 457 458 void 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 434 469 UntypedValofExpr::UntypedValofExpr( const UntypedValofExpr & other ) : Expression( other ), body ( maybeClone( other.body ) ) {} 435 470
Note:
See TracChangeset
for help on using the changeset viewer.