| 1 | //
|
|---|
| 2 | // Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
|
|---|
| 3 | //
|
|---|
| 4 | // The contents of this file are covered under the licence agreement in the
|
|---|
| 5 | // file "LICENCE" distributed with Cforall.
|
|---|
| 6 | //
|
|---|
| 7 | // Stmt.hpp --
|
|---|
| 8 | //
|
|---|
| 9 | // Author : Aaron B. Moss
|
|---|
| 10 | // Created On : Wed May 8 13:00:00 2019
|
|---|
| 11 | // Last Modified By : Andrew Beach
|
|---|
| 12 | // Last Modified On : Wed May 15 16:01:00 2019
|
|---|
| 13 | // Update Count : 2
|
|---|
| 14 | //
|
|---|
| 15 |
|
|---|
| 16 | #pragma once
|
|---|
| 17 |
|
|---|
| 18 | #include <list>
|
|---|
| 19 | #include <utility> // for move
|
|---|
| 20 | #include <vector>
|
|---|
| 21 |
|
|---|
| 22 | #include "Label.hpp"
|
|---|
| 23 | #include "Node.hpp" // for node, ptr
|
|---|
| 24 | #include "ParseNode.hpp"
|
|---|
| 25 | #include "Visitor.hpp"
|
|---|
| 26 | #include "Common/CodeLocation.h"
|
|---|
| 27 |
|
|---|
| 28 | // Must be included in *all* AST classes; should be #undef'd at the end of the file
|
|---|
| 29 | #define MUTATE_FRIEND template<typename node_t> friend auto mutate(const node_t * node);
|
|---|
| 30 |
|
|---|
| 31 | namespace ast {
|
|---|
| 32 |
|
|---|
| 33 | class Expr;
|
|---|
| 34 |
|
|---|
| 35 | /// Base statement node
|
|---|
| 36 | class Stmt : public ParseNode {
|
|---|
| 37 | public:
|
|---|
| 38 | std::vector<Label> labels;
|
|---|
| 39 |
|
|---|
| 40 | Stmt( const CodeLocation & loc, std::vector<Label> && labels = {} )
|
|---|
| 41 | : ParseNode(loc), labels(std::move(labels)) {}
|
|---|
| 42 |
|
|---|
| 43 | Stmt(const Stmt& o) : ParseNode(o), labels(o.labels) {}
|
|---|
| 44 |
|
|---|
| 45 | const Stmt * accept( Visitor & v ) const override = 0;
|
|---|
| 46 | private:
|
|---|
| 47 | Stmt * clone() const override = 0;
|
|---|
| 48 | MUTATE_FRIEND
|
|---|
| 49 | };
|
|---|
| 50 |
|
|---|
| 51 | /// Compound statement `{ ... }`
|
|---|
| 52 | class CompoundStmt final : public Stmt {
|
|---|
| 53 | public:
|
|---|
| 54 | std::list<ptr<Stmt>> kids;
|
|---|
| 55 |
|
|---|
| 56 | CompoundStmt(const CodeLocation & loc, std::list<ptr<Stmt>> && ks = {} )
|
|---|
| 57 | : Stmt(loc), kids(std::move(ks)) {}
|
|---|
| 58 |
|
|---|
| 59 | CompoundStmt( const CompoundStmt& o );
|
|---|
| 60 | CompoundStmt( CompoundStmt&& o ) = default;
|
|---|
| 61 |
|
|---|
| 62 | void push_back( Stmt * s ) { kids.emplace_back( s ); }
|
|---|
| 63 | void push_front( Stmt * s ) { kids.emplace_front( s ); }
|
|---|
| 64 |
|
|---|
| 65 | const CompoundStmt * accept( Visitor & v ) const override { return v.visit( this ); }
|
|---|
| 66 | private:
|
|---|
| 67 | CompoundStmt * clone() const override { return new CompoundStmt{ *this }; }
|
|---|
| 68 | MUTATE_FRIEND
|
|---|
| 69 | };
|
|---|
| 70 |
|
|---|
| 71 | /// Empty statment `;`
|
|---|
| 72 | class NullStmt final : public Stmt {
|
|---|
| 73 | public:
|
|---|
| 74 | NullStmt( const CodeLocation & loc, std::vector<Label> && labels = {} )
|
|---|
| 75 | : Stmt(loc, std::move(labels)) {}
|
|---|
| 76 |
|
|---|
| 77 | const NullStmt * accept( Visitor & v ) const override { return v.visit( this ); }
|
|---|
| 78 | private:
|
|---|
| 79 | NullStmt * clone() const override { return new NullStmt{ *this }; }
|
|---|
| 80 | MUTATE_FRIEND
|
|---|
| 81 | };
|
|---|
| 82 |
|
|---|
| 83 | /// Expression wrapped by statement
|
|---|
| 84 | class ExprStmt final : public Stmt {
|
|---|
| 85 | public:
|
|---|
| 86 | ptr<Expr> expr;
|
|---|
| 87 |
|
|---|
| 88 | ExprStmt( const CodeLocation & loc, const Expr * e ) : Stmt(loc), expr(e) {}
|
|---|
| 89 |
|
|---|
| 90 | const Stmt * accept( Visitor & v ) const override { return v.visit( this ); }
|
|---|
| 91 | private:
|
|---|
| 92 | ExprStmt * clone() const override { return new ExprStmt{ *this }; }
|
|---|
| 93 | MUTATE_FRIEND
|
|---|
| 94 | };
|
|---|
| 95 |
|
|---|
| 96 | class AsmStmt final : public Stmt {
|
|---|
| 97 | public:
|
|---|
| 98 | bool isVolatile;
|
|---|
| 99 | ptr<Expr> instruction;
|
|---|
| 100 | std::vector<ptr<Expr>> output, input;
|
|---|
| 101 | std::vector<ptr<ConstantExpr>> clobber;
|
|---|
| 102 | std::vector<Label> gotoLabels;
|
|---|
| 103 |
|
|---|
| 104 | AsmStmt( const CodeLocation & loc, bool isVolatile, const Expr * instruction,
|
|---|
| 105 | std::vector<ptr<Expr>> && output, std::vector<ptr<Expr>> && input,
|
|---|
| 106 | std::vector<ptr<ConstantExpr>> && clobber, std::vector<Label> && gotoLabels,
|
|---|
| 107 | std::vector<Label> && labels = {})
|
|---|
| 108 | : Stmt(loc, std::move(labels)), isVolatile(isVolatile), instruction(instruction),
|
|---|
| 109 | output(std::move(output)), input(std::move(input)), clobber(std::move(clobber)),
|
|---|
| 110 | gotoLabels(std::move(gotoLabels)) {}
|
|---|
| 111 |
|
|---|
| 112 | const Stmt * accept( Visitor & v ) const override { return v.visit( this ); }
|
|---|
| 113 | private:
|
|---|
| 114 | AsmStmt * clone() const override { return new AsmStmt{ *this }; }
|
|---|
| 115 | MUTATE_FRIEND
|
|---|
| 116 | };
|
|---|
| 117 |
|
|---|
| 118 | class DirectiveStmt final : public Stmt {
|
|---|
| 119 | public:
|
|---|
| 120 | std::string directive;
|
|---|
| 121 |
|
|---|
| 122 | DirectiveStmt( const CodeLocation & loc, const std::string & directive,
|
|---|
| 123 | std::vector<Label> && labels = {} )
|
|---|
| 124 | : Stmt(loc, std::move(labels)), directive(directive) {}
|
|---|
| 125 |
|
|---|
| 126 | const Stmt * accept( Visitor & v ) const override { return v.visit( this ); }
|
|---|
| 127 | private:
|
|---|
| 128 | DirectiveStmt * clone() const override { return new DirectiveStmt{ *this }; }
|
|---|
| 129 | MUTATE_FRIEND
|
|---|
| 130 | };
|
|---|
| 131 |
|
|---|
| 132 | class IfStmt final : public Stmt {
|
|---|
| 133 | public:
|
|---|
| 134 | ptr<Expr> cond;
|
|---|
| 135 | ptr<Stmt> thenPart;
|
|---|
| 136 | ptr<Stmt> elsePart;
|
|---|
| 137 | std::vector<ptr<Stmt>> inits;
|
|---|
| 138 |
|
|---|
| 139 | IfStmt( const CodeLocation & loc, const Expr * cond, const Stmt * thenPart,
|
|---|
| 140 | Stmt * const elsePart, std::vector<ptr<Stmt>> && inits,
|
|---|
| 141 | std::vector<Label> && labels = {} )
|
|---|
| 142 | : Stmt(loc, std::move(labels)), cond(cond), thenPart(thenPart), elsePart(elsePart),
|
|---|
| 143 | inits(std::move(inits)) {}
|
|---|
| 144 |
|
|---|
| 145 | const Stmt * accept( Visitor & v ) const override { return v.visit( this ); }
|
|---|
| 146 | private:
|
|---|
| 147 | IfStmt * clone() const override { return new IfStmt{ *this }; }
|
|---|
| 148 | MUTATE_FRIEND
|
|---|
| 149 | };
|
|---|
| 150 |
|
|---|
| 151 | class SwitchStmt final : public Stmt {
|
|---|
| 152 | public:
|
|---|
| 153 | ptr<Expr> cond;
|
|---|
| 154 | std::vector<ptr<Stmt>> stmts;
|
|---|
| 155 |
|
|---|
| 156 | SwitchStmt( const CodeLocation & loc, const Expr * cond, std::vector<ptr<Stmt>> && stmts,
|
|---|
| 157 | std::vector<Label> && labels = {} )
|
|---|
| 158 | : Stmt(loc, std::move(labels)), cond(cond), stmts(std::move(stmts)) {}
|
|---|
| 159 |
|
|---|
| 160 | const Stmt * accept( Visitor & v ) const override { return v.visit( this ); }
|
|---|
| 161 | private:
|
|---|
| 162 | SwitchStmt * clone() const override { return new SwitchStmt{ *this }; }
|
|---|
| 163 | MUTATE_FRIEND
|
|---|
| 164 | };
|
|---|
| 165 |
|
|---|
| 166 | class CaseStmt final : public Stmt {
|
|---|
| 167 | public:
|
|---|
| 168 | ptr<Expr> cond;
|
|---|
| 169 | std::vector<ptr<Stmt>> stmts;
|
|---|
| 170 |
|
|---|
| 171 | CaseStmt( const CodeLocation & loc, const Expr * cond, std::vector<ptr<Stmt>> && stmts,
|
|---|
| 172 | std::vector<Label> && labels = {} )
|
|---|
| 173 | : Stmt(loc, std::move(labels)), cond(cond), stmts(std::move(stmts)) {}
|
|---|
| 174 |
|
|---|
| 175 | bool isDefault() { return !cond; }
|
|---|
| 176 |
|
|---|
| 177 | const Stmt * accept( Visitor & v ) const override { return v.visit( this ); }
|
|---|
| 178 | private:
|
|---|
| 179 | CaseStmt * clone() const override { return new CaseStmt{ *this }; }
|
|---|
| 180 | MUTATE_FRIEND
|
|---|
| 181 | };
|
|---|
| 182 |
|
|---|
| 183 | class WhileStmt final : public Stmt {
|
|---|
| 184 | public:
|
|---|
| 185 | ptr<Expr> cond;
|
|---|
| 186 | ptr<Stmt> body;
|
|---|
| 187 | std::vector<ptr<Stmt>> inits;
|
|---|
| 188 | bool isDoWhile;
|
|---|
| 189 |
|
|---|
| 190 | WhileStmt( const CodeLocation & loc, const Expr * cond, const Stmt * body,
|
|---|
| 191 | std::vector<ptr<Stmt>> && inits, bool isDoWhile = false, std::vector<Label> && labels = {} )
|
|---|
| 192 | : Stmt(loc, std::move(labels)), cond(cond), body(body), inits(std::move(inits)),
|
|---|
| 193 | isDoWhile(isDoWhile) {}
|
|---|
| 194 |
|
|---|
| 195 | const Stmt * accept( Visitor & v ) const override { return v.visit( this ); }
|
|---|
| 196 | private:
|
|---|
| 197 | WhileStmt * clone() const override { return new WhileStmt{ *this }; }
|
|---|
| 198 | MUTATE_FRIEND
|
|---|
| 199 | };
|
|---|
| 200 |
|
|---|
| 201 | class ForStmt final : public Stmt {
|
|---|
| 202 | public:
|
|---|
| 203 | std::vector<ptr<Stmt>> inits;
|
|---|
| 204 | ptr<Expr> cond;
|
|---|
| 205 | ptr<Expr> inc;
|
|---|
| 206 | ptr<Stmt> body;
|
|---|
| 207 |
|
|---|
| 208 | ForStmt( const CodeLocation & loc, std::vector<ptr<Stmt>> && inits, const Expr * cond,
|
|---|
| 209 | const Expr * inc, const Stmt * body, std::vector<Label> && labels = {} )
|
|---|
| 210 | : Stmt(loc, std::move(labels)), inits(std::move(inits)), cond(cond), inc(inc),
|
|---|
| 211 | body(body) {}
|
|---|
| 212 |
|
|---|
| 213 | const Stmt * accept( Visitor & v ) const override { return v.visit( this ); }
|
|---|
| 214 | private:
|
|---|
| 215 | ForStmt * clone() const override { return new ForStmt{ *this }; }
|
|---|
| 216 | MUTATE_FRIEND
|
|---|
| 217 | };
|
|---|
| 218 |
|
|---|
| 219 | class BranchStmt final : public Stmt {
|
|---|
| 220 | public:
|
|---|
| 221 | enum Kind { Goto, Break, Continue, FallThrough, FallThroughDefault };
|
|---|
| 222 | static constexpr size_t kindEnd = 1 + (size_t)FallThroughDefault;
|
|---|
| 223 |
|
|---|
| 224 | const Label originalTarget;
|
|---|
| 225 | Label target;
|
|---|
| 226 | ptr<Expr> computedTarget;
|
|---|
| 227 | Kind kind;
|
|---|
| 228 |
|
|---|
| 229 | BranchStmt( const CodeLocation & loc, Kind kind, Label target,
|
|---|
| 230 | std::vector<Label> && labels = {} );
|
|---|
| 231 | BranchStmt( const CodeLocation & loc, const Expr * computedTarget,
|
|---|
| 232 | std::vector<Label> && labels = {} )
|
|---|
| 233 | : Stmt(loc, std::move(labels)), originalTarget(loc), target(loc),
|
|---|
| 234 | computedTarget(computedTarget), kind(Goto) {}
|
|---|
| 235 |
|
|---|
| 236 | const char * kindName() { return kindNames[kind]; }
|
|---|
| 237 |
|
|---|
| 238 | const Stmt * accept( Visitor & v ) const override { return v.visit( this ); }
|
|---|
| 239 | private:
|
|---|
| 240 | BranchStmt * clone() const override { return new BranchStmt{ *this }; }
|
|---|
| 241 | MUTATE_FRIEND
|
|---|
| 242 |
|
|---|
| 243 | static const char * kindNames[kindEnd];
|
|---|
| 244 | };
|
|---|
| 245 |
|
|---|
| 246 | class ReturnStmt final : public Stmt {
|
|---|
| 247 | public:
|
|---|
| 248 | ptr<Expr> expr;
|
|---|
| 249 |
|
|---|
| 250 | ReturnStmt( const CodeLocation & loc, const Expr * expr, std::vector<Label> && labels = {} )
|
|---|
| 251 | : Stmt(loc, std::move(labels)), expr(expr) {}
|
|---|
| 252 |
|
|---|
| 253 | const Stmt * accept( Visitor & v ) const override { return v.visit( this ); }
|
|---|
| 254 | private:
|
|---|
| 255 | ReturnStmt * clone() const override { return new ReturnStmt{ *this }; }
|
|---|
| 256 | MUTATE_FRIEND
|
|---|
| 257 | };
|
|---|
| 258 |
|
|---|
| 259 | class ThrowStmt final : public Stmt {
|
|---|
| 260 | public:
|
|---|
| 261 | enum Kind { Terminate, Resume };
|
|---|
| 262 |
|
|---|
| 263 | ptr<Expr> expr;
|
|---|
| 264 | ptr<Expr> target;
|
|---|
| 265 | Kind kind;
|
|---|
| 266 |
|
|---|
| 267 | ThrowStmt( const CodeLocation & loc, Kind kind, const Expr * expr, const Expr * target,
|
|---|
| 268 | std::vector<Label> && labels = {} )
|
|---|
| 269 | : Stmt(loc, std::move(labels)), expr(expr), target(target), kind(kind) {}
|
|---|
| 270 |
|
|---|
| 271 | const Stmt * accept( Visitor & v ) const override { return v.visit( this ); }
|
|---|
| 272 | private:
|
|---|
| 273 | ThrowStmt * clone() const override { return new ThrowStmt{ *this }; }
|
|---|
| 274 | MUTATE_FRIEND
|
|---|
| 275 | };
|
|---|
| 276 |
|
|---|
| 277 | class TryStmt final : public Stmt {
|
|---|
| 278 | public:
|
|---|
| 279 | ptr<CompoundStmt> body;
|
|---|
| 280 | std::vector<ptr<CatchStmt>> handlers;
|
|---|
| 281 | ptr<FinallyStmt> finally;
|
|---|
| 282 |
|
|---|
| 283 | TryStmt( const CodeLocation & loc, const CompoundStmt * body,
|
|---|
| 284 | std::vector<ptr<CatchStmt>> && handlers, const FinallyStmt * finally,
|
|---|
| 285 | std::vector<Label> && labels = {} )
|
|---|
| 286 | : Stmt(loc, std::move(labels)), body(body), handlers(std::move(handlers)), finally(finally) {}
|
|---|
| 287 |
|
|---|
| 288 | const Stmt * accept( Visitor & v ) const override { return v.visit( this ); }
|
|---|
| 289 | private:
|
|---|
| 290 | TryStmt * clone() const override { return new TryStmt{ *this }; }
|
|---|
| 291 | MUTATE_FRIEND
|
|---|
| 292 | };
|
|---|
| 293 |
|
|---|
| 294 | class CatchStmt final : public Stmt {
|
|---|
| 295 | public:
|
|---|
| 296 | enum Kind { Terminate, Resume };
|
|---|
| 297 |
|
|---|
| 298 | ptr<Decl> decl;
|
|---|
| 299 | ptr<Expr> cond;
|
|---|
| 300 | ptr<Stmt> body;
|
|---|
| 301 | Kind kind;
|
|---|
| 302 |
|
|---|
| 303 | CatchStmt( const CodeLocation & loc, Kind kind, const Decl * decl, const Expr * cond,
|
|---|
| 304 | const Stmt * body, std::vector<Label> && labels = {} )
|
|---|
| 305 | : Stmt(loc, std::move(labels)), decl(decl), cond(cond), body(body), kind(kind) {}
|
|---|
| 306 |
|
|---|
| 307 | const Stmt * accept( Visitor & v ) const override { return v.visit( this ); }
|
|---|
| 308 | private:
|
|---|
| 309 | CatchStmt * clone() const override { return new CatchStmt{ *this }; }
|
|---|
| 310 | MUTATE_FRIEND
|
|---|
| 311 | };
|
|---|
| 312 |
|
|---|
| 313 | class FinallyStmt final : public Stmt {
|
|---|
| 314 | public:
|
|---|
| 315 | ptr<CompoundStmt> body;
|
|---|
| 316 |
|
|---|
| 317 | FinallyStmt( const CodeLocation & loc, const CompoundStmt * body,
|
|---|
| 318 | std::vector<Label> && labels = {} )
|
|---|
| 319 | : Stmt(loc, std::move(labels)), body(body) {}
|
|---|
| 320 |
|
|---|
| 321 | const Stmt * accept( Visitor & v ) const override { return v.visit( this ); }
|
|---|
| 322 | private:
|
|---|
| 323 | FinallyStmt * clone() const override { return new FinallyStmt{ *this }; }
|
|---|
| 324 | MUTATE_FRIEND
|
|---|
| 325 | };
|
|---|
| 326 |
|
|---|
| 327 | class WaitForStmt final : public Stmt {
|
|---|
| 328 | public:
|
|---|
| 329 | struct Target {
|
|---|
| 330 | ptr<Expr> function;
|
|---|
| 331 | std::vector<ptr<Expr>> arguments;
|
|---|
| 332 | };
|
|---|
| 333 |
|
|---|
| 334 | struct Clause {
|
|---|
| 335 | Target target;
|
|---|
| 336 | ptr<Stmt> stmt;
|
|---|
| 337 | ptr<Expr> cond;
|
|---|
| 338 | };
|
|---|
| 339 |
|
|---|
| 340 | struct Timeout {
|
|---|
| 341 | ptr<Expr> time;
|
|---|
| 342 | ptr<Stmt> stmt;
|
|---|
| 343 | ptr<Expr> cond;
|
|---|
| 344 | };
|
|---|
| 345 |
|
|---|
| 346 | struct OrElse {
|
|---|
| 347 | ptr<Stmt> stmt;
|
|---|
| 348 | ptr<Expr> cond;
|
|---|
| 349 | };
|
|---|
| 350 |
|
|---|
| 351 | std::vector<Clause> clauses;
|
|---|
| 352 | Timeout timeout;
|
|---|
| 353 | OrElse orElse;
|
|---|
| 354 |
|
|---|
| 355 | WaitForStmt( const CodeLocation & loc, std::vector<Label> && labels = {} )
|
|---|
| 356 | : Stmt(loc, std::move(labels)) {}
|
|---|
| 357 |
|
|---|
| 358 | const Stmt * accept( Visitor & v ) const override { return v.visit( this ); }
|
|---|
| 359 | private:
|
|---|
| 360 | WaitForStmt * clone() const override { return new WaitForStmt{ *this }; }
|
|---|
| 361 | MUTATE_FRIEND
|
|---|
| 362 | };
|
|---|
| 363 |
|
|---|
| 364 | class WithStmt final : public Stmt {
|
|---|
| 365 | public:
|
|---|
| 366 | std::vector<ptr<Expr>> exprs;
|
|---|
| 367 | ptr<Stmt> stmt;
|
|---|
| 368 |
|
|---|
| 369 | WithStmt( const CodeLocation & loc, std::vector<ptr<Expr>> && exprs, const Stmt * stmt,
|
|---|
| 370 | std::vector<Label> && labels = {} )
|
|---|
| 371 | : Stmt(loc, std::move(labels)), exprs(std::move(exprs)), stmt(stmt) {}
|
|---|
| 372 |
|
|---|
| 373 | const Stmt * accept( Visitor & v ) const override { return v.visit( this ); }
|
|---|
| 374 | private:
|
|---|
| 375 | WithStmt * clone() const override { return new WithStmt{ *this }; }
|
|---|
| 376 | MUTATE_FRIEND
|
|---|
| 377 | };
|
|---|
| 378 |
|
|---|
| 379 | class DeclStmt final : public Stmt {
|
|---|
| 380 | public:
|
|---|
| 381 | ptr<Decl> decl;
|
|---|
| 382 |
|
|---|
| 383 | DeclStmt( const CodeLocation & loc, const Decl * decl, std::vector<Label> && labels = {} )
|
|---|
| 384 | : Stmt(loc, std::move(labels)), decl(decl) {}
|
|---|
| 385 |
|
|---|
| 386 | const Stmt * accept( Visitor & v ) const override { return v.visit( this ); }
|
|---|
| 387 | private:
|
|---|
| 388 | DeclStmt * clone() const override { return new DeclStmt{ *this }; }
|
|---|
| 389 | MUTATE_FRIEND
|
|---|
| 390 | };
|
|---|
| 391 |
|
|---|
| 392 | class ImplicitCtorDtorStmt final : public Stmt {
|
|---|
| 393 | public:
|
|---|
| 394 | readonly<Stmt> callStmt;
|
|---|
| 395 |
|
|---|
| 396 | ImplicitCtorDtorStmt( const CodeLocation & loc, const Stmt * callStmt,
|
|---|
| 397 | std::vector<Label> && labels = {} )
|
|---|
| 398 | : Stmt(loc, std::move(labels)), callStmt(callStmt) {}
|
|---|
| 399 |
|
|---|
| 400 | const Stmt * accept( Visitor & v ) const override { return v.visit( this ); }
|
|---|
| 401 | private:
|
|---|
| 402 | ImplicitCtorDtorStmt * clone() const override { return new ImplicitCtorDtorStmt{ *this }; }
|
|---|
| 403 | MUTATE_FRIEND
|
|---|
| 404 | };
|
|---|
| 405 |
|
|---|
| 406 | //=================================================================================================
|
|---|
| 407 | /// This disgusting and giant piece of boiler-plate is here to solve a cyclic dependency
|
|---|
| 408 | /// remove only if there is a better solution
|
|---|
| 409 | /// The problem is that ast::ptr< ... > uses increment/decrement which won't work well with
|
|---|
| 410 | /// forward declarations
|
|---|
| 411 | inline void increment( const class Stmt * node, Node::ref_type ref ) { node->increment( ref ); }
|
|---|
| 412 | inline void decrement( const class Stmt * node, Node::ref_type ref ) { node->decrement( ref ); }
|
|---|
| 413 | inline void increment( const class CompoundStmt * node, Node::ref_type ref ) { node->increment( ref ); }
|
|---|
| 414 | inline void decrement( const class CompoundStmt * node, Node::ref_type ref ) { node->decrement( ref ); }
|
|---|
| 415 | inline void increment( const class ExprStmt * node, Node::ref_type ref ) { node->increment( ref ); }
|
|---|
| 416 | inline void decrement( const class ExprStmt * node, Node::ref_type ref ) { node->decrement( ref ); }
|
|---|
| 417 | inline void increment( const class AsmStmt * node, Node::ref_type ref ) { node->increment( ref ); }
|
|---|
| 418 | inline void decrement( const class AsmStmt * node, Node::ref_type ref ) { node->decrement( ref ); }
|
|---|
| 419 | inline void increment( const class DirectiveStmt * node, Node::ref_type ref ) { node->increment( ref ); }
|
|---|
| 420 | inline void decrement( const class DirectiveStmt * node, Node::ref_type ref ) { node->decrement( ref ); }
|
|---|
| 421 | inline void increment( const class IfStmt * node, Node::ref_type ref ) { node->increment( ref ); }
|
|---|
| 422 | inline void decrement( const class IfStmt * node, Node::ref_type ref ) { node->decrement( ref ); }
|
|---|
| 423 | inline void increment( const class WhileStmt * node, Node::ref_type ref ) { node->increment( ref ); }
|
|---|
| 424 | inline void decrement( const class WhileStmt * node, Node::ref_type ref ) { node->decrement( ref ); }
|
|---|
| 425 | inline void increment( const class ForStmt * node, Node::ref_type ref ) { node->increment( ref ); }
|
|---|
| 426 | inline void decrement( const class ForStmt * node, Node::ref_type ref ) { node->decrement( ref ); }
|
|---|
| 427 | inline void increment( const class SwitchStmt * node, Node::ref_type ref ) { node->increment( ref ); }
|
|---|
| 428 | inline void decrement( const class SwitchStmt * node, Node::ref_type ref ) { node->decrement( ref ); }
|
|---|
| 429 | inline void increment( const class CaseStmt * node, Node::ref_type ref ) { node->increment( ref ); }
|
|---|
| 430 | inline void decrement( const class CaseStmt * node, Node::ref_type ref ) { node->decrement( ref ); }
|
|---|
| 431 | inline void increment( const class BranchStmt * node, Node::ref_type ref ) { node->increment( ref ); }
|
|---|
| 432 | inline void decrement( const class BranchStmt * node, Node::ref_type ref ) { node->decrement( ref ); }
|
|---|
| 433 | inline void increment( const class ReturnStmt * node, Node::ref_type ref ) { node->increment( ref ); }
|
|---|
| 434 | inline void decrement( const class ReturnStmt * node, Node::ref_type ref ) { node->decrement( ref ); }
|
|---|
| 435 | inline void increment( const class ThrowStmt * node, Node::ref_type ref ) { node->increment( ref ); }
|
|---|
| 436 | inline void decrement( const class ThrowStmt * node, Node::ref_type ref ) { node->decrement( ref ); }
|
|---|
| 437 | inline void increment( const class TryStmt * node, Node::ref_type ref ) { node->increment( ref ); }
|
|---|
| 438 | inline void decrement( const class TryStmt * node, Node::ref_type ref ) { node->decrement( ref ); }
|
|---|
| 439 | inline void increment( const class CatchStmt * node, Node::ref_type ref ) { node->increment( ref ); }
|
|---|
| 440 | inline void decrement( const class CatchStmt * node, Node::ref_type ref ) { node->decrement( ref ); }
|
|---|
| 441 | inline void increment( const class FinallyStmt * node, Node::ref_type ref ) { node->increment( ref ); }
|
|---|
| 442 | inline void decrement( const class FinallyStmt * node, Node::ref_type ref ) { node->decrement( ref ); }
|
|---|
| 443 | inline void increment( const class WaitForStmt * node, Node::ref_type ref ) { node->increment( ref ); }
|
|---|
| 444 | inline void decrement( const class WaitForStmt * node, Node::ref_type ref ) { node->decrement( ref ); }
|
|---|
| 445 | inline void increment( const class WithStmt * node, Node::ref_type ref ) { node->increment( ref ); }
|
|---|
| 446 | inline void decrement( const class WithStmt * node, Node::ref_type ref ) { node->decrement( ref ); }
|
|---|
| 447 | inline void increment( const class DeclStmt * node, Node::ref_type ref ) { node->increment( ref ); }
|
|---|
| 448 | inline void decrement( const class DeclStmt * node, Node::ref_type ref ) { node->decrement( ref ); }
|
|---|
| 449 | inline void increment( const class NullStmt * node, Node::ref_type ref ) { node->increment( ref ); }
|
|---|
| 450 | inline void decrement( const class NullStmt * node, Node::ref_type ref ) { node->decrement( ref ); }
|
|---|
| 451 | inline void increment( const class ImplicitCtorDtorStmt * node, Node::ref_type ref ) { node->increment( ref ); }
|
|---|
| 452 | inline void decrement( const class ImplicitCtorDtorStmt * node, Node::ref_type ref ) { node->decrement( ref ); }
|
|---|
| 453 |
|
|---|
| 454 | }
|
|---|
| 455 |
|
|---|
| 456 | #undef MUTATE_FRIEND
|
|---|
| 457 |
|
|---|
| 458 | // Local Variables: //
|
|---|
| 459 | // tab-width: 4 //
|
|---|
| 460 | // mode: c++ //
|
|---|
| 461 | // compile-command: "make install" //
|
|---|
| 462 | // End: //
|
|---|