Commit 817dcf28 authored by bjaideep's avatar bjaideep Committed by Commit bot

PPC: Remove more dead code now that legacy const is gone

Port 757221e5

Original commit message:

    Neither globals nor lookup slots can be hole-initialized anymore, thus
    removing some dead code from the code generators and runtime-scopes.

R=adamk@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com

BUG=
LOG=N

Review-Url: https://codereview.chromium.org/2061443002
Cr-Commit-Position: refs/heads/master@{#36899}
parent 3282b515
......@@ -765,15 +765,8 @@ void FullCodeGenerator::VisitVariableDeclaration(
__ mov(r5, Operand(variable->name()));
// Declaration nodes are always introduced in one of four modes.
DCHECK(IsDeclaredVariableMode(mode));
// Push initial value, if any.
// Note: For variables we must not push an initial value (such as
// 'undefined') because we may have a (legal) redeclaration and we
// must not destroy the current value.
if (hole_init) {
__ LoadRoot(r3, Heap::kTheHoleValueRootIndex);
} else {
__ LoadSmiLiteral(r3, Smi::FromInt(0)); // Indicates no initial value.
}
DCHECK(!hole_init);
__ LoadSmiLiteral(r3, Smi::FromInt(0)); // Indicates no initial value.
__ Push(r5, r3);
__ Push(Smi::FromInt(variable->DeclarationPropertyAttributes()));
__ CallRuntime(Runtime::kDeclareLookupSlot);
......
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