| Index: src/ast.h
|
| diff --git a/src/ast.h b/src/ast.h
|
| index 0dc9e6066630898e326880092c60b157e4e8e6a7..7bdd520bbaf6e6559e8dae2f273facfb6bf1969f 100644
|
| --- a/src/ast.h
|
| +++ b/src/ast.h
|
| @@ -1163,12 +1163,27 @@ class TryStatement : public Statement {
|
| public:
|
| Block* try_block() const { return try_block_; }
|
|
|
| + void set_base_id(int id) { base_id_ = id; }
|
| + static int num_ids() { return parent_num_ids() + 1; }
|
| + BailoutId HandlerId() const { return BailoutId(local_id(0)); }
|
| +
|
| protected:
|
| TryStatement(Zone* zone, Block* try_block, int pos)
|
| - : Statement(zone, pos), try_block_(try_block) {}
|
| + : Statement(zone, pos),
|
| + try_block_(try_block),
|
| + base_id_(BailoutId::None().ToInt()) {}
|
| + static int parent_num_ids() { return 0; }
|
| +
|
| + int base_id() const {
|
| + DCHECK(!BailoutId(base_id_).IsNone());
|
| + return base_id_;
|
| + }
|
|
|
| private:
|
| + int local_id(int n) const { return base_id() + parent_num_ids() + n; }
|
| +
|
| Block* try_block_;
|
| + int base_id_;
|
| };
|
|
|
|
|
|
|