Changeset 68f9c43 for src/SynTree/Expression.h
- Timestamp:
- Mar 16, 2018, 5:15:02 PM (6 years ago)
- Branches:
- new-env, with_gc
- Children:
- 8d7bef2
- Parents:
- 6171841
- git-author:
- Aaron Moss <a3moss@…> (03/16/18 17:04:24)
- git-committer:
- Aaron Moss <a3moss@…> (03/16/18 17:15:02)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Expression.h
r6171841 r68f9c43 41 41 ParamEntry( UniqueId decl, Type * actualType, Type * formalType, Expression* expr ): decl( decl ), actualType( actualType ), formalType( formalType ), expr( expr ), inferParams( new InferredParams ) {} 42 42 ParamEntry( const ParamEntry & other ); 43 ~ParamEntry();44 43 ParamEntry & operator=( const ParamEntry & other ); 45 44 … … 53 52 /// Expression is the root type for all expressions 54 53 class Expression : public BaseSyntaxNode { 54 protected: 55 virtual ~Expression(); 56 55 57 public: 56 58 Type * result; … … 61 63 Expression(); 62 64 Expression( const Expression & other ); 63 virtual ~Expression();64 65 65 66 Type *& get_result() { return result; } … … 89 90 ApplicationExpr( Expression * function, const std::list<Expression *> & args = std::list< Expression * >() ); 90 91 ApplicationExpr( const ApplicationExpr & other ); 91 virtual ~ApplicationExpr();92 92 93 93 Expression * get_function() const { return function; } … … 111 111 UntypedExpr( Expression * function, const std::list<Expression *> & args = std::list< Expression * >() ); 112 112 UntypedExpr( const UntypedExpr & other ); 113 virtual ~UntypedExpr();114 113 115 114 Expression * get_function() const { return function; } … … 136 135 NameExpr( std::string name ); 137 136 NameExpr( const NameExpr & other ); 138 virtual ~NameExpr();139 137 140 138 const std::string & get_name() const { return name; } … … 157 155 AddressExpr( Expression * arg ); 158 156 AddressExpr( const AddressExpr & other ); 159 virtual ~AddressExpr();160 157 161 158 Expression * get_arg() const { return arg; } … … 176 173 LabelAddressExpr( const Label &arg ); 177 174 LabelAddressExpr( const LabelAddressExpr & other ); 178 virtual ~LabelAddressExpr();179 175 180 176 virtual LabelAddressExpr * clone() const { return new LabelAddressExpr( * this ); } … … 192 188 CastExpr( Expression * arg, Type * toType ); 193 189 CastExpr( const CastExpr & other ); 194 virtual ~CastExpr();195 190 196 191 Expression * get_arg() const { return arg; } … … 210 205 VirtualCastExpr( Expression * arg, Type * toType ); 211 206 VirtualCastExpr( const VirtualCastExpr & other ); 212 virtual ~VirtualCastExpr();213 207 214 208 Expression * get_arg() const { return arg; } … … 229 223 UntypedMemberExpr( Expression * member, Expression * aggregate ); 230 224 UntypedMemberExpr( const UntypedMemberExpr & other ); 231 virtual ~UntypedMemberExpr();232 225 233 226 Expression * get_member() const { return member; } … … 251 244 MemberExpr( DeclarationWithType * member, Expression * aggregate ); 252 245 MemberExpr( const MemberExpr & other ); 253 virtual ~MemberExpr();254 246 255 247 DeclarationWithType * get_member() const { return member; } … … 272 264 VariableExpr( DeclarationWithType * var ); 273 265 VariableExpr( const VariableExpr & other ); 274 virtual ~VariableExpr();275 266 276 267 DeclarationWithType * get_var() const { return var; } … … 292 283 ConstantExpr( Constant constant ); 293 284 ConstantExpr( const ConstantExpr & other ); 294 virtual ~ConstantExpr();295 285 296 286 Constant * get_constant() { return & constant; } … … 316 306 SizeofExpr( const SizeofExpr & other ); 317 307 SizeofExpr( Type * type ); 318 virtual ~SizeofExpr();319 308 320 309 Expression * get_expr() const { return expr; } … … 341 330 AlignofExpr( const AlignofExpr & other ); 342 331 AlignofExpr( Type * type ); 343 virtual ~AlignofExpr();344 332 345 333 Expression * get_expr() const { return expr; } … … 364 352 UntypedOffsetofExpr( Type * type, const std::string & member ); 365 353 UntypedOffsetofExpr( const UntypedOffsetofExpr & other ); 366 virtual ~UntypedOffsetofExpr();367 354 368 355 std::string get_member() const { return member; } … … 385 372 OffsetofExpr( Type * type, DeclarationWithType * member ); 386 373 OffsetofExpr( const OffsetofExpr & other ); 387 virtual ~OffsetofExpr();388 374 389 375 Type * get_type() const { return type; } … … 405 391 OffsetPackExpr( StructInstType * type ); 406 392 OffsetPackExpr( const OffsetPackExpr & other ); 407 virtual ~OffsetPackExpr();408 393 409 394 StructInstType * get_type() const { return type; } … … 427 412 AttrExpr( const AttrExpr & other ); 428 413 AttrExpr( Expression * attr, Type * type ); 429 virtual ~AttrExpr();430 414 431 415 Expression * get_attr() const { return attr; } … … 452 436 LogicalExpr( Expression * arg1, Expression * arg2, bool andp = true ); 453 437 LogicalExpr( const LogicalExpr & other ); 454 virtual ~LogicalExpr();455 438 456 439 bool get_isAnd() const { return isAnd; } … … 478 461 ConditionalExpr( Expression * arg1, Expression * arg2, Expression * arg3 ); 479 462 ConditionalExpr( const ConditionalExpr & other ); 480 virtual ~ConditionalExpr();481 463 482 464 Expression * get_arg1() const { return arg1; } … … 501 483 CommaExpr( Expression * arg1, Expression * arg2 ); 502 484 CommaExpr( const CommaExpr & other ); 503 virtual ~CommaExpr();504 485 505 486 Expression * get_arg1() const { return arg1; } … … 521 502 TypeExpr( Type * type ); 522 503 TypeExpr( const TypeExpr & other ); 523 virtual ~TypeExpr();524 504 525 505 Type * get_type() const { return type; } … … 541 521 AsmExpr( Expression * inout, Expression * constraint, Expression * operand ) : inout( inout ), constraint( constraint ), operand( operand ) {} 542 522 AsmExpr( const AsmExpr & other ); 543 virtual ~AsmExpr() { delete inout; delete constraint; delete operand; };544 523 545 524 Expression * get_inout() const { return inout; } … … 563 542 /// along with a set of copy constructor calls, one for each argument. 564 543 class ImplicitCopyCtorExpr : public Expression { 544 protected: 545 virtual ~ImplicitCopyCtorExpr(); 546 565 547 public: 566 548 ApplicationExpr * callExpr; … … 571 553 ImplicitCopyCtorExpr( ApplicationExpr * callExpr ); 572 554 ImplicitCopyCtorExpr( const ImplicitCopyCtorExpr & other ); 573 virtual ~ImplicitCopyCtorExpr();574 555 575 556 ApplicationExpr * get_callExpr() const { return callExpr; } … … 593 574 ConstructorExpr( Expression * callExpr ); 594 575 ConstructorExpr( const ConstructorExpr & other ); 595 ~ConstructorExpr();596 576 597 577 Expression * get_callExpr() const { return callExpr; } … … 611 591 CompoundLiteralExpr( Type * type, Initializer * initializer ); 612 592 CompoundLiteralExpr( const CompoundLiteralExpr & other ); 613 virtual ~CompoundLiteralExpr();614 593 615 594 Initializer * get_initializer() const { return initializer; } … … 648 627 UntypedTupleExpr( const std::list< Expression * > & exprs ); 649 628 UntypedTupleExpr( const UntypedTupleExpr & other ); 650 virtual ~UntypedTupleExpr();651 629 652 630 std::list<Expression*>& get_exprs() { return exprs; } … … 665 643 TupleExpr( const std::list< Expression * > & exprs ); 666 644 TupleExpr( const TupleExpr & other ); 667 virtual ~TupleExpr();668 645 669 646 std::list<Expression*>& get_exprs() { return exprs; } … … 683 660 TupleIndexExpr( Expression * tuple, unsigned int index ); 684 661 TupleIndexExpr( const TupleIndexExpr & other ); 685 virtual ~TupleIndexExpr();686 662 687 663 Expression * get_tuple() const { return tuple; } … … 703 679 TupleAssignExpr( const std::list< Expression * > & assigns, const std::list< ObjectDecl * > & tempDecls ); 704 680 TupleAssignExpr( const TupleAssignExpr & other ); 705 virtual ~TupleAssignExpr();706 681 707 682 TupleAssignExpr * set_stmtExpr( StmtExpr * newValue ) { stmtExpr = newValue; return this; } … … 723 698 StmtExpr( CompoundStmt * statements ); 724 699 StmtExpr( const StmtExpr & other ); 725 virtual ~StmtExpr();726 700 727 701 CompoundStmt * get_statements() const { return statements; } … … 748 722 UniqueExpr( Expression * expr, long long idVal = -1 ); 749 723 UniqueExpr( const UniqueExpr & other ); 750 ~UniqueExpr();751 724 752 725 Expression * get_expr() const { return expr; } … … 778 751 InitAlternative( const InitAlternative & other ); 779 752 InitAlternative & operator=( const Initializer & other ) = delete; // at the moment this isn't used, and I don't want to implement it 780 ~InitAlternative();781 753 }; 782 754 … … 788 760 UntypedInitExpr( Expression * expr, const std::list<InitAlternative> & initAlts ); 789 761 UntypedInitExpr( const UntypedInitExpr & other ); 790 ~UntypedInitExpr();791 762 792 763 Expression * get_expr() const { return expr; } … … 808 779 InitExpr( Expression * expr, Designation * designation ); 809 780 InitExpr( const InitExpr & other ); 810 ~InitExpr();811 781 812 782 Expression * get_expr() const { return expr; } … … 830 800 DeletedExpr( Expression * expr, BaseSyntaxNode * deleteStmt ); 831 801 DeletedExpr( const DeletedExpr & other ); 832 ~DeletedExpr();833 802 834 803 virtual DeletedExpr * clone() const { return new DeletedExpr( * this ); }
Note: See TracChangeset
for help on using the changeset viewer.