Chromium Code Reviews| Index: src/ast.h |
| diff --git a/src/ast.h b/src/ast.h |
| index 2f54443e889768ad29e8e540641dd6c7b5ece14a..c82c51957140d033cb7b788b77fe08d9a9227ec7 100644 |
| --- a/src/ast.h |
| +++ b/src/ast.h |
| @@ -670,6 +670,7 @@ class IterationStatement : public BreakableStatement { |
| IterationStatement* AsIterationStatement() final { return this; } |
| Statement* body() const { return body_; } |
| + void set_body(Statement* s) { body_ = s; } |
| static int num_ids() { return parent_num_ids() + 1; } |
| BailoutId OsrEntryId() const { return BailoutId(local_id(0)); } |
| @@ -1028,6 +1029,7 @@ class WithStatement final : public Statement { |
| Scope* scope() { return scope_; } |
| Expression* expression() const { return expression_; } |
| Statement* statement() const { return statement_; } |
| + void set_statement(Statement* s) { statement_ = s; } |
| void set_base_id(int id) { base_id_ = id; } |
| static int num_ids() { return parent_num_ids() + 1; } |
| @@ -1132,6 +1134,9 @@ class IfStatement final : public Statement { |
| Statement* then_statement() const { return then_statement_; } |
| Statement* else_statement() const { return else_statement_; } |
| + void set_then_statement(Statement* s) { then_statement_ = s; } |
|
rossberg
2015/09/28 11:42:15
Can you add assertions DCHECK(s != nullptr) to all
|
| + void set_else_statement(Statement* s) { else_statement_ = s; } |
| + |
| bool IsJump() const override { |
| return HasThenStatement() && then_statement()->IsJump() |
| && HasElseStatement() && else_statement()->IsJump(); |
| @@ -1171,6 +1176,7 @@ class IfStatement final : public Statement { |
| class TryStatement : public Statement { |
| public: |
| Block* try_block() const { return try_block_; } |
| + void set_try_block(Block* b) { try_block_ = b; } |
| void set_base_id(int id) { base_id_ = id; } |
| static int num_ids() { return parent_num_ids() + 1; } |
| @@ -1203,6 +1209,7 @@ class TryCatchStatement final : public TryStatement { |
| Scope* scope() { return scope_; } |
| Variable* variable() { return variable_; } |
| Block* catch_block() const { return catch_block_; } |
| + void set_catch_block(Block* b) { catch_block_ = b; } |
| protected: |
| TryCatchStatement(Zone* zone, Block* try_block, Scope* scope, |
| @@ -1224,6 +1231,7 @@ class TryFinallyStatement final : public TryStatement { |
| DECLARE_NODE_TYPE(TryFinallyStatement) |
| Block* finally_block() const { return finally_block_; } |
| + void set_finally_block(Block* b) { finally_block_ = b; } |
| protected: |
| TryFinallyStatement(Zone* zone, Block* try_block, Block* finally_block, |