Changeset 87701b6 for src/AST/Expr.hpp
- Timestamp:
- May 16, 2019, 4:13:19 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- e61207e7
- Parents:
- 1fb7bfd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Expr.hpp
r1fb7bfd r87701b6 129 129 }; 130 130 131 /// The application of a function to a set of parameters. 131 /// The application of a function to a set of parameters. 132 132 /// Post-resolver form of `UntypedExpr` 133 133 class ApplicationExpr final : public Expr { … … 209 209 GeneratedFlag isGenerated; 210 210 211 CastExpr( const CodeLocation & loc, const Expr * a, const Type * to, 211 CastExpr( const CodeLocation & loc, const Expr * a, const Type * to, 212 212 GeneratedFlag g = GeneratedCast ) : Expr( loc, to ), arg( a ), isGenerated( g ) {} 213 213 /// Cast-to-void … … 296 296 unsigned long long ival; 297 297 double dval; 298 298 299 299 Val( unsigned long long i ) : ival( i ) {} 300 300 Val( double d ) : dval( d ) {} … … 303 303 std::string rep; 304 304 305 ConstantExpr( 305 ConstantExpr( 306 306 const CodeLocation & loc, const Type * ty, const std::string & r, unsigned long long v ) 307 307 : Expr( loc, ty ), val( v ), rep( r ) {} 308 308 ConstantExpr( const CodeLocation & loc, const Type * ty, const std::string & r, double v ) 309 309 : Expr( loc, ty ), val( v ), rep( r ) {} 310 310 311 311 /// Gets the value of this constant as an integer 312 312 long long int intValue() const; … … 441 441 ptr<Expr> arg2; 442 442 443 CommaExpr( const CodeLocation & loc, const Expr * a1, const Expr * a2 ) 443 CommaExpr( const CodeLocation & loc, const Expr * a1, const Expr * a2 ) 444 444 : Expr( loc ), arg1( a1 ), arg2( a2 ) {} 445 445 … … 466 466 public: 467 467 ptr<Expr> inout; 468 ptr<Expr> constraint; 469 }; 470 471 //================================================================================================= 472 /// This disgusting and giant piece of boiler-plate is here to solve a cyclic dependency 473 /// remove only if there is a better solution 474 /// The problem is that ast::ptr< ... > uses increment/decrement which won't work well with 475 /// forward declarations 476 inline void increment( const class Expr * node, Node::ref_type ref ) { node->increment(ref); } 477 inline void decrement( const class Expr * node, Node::ref_type ref ) { node->decrement(ref); } 478 inline void increment( const class ApplicationExpr * node, Node::ref_type ref ) { node->increment(ref); } 479 inline void decrement( const class ApplicationExpr * node, Node::ref_type ref ) { node->decrement(ref); } 480 inline void increment( const class UntypedExpr * node, Node::ref_type ref ) { node->increment(ref); } 481 inline void decrement( const class UntypedExpr * node, Node::ref_type ref ) { node->decrement(ref); } 482 inline void increment( const class NameExpr * node, Node::ref_type ref ) { node->increment(ref); } 483 inline void decrement( const class NameExpr * node, Node::ref_type ref ) { node->decrement(ref); } 484 inline void increment( const class AddressExpr * node, Node::ref_type ref ) { node->increment(ref); } 485 inline void decrement( const class AddressExpr * node, Node::ref_type ref ) { node->decrement(ref); } 486 inline void increment( const class LabelAddressExpr * node, Node::ref_type ref ) { node->increment(ref); } 487 inline void decrement( const class LabelAddressExpr * node, Node::ref_type ref ) { node->decrement(ref); } 488 inline void increment( const class CastExpr * node, Node::ref_type ref ) { node->increment(ref); } 489 inline void decrement( const class CastExpr * node, Node::ref_type ref ) { node->decrement(ref); } 490 inline void increment( const class KeywordCastExpr * node, Node::ref_type ref ) { node->increment(ref); } 491 inline void decrement( const class KeywordCastExpr * node, Node::ref_type ref ) { node->decrement(ref); } 492 inline void increment( const class VirtualCastExpr * node, Node::ref_type ref ) { node->increment(ref); } 493 inline void decrement( const class VirtualCastExpr * node, Node::ref_type ref ) { node->decrement(ref); } 494 inline void increment( const class MemberExpr * node, Node::ref_type ref ) { node->increment(ref); } 495 inline void decrement( const class MemberExpr * node, Node::ref_type ref ) { node->decrement(ref); } 496 inline void increment( const class UntypedMemberExpr * node, Node::ref_type ref ) { node->increment(ref); } 497 inline void decrement( const class UntypedMemberExpr * node, Node::ref_type ref ) { node->decrement(ref); } 498 inline void increment( const class VariableExpr * node, Node::ref_type ref ) { node->increment(ref); } 499 inline void decrement( const class VariableExpr * node, Node::ref_type ref ) { node->decrement(ref); } 500 inline void increment( const class ConstantExpr * node, Node::ref_type ref ) { node->increment(ref); } 501 inline void decrement( const class ConstantExpr * node, Node::ref_type ref ) { node->decrement(ref); } 502 inline void increment( const class SizeofExpr * node, Node::ref_type ref ) { node->increment(ref); } 503 inline void decrement( const class SizeofExpr * node, Node::ref_type ref ) { node->decrement(ref); } 504 inline void increment( const class AlignofExpr * node, Node::ref_type ref ) { node->increment(ref); } 505 inline void decrement( const class AlignofExpr * node, Node::ref_type ref ) { node->decrement(ref); } 506 inline void increment( const class UntypedOffsetofExpr * node, Node::ref_type ref ) { node->increment(ref); } 507 inline void decrement( const class UntypedOffsetofExpr * node, Node::ref_type ref ) { node->decrement(ref); } 508 inline void increment( const class OffsetofExpr * node, Node::ref_type ref ) { node->increment(ref); } 509 inline void decrement( const class OffsetofExpr * node, Node::ref_type ref ) { node->decrement(ref); } 510 inline void increment( const class OffsetPackExpr * node, Node::ref_type ref ) { node->increment(ref); } 511 inline void decrement( const class OffsetPackExpr * node, Node::ref_type ref ) { node->decrement(ref); } 512 inline void increment( const class LogicalExpr * node, Node::ref_type ref ) { node->increment(ref); } 513 inline void decrement( const class LogicalExpr * node, Node::ref_type ref ) { node->decrement(ref); } 514 inline void increment( const class ConditionalExpr * node, Node::ref_type ref ) { node->increment(ref); } 515 inline void decrement( const class ConditionalExpr * node, Node::ref_type ref ) { node->decrement(ref); } 516 inline void increment( const class CommaExpr * node, Node::ref_type ref ) { node->increment(ref); } 517 inline void decrement( const class CommaExpr * node, Node::ref_type ref ) { node->decrement(ref); } 518 inline void increment( const class TypeExpr * node, Node::ref_type ref ) { node->increment(ref); } 519 inline void decrement( const class TypeExpr * node, Node::ref_type ref ) { node->decrement(ref); } 520 inline void increment( const class AsmExpr * node, Node::ref_type ref ) { node->increment(ref); } 521 inline void decrement( const class AsmExpr * node, Node::ref_type ref ) { node->decrement(ref); } 522 // inline void increment( const class ImplicitCopyCtorExpr * node, Node::ref_type ref ) { node->increment(ref); } 523 // inline void decrement( const class ImplicitCopyCtorExpr * node, Node::ref_type ref ) { node->decrement(ref); } 524 // inline void increment( const class ConstructorExpr * node, Node::ref_type ref ) { node->increment(ref); } 525 // inline void decrement( const class ConstructorExpr * node, Node::ref_type ref ) { node->decrement(ref); } 526 // inline void increment( const class CompoundLiteralExpr * node, Node::ref_type ref ) { node->increment(ref); } 527 // inline void decrement( const class CompoundLiteralExpr * node, Node::ref_type ref ) { node->decrement(ref); } 528 // inline void increment( const class UntypedValofExpr * node, Node::ref_type ref ) { node->increment(ref); } 529 // inline void decrement( const class UntypedValofExpr * node, Node::ref_type ref ) { node->decrement(ref); } 530 // inline void increment( const class RangeExpr * node, Node::ref_type ref ) { node->increment(ref); } 531 // inline void decrement( const class RangeExpr * node, Node::ref_type ref ) { node->decrement(ref); } 532 // inline void increment( const class UntypedTupleExpr * node, Node::ref_type ref ) { node->increment(ref); } 533 // inline void decrement( const class UntypedTupleExpr * node, Node::ref_type ref ) { node->decrement(ref); } 534 // inline void increment( const class TupleExpr * node, Node::ref_type ref ) { node->increment(ref); } 535 // inline void decrement( const class TupleExpr * node, Node::ref_type ref ) { node->decrement(ref); } 536 // inline void increment( const class TupleIndexExpr * node, Node::ref_type ref ) { node->increment(ref); } 537 // inline void decrement( const class TupleIndexExpr * node, Node::ref_type ref ) { node->decrement(ref); } 538 // inline void increment( const class TupleAssignExpr * node, Node::ref_type ref ) { node->increment(ref); } 539 // inline void decrement( const class TupleAssignExpr * node, Node::ref_type ref ) { node->decrement(ref); } 540 // inline void increment( const class StmtExpr * node, Node::ref_type ref ) { node->increment(ref); } 541 // inline void decrement( const class StmtExpr * node, Node::ref_type ref ) { node->decrement(ref); } 542 // inline void increment( const class UniqueExpr * node, Node::ref_type ref ) { node->increment(ref); } 543 // inline void decrement( const class UniqueExpr * node, Node::ref_type ref ) { node->decrement(ref); } 544 // inline void increment( const class UntypedInitExpr * node, Node::ref_type ref ) { node->increment(ref); } 545 // inline void decrement( const class UntypedInitExpr * node, Node::ref_type ref ) { node->decrement(ref); } 546 // inline void increment( const class InitExpr * node, Node::ref_type ref ) { node->increment(ref); } 547 // inline void decrement( const class InitExpr * node, Node::ref_type ref ) { node->decrement(ref); } 548 // inline void increment( const class DeletedExpr * node, Node::ref_type ref ) { node->increment(ref); } 549 // inline void decrement( const class DeletedExpr * node, Node::ref_type ref ) { node->decrement(ref); } 550 // inline void increment( const class DefaultArgExpr * node, Node::ref_type ref ) { node->increment(ref); } 551 // inline void decrement( const class DefaultArgExpr * node, Node::ref_type ref ) { node->decrement(ref); } 552 // inline void increment( const class GenericExpr * node, Node::ref_type ref ) { node->increment(ref); } 553 // inline void decrement( const class GenericExpr * node, Node::ref_type ref ) { node->decrement(ref); } 468 ptr<Expr> constraint; 469 }; 470 554 471 } 555 472
Note: See TracChangeset
for help on using the changeset viewer.