Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Unified Diff: src/ast/variables.h

Issue 2263523002: Add some scope-related DCHECKs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Disable test262 module tests. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ast/scopes.cc ('k') | src/factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « src/ast/scopes.cc ('k') | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698