Changeset 2f86ddf for src/SynTree
- Timestamp:
- Sep 6, 2018, 10:51:37 AM (7 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 9b086ca
- Parents:
- ec42ff2e
- Location:
- src/SynTree
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Expression.cc
rec42ff2e r2f86ddf 538 538 assert( callExpr ); 539 539 assert( callExpr->result ); 540 set_result( callExpr-> get_result()->clone() );540 set_result( callExpr->result->clone() ); 541 541 } 542 542 543 543 ImplicitCopyCtorExpr::ImplicitCopyCtorExpr( const ImplicitCopyCtorExpr & other ) : Expression( other ), callExpr( maybeClone( other.callExpr ) ) { 544 cloneAll( other.tempDecls, tempDecls );545 cloneAll( other.returnDecls, returnDecls );546 cloneAll( other.dtors, dtors );547 544 } 548 545 … … 550 547 set_env( nullptr ); // ImplicitCopyCtorExpr does not take ownership of an environment 551 548 delete callExpr; 552 deleteAll( tempDecls );553 deleteAll( returnDecls );554 deleteAll( dtors );555 549 } 556 550 … … 558 552 os << "Implicit Copy Constructor Expression: " << std::endl << indent+1; 559 553 callExpr->print( os, indent+1 ); 560 os << std::endl << indent << "... with temporaries:" << std::endl;561 printAll( tempDecls, os, indent+1 );562 os << std::endl << indent << "... with return temporaries:" << std::endl;563 printAll( returnDecls, os, indent+1 );564 Expression::print( os, indent );565 554 } 566 555 -
src/SynTree/Expression.h
rec42ff2e r2f86ddf 591 591 class ImplicitCopyCtorExpr : public Expression { 592 592 public: 593 ApplicationExpr * callExpr; 594 std::list< ObjectDecl * > tempDecls; 595 std::list< ObjectDecl * > returnDecls; 596 std::list< Expression * > dtors; 593 ApplicationExpr * callExpr = nullptr; 597 594 598 595 ImplicitCopyCtorExpr( ApplicationExpr * callExpr ); 599 596 ImplicitCopyCtorExpr( const ImplicitCopyCtorExpr & other ); 600 597 virtual ~ImplicitCopyCtorExpr(); 601 602 ApplicationExpr * get_callExpr() const { return callExpr; }603 void set_callExpr( ApplicationExpr * newValue ) { callExpr = newValue; }604 605 std::list< ObjectDecl * > & get_tempDecls() { return tempDecls; }606 std::list< ObjectDecl * > & get_returnDecls() { return returnDecls; }607 std::list< Expression * > & get_dtors() { return dtors; }608 598 609 599 virtual ImplicitCopyCtorExpr * clone() const { return new ImplicitCopyCtorExpr( * this ); }
Note:
See TracChangeset
for help on using the changeset viewer.