Commit 3b980234 authored by balazs.kilvady's avatar balazs.kilvady Committed by Commit bot

MIPS64: Fix '[runtime] Introduce FastNewStrictArgumentsStub to optimize strict arguments.'

Port 09d84535

Original commit message:
The FastNewStrictArgumentsStub is very similar to the recently added
FastNewRestParameterStub, it's actually almost a copy of it, except that
it doesn't have the fast case we have for the empty rest parameter. This
patch improves strict arguments in TurboFan and fullcodegen by up to 10x
compared to the previous version.

Also introduce proper JSSloppyArgumentsObject and JSStrictArgumentsObject
for the in-object properties instead of having them as constants in the
Heap class.

Drive-by-fix: Use this stub and the FastNewRestParameterStub in the
interpreter to avoid the runtime call overhead for strict arguments
and rest parameter creation.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34003}
parent 8eb09fac
......@@ -1960,7 +1960,7 @@ void Builtins::Generate_Apply(MacroAssembler* masm) {
// Try to create the list from an arguments object.
__ bind(&create_arguments);
__ ld(a2, FieldMemOperand(a0, JSSloppyArgumentsObject::kLengthOffset));
__ ld(a2, FieldMemOperand(a0, JSArgumentsObject::kLengthOffset));
__ ld(a4, FieldMemOperand(a0, JSObject::kElementsOffset));
__ ld(at, FieldMemOperand(a4, FixedArray::kLengthOffset));
__ Branch(&create_runtime, ne, a2, Operand(at));
......
......@@ -5174,7 +5174,7 @@ void FastNewStrictArgumentsStub::Generate(MacroAssembler* masm) {
Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)));
{
__ ld(a1, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset));
__ ld(a0,
__ lw(a0,
FieldMemOperand(a1, SharedFunctionInfo::kFormalParameterCountOffset));
__ Dlsa(a2, a2, a0, kPointerSizeLog2);
__ Daddu(a2, a2, Operand(StandardFrameConstants::kCallerSPOffset -
......@@ -5184,7 +5184,7 @@ void FastNewStrictArgumentsStub::Generate(MacroAssembler* masm) {
__ bind(&arguments_adaptor);
{
__ SmiLoadUntag(
a0, MemOperand(a2, ArgumentsAdaptorFrameConstants::kLengthOffset));
a0, MemOperand(a3, ArgumentsAdaptorFrameConstants::kLengthOffset));
__ Dlsa(a2, a3, a0, kPointerSizeLog2);
__ Daddu(a2, a2, Operand(StandardFrameConstants::kCallerSPOffset -
1 * kPointerSize));
......@@ -5222,7 +5222,7 @@ void FastNewStrictArgumentsStub::Generate(MacroAssembler* masm) {
__ sd(at, FieldMemOperand(a3, 0 * kPointerSize));
__ Dsubu(a2, a2, Operand(1 * kPointerSize));
__ Daddu(a3, a3, Operand(1 * kPointerSize));
__ b(&loop);
__ Branch(&loop);
__ bind(&done_loop);
}
......
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