| Index: src/ast.cc
|
| diff --git a/src/ast.cc b/src/ast.cc
|
| index ab9050daa0eee24e0e78d021e7e46c9b6b062b7f..327497c2d0b5c4e1d85fd7867a09eecd01ad096d 100644
|
| --- a/src/ast.cc
|
| +++ b/src/ast.cc
|
| @@ -105,9 +105,14 @@ Assignment::Assignment(Zone* zone, Token::Value op, Expression* target,
|
| target_(target),
|
| value_(value),
|
| binary_operation_(NULL),
|
| - assignment_id_(id_gen->GetNextId()),
|
| is_uninitialized_(false),
|
| - store_mode_(STANDARD_STORE) {}
|
| + store_mode_(STANDARD_STORE) {
|
| +#ifdef DEBUG
|
| + int assignment_id =
|
| +#endif
|
| + id_gen->GetNextId(); // reserve assignment id
|
| + DCHECK(assignment_id == id().ToInt() + 2);
|
| + }
|
|
|
|
|
| Token::Value Assignment::binary_op() const {
|
| @@ -992,10 +997,13 @@ CaseClause::CaseClause(Zone* zone, Expression* label,
|
| : Expression(zone, pos, id_gen),
|
| label_(label),
|
| statements_(statements),
|
| - compare_type_(Type::None(zone)),
|
| - compare_id_(id_gen->GetNextId()),
|
| - entry_id_(id_gen->GetNextId()) {}
|
| -
|
| + compare_type_(Type::None(zone)) {
|
| +#ifdef DEBUG
|
| + int compare_id =
|
| +#endif
|
| + id_gen->ReserveIdRange(2); // Reserve compare and entry ids
|
| + DCHECK(compare_id == id().ToInt() + 2);
|
| + }
|
|
|
| #define REGULAR_NODE(NodeType) \
|
| void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
|
|
|