Commit 86e141eb authored by adamk's avatar adamk Committed by Commit bot

Remove unnecessary checks for forced context allocation

If a whole scope has forced context allocation, MustAllocateInContext()
already takes care of returning true for all variables, there's no need
to individually call ForceContextAllocation() on them.

R=neis@chromium.org

Review-Url: https://codereview.chromium.org/2222843005
Cr-Commit-Position: refs/heads/master@{#38504}
parent d634e65f
......@@ -1575,8 +1575,7 @@ void DeclarationScope::AllocateParameterLocals() {
if (var == rest_parameter_) continue;
DCHECK(var->scope() == this);
if (uses_sloppy_arguments || has_forced_context_allocation()) {
// Force context allocation of the parameter.
if (uses_sloppy_arguments) {
var->ForceContextAllocation();
}
AllocateParameter(var, i);
......@@ -1605,11 +1604,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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment