| Index: src/x64/code-stubs-x64.cc
|
| diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc
|
| index 23c43e359baf1c009f151a36d7e45c63070f649e..9ef0c0330cb4270f25fc0e885a2b6bf518b5f86a 100644
|
| --- a/src/x64/code-stubs-x64.cc
|
| +++ b/src/x64/code-stubs-x64.cc
|
| @@ -2122,6 +2122,7 @@ void CallIC_ArrayStub::Generate(MacroAssembler* masm) {
|
| __ j(not_equal, &miss);
|
|
|
| __ movp(rbx, rcx);
|
| + __ movp(rdx, rdi);
|
| ArrayConstructorStub stub(masm->isolate(), arg_count());
|
| __ TailCallStub(&stub);
|
|
|
| @@ -4573,6 +4574,7 @@ void ArrayConstructorStub::Generate(MacroAssembler* masm) {
|
| // -- rax : argc
|
| // -- rbx : AllocationSite or undefined
|
| // -- rdi : constructor
|
| + // -- rdx : original constructor
|
| // -- rsp[0] : return address
|
| // -- rsp[8] : last argument
|
| // -----------------------------------
|
| @@ -4593,6 +4595,10 @@ void ArrayConstructorStub::Generate(MacroAssembler* masm) {
|
| __ AssertUndefinedOrAllocationSite(rbx);
|
| }
|
|
|
| + Label subclassing;
|
| + __ cmpp(rdi, rdx);
|
| + __ j(not_equal, &subclassing);
|
| +
|
| Label no_info;
|
| // If the feedback vector is the undefined value call an array constructor
|
| // that doesn't use AllocationSites.
|
| @@ -4608,6 +4614,9 @@ void ArrayConstructorStub::Generate(MacroAssembler* masm) {
|
|
|
| __ bind(&no_info);
|
| GenerateDispatchToArrayStub(masm, DISABLE_ALLOCATION_SITES);
|
| +
|
| + __ bind(&subclassing);
|
| + __ TailCallRuntime(Runtime::kThrowArrayNotSubclassableError, 0, 1);
|
| }
|
|
|
|
|
|
|