Index: src/ast/variables.h |
diff --git a/src/ast/variables.h b/src/ast/variables.h |
index e1ac44616e85e01de42025a18e754fabda9f373a..f1f63b8a14cb8f9bf151dc3e2c7f9db248995486 100644 |
--- a/src/ast/variables.h |
+++ b/src/ast/variables.h |
@@ -43,6 +43,7 @@ class Variable final : public ZoneObject { |
return force_context_allocation_; |
} |
void ForceContextAllocation() { |
+ DCHECK(IsUnallocated() || IsContextSlot()); |
force_context_allocation_ = true; |
} |
bool is_used() { return is_used_; } |
@@ -96,6 +97,7 @@ class Variable final : public ZoneObject { |
} |
void AllocateTo(VariableLocation location, int index) { |
+ DCHECK(IsUnallocated() || (location_ == location && index_ == index)); |
location_ = location; |
index_ = index; |
} |