Changeset 3b56166 for src/SynTree/Expression.h
- Timestamp:
- Feb 10, 2020, 11:17:38 AM (6 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:
- 3966d9a, 41efd33
- Parents:
- 807a632 (diff), d231700 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
-
src/SynTree/Expression.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Expression.h
r807a632 r3b56166 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Andrew Beach12 // Last Modified On : Thr Aug 15 13:46:00201913 // Update Count : 5411 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Dec 11 16:50:19 2019 13 // Update Count : 60 14 14 // 15 15 … … 28 28 #include "Label.h" // for Label 29 29 #include "Mutator.h" // for Mutator 30 #include "Declaration.h" // for Aggregate 30 31 #include "SynTree.h" // for UniqueId 31 32 #include "Visitor.h" // for Visitor … … 229 230 public: 230 231 Expression * arg; 231 enum Target { 232 Coroutine, Thread, Monitor, NUMBER_OF_TARGETS 233 } target; 234 235 KeywordCastExpr( Expression * arg, Target target ); 232 struct Concrete { 233 std::string field; 234 std::string getter; 235 }; 236 AggregateDecl::Aggregate target; 237 Concrete concrete_target; 238 239 KeywordCastExpr( Expression * arg, AggregateDecl::Aggregate target ); 236 240 KeywordCastExpr( const KeywordCastExpr & other ); 237 241 virtual ~KeywordCastExpr(); 238 242 239 const std::string &targetString() const;243 const char * targetString() const; 240 244 241 245 virtual KeywordCastExpr * clone() const override { return new KeywordCastExpr( * this ); } … … 575 579 class AsmExpr : public Expression { 576 580 public: 577 Expression *inout;581 std::string inout; 578 582 Expression * constraint; 579 583 Expression * operand; 580 584 581 AsmExpr( Expression * inout, Expression * constraint, Expression * operand ) : inout( inout ), constraint( constraint ), operand( operand ) {}585 AsmExpr( const std::string * _inout, Expression * constraint, Expression * operand ) : inout( _inout ? *_inout : "" ), constraint( constraint ), operand( operand ) { delete _inout; } 582 586 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; } 587 virtual ~AsmExpr() { delete constraint; delete operand; }; 593 588 594 589 virtual AsmExpr * clone() const override { return new AsmExpr( * this ); }
Note:
See TracChangeset
for help on using the changeset viewer.