Commit 32f13dfb authored by mbrandy's avatar mbrandy Committed by Commit bot

PPC: Refine "Test for var declarations in eval which conflict with let".

R=joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
BUG=

Review URL: https://codereview.chromium.org/1390953004

Cr-Commit-Position: refs/heads/master@{#31221}
parent cbbfc0ff
......@@ -812,14 +812,11 @@ void FullCodeGenerator::VisitVariableDeclaration(
// must not destroy the current value.
if (hole_init) {
__ LoadRoot(r3, Heap::kTheHoleValueRootIndex);
__ Push(r5, r3);
} else {
__ LoadSmiLiteral(r3, Smi::FromInt(0)); // Indicates no initial value.
__ Push(r5, r3);
}
__ LoadSmiLiteral(
r3, Smi::FromInt(variable->DeclarationPropertyAttributes()));
__ Push(r3);
__ Push(r5, r3);
__ Push(Smi::FromInt(variable->DeclarationPropertyAttributes()));
__ CallRuntime(Runtime::kDeclareLookupSlot, 3);
break;
}
......@@ -871,9 +868,7 @@ void FullCodeGenerator::VisitFunctionDeclaration(
__ Push(r5);
// Push initial value for function declaration.
VisitForStackValue(declaration->fun());
__ LoadSmiLiteral(
r5, Smi::FromInt(variable->DeclarationPropertyAttributes()));
__ Push(r5);
__ Push(Smi::FromInt(variable->DeclarationPropertyAttributes()));
__ CallRuntime(Runtime::kDeclareLookupSlot, 3);
break;
}
......
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