Changeset d60ccbf for src/SynTree/Expression.h
- Timestamp:
- Aug 12, 2015, 2:27:31 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, string, with_gc
- Children:
- f32c7f4
- Parents:
- e45215c (diff), e869d663 (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
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Expression.h
re45215c rd60ccbf 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun Jun 7 22:03:44201513 // Update Count : 412 // Last Modified On : Fri Jul 24 13:49:28 2015 13 // Update Count : 18 14 14 // 15 15 … … 30 30 31 31 std::list<Type *>& get_results() { return results; } 32 void add_result( Type *t);32 void add_result( Type *t ); 33 33 34 34 TypeSubstitution *get_env() const { return env; } … … 446 446 }; 447 447 448 // AsmExpr represents a GCC 'asm constraint operand' used in an asm statement: [output] "=f" (result) 449 class AsmExpr : public Expression { 450 public: 451 AsmExpr( Expression *inout, ConstantExpr *constraint, Expression *operand ) : inout( inout ), constraint( constraint ), operand( operand ) {} 452 virtual ~AsmExpr() { delete inout; delete constraint; delete operand; }; 453 454 Expression *get_inout() const { return inout; } 455 void set_inout( Expression *newValue ) { inout = newValue; } 456 457 ConstantExpr *get_constraint() const { return constraint; } 458 void set_constraint( ConstantExpr *newValue ) { constraint = newValue; } 459 460 Expression *get_operand() const { return operand; } 461 void set_operand( Expression *newValue ) { operand = newValue; } 462 463 virtual AsmExpr *clone() const { return new AsmExpr( *this ); } 464 virtual void accept( Visitor &v ) { v.visit( this ); } 465 virtual Expression *acceptMutator( Mutator &m ) { return m.mutate( this ); } 466 virtual void print( std::ostream &os, int indent = 0 ) const; 467 private: 468 // https://gcc.gnu.org/onlinedocs/gcc-4.7.1/gcc/Machine-Constraints.html#Machine-Constraints 469 Expression *inout; 470 ConstantExpr *constraint; 471 Expression *operand; 472 }; 473 448 474 // ValofExpr represents a GCC 'lambda expression' 449 475 class UntypedValofExpr : public Expression {
Note:
See TracChangeset
for help on using the changeset viewer.