Changeset 0f9e4403 for src/SynTree/Expression.h
- Timestamp:
- Apr 15, 2016, 12:03:11 PM (9 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:
- 29ad0ac
- Parents:
- c5833e8 (diff), 37f0da8 (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
rc5833e8 r0f9e4403 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // Expression.h -- 7 // Expression.h -- 8 8 // 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Wed Dec 09 14:10:21 201513 // Update Count : 1911 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Apr 8 17:18:06 2016 13 // Update Count : 21 14 14 // 15 15 … … 155 155 }; 156 156 157 // xxx - this doesn't appear to actually be hooked in anywhere. We should use this instead of the "&&"" UntypedExpr hack 157 158 class LabelAddressExpr : public Expression { 158 159 public: 159 160 LabelAddressExpr( Expression *arg ); 160 LabelAddressExpr( const AddressExpr &other );161 LabelAddressExpr( const LabelAddressExpr &other ); 161 162 virtual ~LabelAddressExpr(); 162 163 … … 251 252 }; 252 253 253 /// ConstantExpr represents an expression that simply refers to the value of a constant 254 /// ConstantExpr represents an expression that simply refers to the value of a constant 254 255 class ConstantExpr : public Expression { 255 256 public: … … 359 360 Type *type; 360 361 DeclarationWithType *member; 362 }; 363 364 /// Expression representing a pack of field-offsets for a generic type 365 class OffsetPackExpr : public Expression { 366 public: 367 OffsetPackExpr( StructInstType *type_, Expression *aname_ = 0 ); 368 OffsetPackExpr( const OffsetPackExpr &other ); 369 virtual ~OffsetPackExpr(); 370 371 StructInstType *get_type() const { return type; } 372 void set_type( StructInstType *newValue ) { type = newValue; } 373 374 virtual OffsetPackExpr *clone() const { return new OffsetPackExpr( *this ); } 375 virtual void accept( Visitor &v ) { v.visit( this ); } 376 virtual Expression *acceptMutator( Mutator &m ) { return m.mutate( this ); } 377 378 virtual void print( std::ostream &os, int indent = 0 ) const; 379 380 private: 381 StructInstType *type; 361 382 }; 362 383 … … 515 536 public: 516 537 AsmExpr( Expression *inout, ConstantExpr *constraint, Expression *operand ) : inout( inout ), constraint( constraint ), operand( operand ) {} 538 AsmExpr( const AsmExpr & other ); 517 539 virtual ~AsmExpr() { delete inout; delete constraint; delete operand; }; 518 540 … … 541 563 public: 542 564 UntypedValofExpr( Statement *_body, Expression *_aname = 0 ) : Expression( _aname ), body ( _body ) {} 543 virtual ~UntypedValofExpr() {} 565 UntypedValofExpr( const UntypedValofExpr & other ); 566 virtual ~UntypedValofExpr(); 544 567 545 568 Expression *get_value(); … … 552 575 private: 553 576 Statement *body; 577 }; 578 579 /// CompoundLiteralExpr represents a C99 'compound literal' 580 class CompoundLiteralExpr : public Expression { 581 public: 582 CompoundLiteralExpr( Type * type, Initializer * initializer ); 583 CompoundLiteralExpr( const CompoundLiteralExpr &other ); 584 ~CompoundLiteralExpr(); 585 586 Type * get_type() const { return type; } 587 void set_type( Type * t ) { type = t; } 588 589 Initializer * get_initializer() const { return initializer; } 590 void set_initializer( Initializer * i ) { initializer = i; } 591 592 virtual CompoundLiteralExpr *clone() const { return new CompoundLiteralExpr( *this ); } 593 virtual void accept( Visitor &v ) { v.visit( this ); } 594 virtual Expression *acceptMutator( Mutator &m ) { return m.mutate( this ); } 595 virtual void print( std::ostream &os, int indent = 0 ) const; 596 private: 597 Type * type; 598 Initializer * initializer; 554 599 }; 555 600
Note:
See TracChangeset
for help on using the changeset viewer.