Changeset 87701b6 for src/AST/Stmt.hpp
- Timestamp:
- May 16, 2019, 4:13:19 PM (7 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, stuck-waitfor-destruct
- Children:
- e61207e7
- Parents:
- 1fb7bfd
- File:
-
- 1 edited
-
src/AST/Stmt.hpp (modified) (20 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Stmt.hpp
r1fb7bfd r87701b6 65 65 /// Must be copied in ALL derived classes 66 66 template<typename node_t> 67 friend automutate(const node_t * node);67 friend node_t * mutate(const node_t * node); 68 68 }; 69 69 … … 80 80 /// Must be copied in ALL derived classes 81 81 template<typename node_t> 82 friend automutate(const node_t * node);82 friend node_t * mutate(const node_t * node); 83 83 }; 84 84 … … 96 96 /// Must be copied in ALL derived classes 97 97 template<typename node_t> 98 friend automutate(const node_t * node);98 friend node_t * mutate(const node_t * node); 99 99 }; 100 100 … … 121 121 /// Must be copied in ALL derived classes 122 122 template<typename node_t> 123 friend automutate(const node_t * node);123 friend node_t * mutate(const node_t * node); 124 124 }; 125 125 … … 138 138 /// Must be copied in ALL derived classes 139 139 template<typename node_t> 140 friend automutate(const node_t * node);140 friend node_t * mutate(const node_t * node); 141 141 }; 142 142 … … 160 160 /// Must be copied in ALL derived classes 161 161 template<typename node_t> 162 friend automutate(const node_t * node);162 friend node_t * mutate(const node_t * node); 163 163 }; 164 164 … … 178 178 /// Must be copied in ALL derived classes 179 179 template<typename node_t> 180 friend automutate(const node_t * node);180 friend node_t * mutate(const node_t * node); 181 181 }; 182 182 … … 198 198 /// Must be copied in ALL derived classes 199 199 template<typename node_t> 200 friend automutate(const node_t * node);200 friend node_t * mutate(const node_t * node); 201 201 }; 202 202 … … 219 219 /// Must be copied in ALL derived classes 220 220 template<typename node_t> 221 friend automutate(const node_t * node);221 friend node_t * mutate(const node_t * node); 222 222 }; 223 223 … … 240 240 /// Must be copied in ALL derived classes 241 241 template<typename node_t> 242 friend automutate(const node_t * node);242 friend node_t * mutate(const node_t * node); 243 243 }; 244 244 … … 268 268 /// Must be copied in ALL derived classes 269 269 template<typename node_t> 270 friend automutate(const node_t * node);270 friend node_t * mutate(const node_t * node); 271 271 272 272 static const char * kindNames[kindEnd]; … … 286 286 /// Must be copied in ALL derived classes 287 287 template<typename node_t> 288 friend automutate(const node_t * node);288 friend node_t * mutate(const node_t * node); 289 289 }; 290 290 … … 307 307 /// Must be copied in ALL derived classes 308 308 template<typename node_t> 309 friend automutate(const node_t * node);309 friend node_t * mutate(const node_t * node); 310 310 }; 311 311 … … 327 327 /// Must be copied in ALL derived classes 328 328 template<typename node_t> 329 friend automutate(const node_t * node);329 friend node_t * mutate(const node_t * node); 330 330 }; 331 331 … … 349 349 /// Must be copied in ALL derived classes 350 350 template<typename node_t> 351 friend automutate(const node_t * node);351 friend node_t * mutate(const node_t * node); 352 352 }; 353 353 … … 366 366 /// Must be copied in ALL derived classes 367 367 template<typename node_t> 368 friend automutate(const node_t * node);368 friend node_t * mutate(const node_t * node); 369 369 }; 370 370 … … 406 406 /// Must be copied in ALL derived classes 407 407 template<typename node_t> 408 friend automutate(const node_t * node);408 friend node_t * mutate(const node_t * node); 409 409 }; 410 410 … … 424 424 /// Must be copied in ALL derived classes 425 425 template<typename node_t> 426 friend automutate(const node_t * node);426 friend node_t * mutate(const node_t * node); 427 427 }; 428 428 … … 440 440 /// Must be copied in ALL derived classes 441 441 template<typename node_t> 442 friend automutate(const node_t * node);442 friend node_t * mutate(const node_t * node); 443 443 }; 444 444 … … 457 457 /// Must be copied in ALL derived classes 458 458 template<typename node_t> 459 friend auto mutate(const node_t * node); 460 }; 461 462 //================================================================================================= 463 /// This disgusting and giant piece of boiler-plate is here to solve a cyclic dependency 464 /// remove only if there is a better solution 465 /// The problem is that ast::ptr< ... > uses increment/decrement which won't work well with 466 /// forward declarations 467 inline void increment( const class Stmt * node, Node::ref_type ref ) { node->increment( ref ); } 468 inline void decrement( const class Stmt * node, Node::ref_type ref ) { node->decrement( ref ); } 469 inline void increment( const class CompoundStmt * node, Node::ref_type ref ) { node->increment( ref ); } 470 inline void decrement( const class CompoundStmt * node, Node::ref_type ref ) { node->decrement( ref ); } 471 inline void increment( const class ExprStmt * node, Node::ref_type ref ) { node->increment( ref ); } 472 inline void decrement( const class ExprStmt * node, Node::ref_type ref ) { node->decrement( ref ); } 473 inline void increment( const class AsmStmt * node, Node::ref_type ref ) { node->increment( ref ); } 474 inline void decrement( const class AsmStmt * node, Node::ref_type ref ) { node->decrement( ref ); } 475 inline void increment( const class DirectiveStmt * node, Node::ref_type ref ) { node->increment( ref ); } 476 inline void decrement( const class DirectiveStmt * node, Node::ref_type ref ) { node->decrement( ref ); } 477 inline void increment( const class IfStmt * node, Node::ref_type ref ) { node->increment( ref ); } 478 inline void decrement( const class IfStmt * node, Node::ref_type ref ) { node->decrement( ref ); } 479 inline void increment( const class WhileStmt * node, Node::ref_type ref ) { node->increment( ref ); } 480 inline void decrement( const class WhileStmt * node, Node::ref_type ref ) { node->decrement( ref ); } 481 inline void increment( const class ForStmt * node, Node::ref_type ref ) { node->increment( ref ); } 482 inline void decrement( const class ForStmt * node, Node::ref_type ref ) { node->decrement( ref ); } 483 inline void increment( const class SwitchStmt * node, Node::ref_type ref ) { node->increment( ref ); } 484 inline void decrement( const class SwitchStmt * node, Node::ref_type ref ) { node->decrement( ref ); } 485 inline void increment( const class CaseStmt * node, Node::ref_type ref ) { node->increment( ref ); } 486 inline void decrement( const class CaseStmt * node, Node::ref_type ref ) { node->decrement( ref ); } 487 inline void increment( const class BranchStmt * node, Node::ref_type ref ) { node->increment( ref ); } 488 inline void decrement( const class BranchStmt * node, Node::ref_type ref ) { node->decrement( ref ); } 489 inline void increment( const class ReturnStmt * node, Node::ref_type ref ) { node->increment( ref ); } 490 inline void decrement( const class ReturnStmt * node, Node::ref_type ref ) { node->decrement( ref ); } 491 inline void increment( const class ThrowStmt * node, Node::ref_type ref ) { node->increment( ref ); } 492 inline void decrement( const class ThrowStmt * node, Node::ref_type ref ) { node->decrement( ref ); } 493 inline void increment( const class TryStmt * node, Node::ref_type ref ) { node->increment( ref ); } 494 inline void decrement( const class TryStmt * node, Node::ref_type ref ) { node->decrement( ref ); } 495 inline void increment( const class CatchStmt * node, Node::ref_type ref ) { node->increment( ref ); } 496 inline void decrement( const class CatchStmt * node, Node::ref_type ref ) { node->decrement( ref ); } 497 inline void increment( const class FinallyStmt * node, Node::ref_type ref ) { node->increment( ref ); } 498 inline void decrement( const class FinallyStmt * node, Node::ref_type ref ) { node->decrement( ref ); } 499 inline void increment( const class WaitForStmt * node, Node::ref_type ref ) { node->increment( ref ); } 500 inline void decrement( const class WaitForStmt * node, Node::ref_type ref ) { node->decrement( ref ); } 501 inline void increment( const class WithStmt * node, Node::ref_type ref ) { node->increment( ref ); } 502 inline void decrement( const class WithStmt * node, Node::ref_type ref ) { node->decrement( ref ); } 503 inline void increment( const class DeclStmt * node, Node::ref_type ref ) { node->increment( ref ); } 504 inline void decrement( const class DeclStmt * node, Node::ref_type ref ) { node->decrement( ref ); } 505 inline void increment( const class NullStmt * node, Node::ref_type ref ) { node->increment( ref ); } 506 inline void decrement( const class NullStmt * node, Node::ref_type ref ) { node->decrement( ref ); } 507 inline void increment( const class ImplicitCtorDtorStmt * node, Node::ref_type ref ) { node->increment( ref ); } 508 inline void decrement( const class ImplicitCtorDtorStmt * node, Node::ref_type ref ) { node->decrement( ref ); } 459 friend node_t * mutate(const node_t * node); 460 }; 509 461 510 462 }
Note:
See TracChangeset
for help on using the changeset viewer.