Changeset 665f432 for src/SynTree
- Timestamp:
- Nov 20, 2019, 6:55:39 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 1a69a90, 9802f4c
- Parents:
- 57c764c
- Location:
- src/SynTree
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Expression.cc
r57c764c r665f432 527 527 } 528 528 529 AsmExpr::AsmExpr( const AsmExpr & other ) : Expression( other ), inout( maybeClone( other.inout )), constraint( maybeClone( other.constraint ) ), operand( maybeClone( other.operand ) ) {}529 AsmExpr::AsmExpr( const AsmExpr & other ) : Expression( other ), inout( other.inout ), constraint( maybeClone( other.constraint ) ), operand( maybeClone( other.operand ) ) {} 530 530 531 531 532 532 void AsmExpr::print( std::ostream & os, Indenter indent ) const { 533 533 os << "Asm Expression: " << std::endl; 534 if ( inout ) inout->print( os, indent+1 );534 if ( !inout.empty() ) os << "[" << inout << "] "; 535 535 if ( constraint ) constraint->print( os, indent+1 ); 536 536 if ( operand ) operand->print( os, indent+1 ); -
src/SynTree/Expression.h
r57c764c r665f432 575 575 class AsmExpr : public Expression { 576 576 public: 577 Expression *inout;577 std::string inout; 578 578 Expression * constraint; 579 579 Expression * operand; 580 580 581 AsmExpr( Expression * inout, Expression * constraint, Expression * operand ) : inout( inout ), constraint( constraint ), operand( operand ) {}581 AsmExpr( const std::string * _inout, Expression * constraint, Expression * operand ) : inout( _inout ? *_inout : "" ), constraint( constraint ), operand( operand ) { delete _inout; } 582 582 AsmExpr( const AsmExpr & other ); 583 virtual ~AsmExpr() { delete inout; delete constraint; delete operand; }; 584 585 Expression * get_inout() const { return inout; } 586 void set_inout( Expression * newValue ) { inout = newValue; } 587 588 Expression * get_constraint() const { return constraint; } 589 void set_constraint( Expression * newValue ) { constraint = newValue; } 590 591 Expression * get_operand() const { return operand; } 592 void set_operand( Expression * newValue ) { operand = newValue; } 583 virtual ~AsmExpr() { delete constraint; delete operand; }; 593 584 594 585 virtual AsmExpr * clone() const override { return new AsmExpr( * this ); }
Note: See TracChangeset
for help on using the changeset viewer.