| Index: src/x87/code-stubs-x87.cc
|
| diff --git a/src/x87/code-stubs-x87.cc b/src/x87/code-stubs-x87.cc
|
| index b9221644591a76aa0e65c2cbae8716ca63ed39cc..7b069ac6292c98ee220bf1465f49a676811c98c2 100644
|
| --- a/src/x87/code-stubs-x87.cc
|
| +++ b/src/x87/code-stubs-x87.cc
|
| @@ -4366,8 +4366,11 @@ void FastNewRestParameterStub::Generate(MacroAssembler* masm) {
|
| __ mov(eax, edi);
|
| __ Ret();
|
|
|
| - // Fall back to %AllocateInNewSpace.
|
| + // Fall back to %AllocateInNewSpace (if not too big).
|
| + Label too_big_for_new_space;
|
| __ bind(&allocate);
|
| + __ cmp(ecx, Immediate(Page::kMaxRegularHeapObjectSize));
|
| + __ j(greater, &too_big_for_new_space);
|
| {
|
| FrameScope scope(masm, StackFrame::INTERNAL);
|
| __ SmiTag(ecx);
|
| @@ -4380,6 +4383,22 @@ void FastNewRestParameterStub::Generate(MacroAssembler* masm) {
|
| __ Pop(eax);
|
| }
|
| __ jmp(&done_allocate);
|
| +
|
| + // Fall back to %NewRestParameter.
|
| + __ bind(&too_big_for_new_space);
|
| + __ PopReturnAddressTo(ecx);
|
| + // We reload the function from the caller frame due to register pressure
|
| + // within this stub. This is the slow path, hence reloading is preferable.
|
| + if (skip_stub_frame()) {
|
| + // For Ignition we need to skip the handler/stub frame to reach the
|
| + // JavaScript frame for the function.
|
| + __ mov(edx, Operand(ebp, StandardFrameConstants::kCallerFPOffset));
|
| + __ Push(Operand(edx, StandardFrameConstants::kFunctionOffset));
|
| + } else {
|
| + __ Push(Operand(ebp, StandardFrameConstants::kFunctionOffset));
|
| + }
|
| + __ PushReturnAddressFrom(ecx);
|
| + __ TailCallRuntime(Runtime::kNewRestParameter);
|
| }
|
| }
|
|
|
| @@ -4734,8 +4753,11 @@ void FastNewStrictArgumentsStub::Generate(MacroAssembler* masm) {
|
| __ mov(eax, edi);
|
| __ Ret();
|
|
|
| - // Fall back to %AllocateInNewSpace.
|
| + // Fall back to %AllocateInNewSpace (if not too big).
|
| + Label too_big_for_new_space;
|
| __ bind(&allocate);
|
| + __ cmp(ecx, Immediate(Page::kMaxRegularHeapObjectSize));
|
| + __ j(greater, &too_big_for_new_space);
|
| {
|
| FrameScope scope(masm, StackFrame::INTERNAL);
|
| __ SmiTag(ecx);
|
| @@ -4748,6 +4770,22 @@ void FastNewStrictArgumentsStub::Generate(MacroAssembler* masm) {
|
| __ Pop(eax);
|
| }
|
| __ jmp(&done_allocate);
|
| +
|
| + // Fall back to %NewStrictArguments.
|
| + __ bind(&too_big_for_new_space);
|
| + __ PopReturnAddressTo(ecx);
|
| + // We reload the function from the caller frame due to register pressure
|
| + // within this stub. This is the slow path, hence reloading is preferable.
|
| + if (skip_stub_frame()) {
|
| + // For Ignition we need to skip the handler/stub frame to reach the
|
| + // JavaScript frame for the function.
|
| + __ mov(edx, Operand(ebp, StandardFrameConstants::kCallerFPOffset));
|
| + __ Push(Operand(edx, StandardFrameConstants::kFunctionOffset));
|
| + } else {
|
| + __ Push(Operand(ebp, StandardFrameConstants::kFunctionOffset));
|
| + }
|
| + __ PushReturnAddressFrom(ecx);
|
| + __ TailCallRuntime(Runtime::kNewStrictArguments);
|
| }
|
|
|
| void StoreGlobalViaContextStub::Generate(MacroAssembler* masm) {
|
|
|