Index: src/ast.cc |
diff --git a/src/ast.cc b/src/ast.cc |
index ab9050daa0eee24e0e78d021e7e46c9b6b062b7f..7e591e496daa0aa71fd59cdc9d5eeeb4e3329b37 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->ReserveIdRange(kClassIdRange); // reserve assignment id |
+ DCHECK(assignment_id == AssignmentId().ToInt()); |
+ } |
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(kClassIdRange); |
+ DCHECK(compare_id == CompareId().ToInt()); |
+ } |
#define REGULAR_NODE(NodeType) \ |
void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \ |