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

Unified Diff: src/ast/scopes.cc

Issue 2254433002: Scope analysis: DCHECK that we allocate rest_parameter_ only once. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: a different dcheck 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/scopes.cc
diff --git a/src/ast/scopes.cc b/src/ast/scopes.cc
index 1330f79b28d4d9373fbba2df76a9a95eea04424e..09474357b9fd84852e5ab026d6d96fecbd31e605 100644
--- a/src/ast/scopes.cc
+++ b/src/ast/scopes.cc
@@ -1678,9 +1678,7 @@ void DeclarationScope::AllocateLocals() {
AllocateNonParameterLocal(function_);
}
- if (rest_parameter_ != nullptr) {
- AllocateNonParameterLocal(rest_parameter_);
- }
+ DCHECK(rest_parameter_ == nullptr || !rest_parameter_->IsUnallocated());
if (new_target_ != nullptr && !MustAllocate(new_target_)) {
new_target_ = nullptr;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698