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

Unified Diff: src/ast/scopes.cc

Issue 2222843005: Remove unnecessary checks for forced context allocation (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 4e107bd3fdab1a258a5ff747ebc63893094cd5e8..7a430f74e57d98e7fbf2ca48e995c8d08d60d396 100644
--- a/src/ast/scopes.cc
+++ b/src/ast/scopes.cc
@@ -1577,7 +1577,7 @@ void DeclarationScope::AllocateParameterLocals() {
if (var == rest_parameter_) continue;
DCHECK(var->scope() == this);
- if (uses_sloppy_arguments || has_forced_context_allocation()) {
+ if (uses_sloppy_arguments) {
// Force context allocation of the parameter.
neis 2016/08/09 07:15:26 Maybe remove the comment too as it doesn't add any
adamk 2016/08/09 16:29:11 Done.
var->ForceContextAllocation();
}
@@ -1607,11 +1607,6 @@ void DeclarationScope::AllocateReceiver() {
if (!has_this_declaration()) return;
DCHECK_NOT_NULL(receiver());
DCHECK_EQ(receiver()->scope(), this);
-
- if (has_forced_context_allocation()) {
- // Force context allocation of the receiver.
- receiver()->ForceContextAllocation();
- }
AllocateParameter(receiver(), -1);
}
« 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