| Index: src/mips64/code-stubs-mips64.cc
|
| diff --git a/src/mips64/code-stubs-mips64.cc b/src/mips64/code-stubs-mips64.cc
|
| index 6d5b446e661d705c268352a42ca7544e78431aae..33bf9c545436b478ce473acfe542a89f44cca836 100644
|
| --- a/src/mips64/code-stubs-mips64.cc
|
| +++ b/src/mips64/code-stubs-mips64.cc
|
| @@ -2763,24 +2763,13 @@ static void EmitLoadTypeFeedbackVector(MacroAssembler* masm, Register vector) {
|
| }
|
|
|
|
|
| -void CallIC_ArrayStub::Generate(MacroAssembler* masm) {
|
| +void CallICStub::HandleArrayCase(MacroAssembler* masm, Label* miss) {
|
| // a1 - function
|
| // a3 - slot id
|
| // a2 - vector
|
| - Label miss;
|
| -
|
| + // a4 - allocation site (loaded from vector[slot])
|
| __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, at);
|
| - __ Branch(&miss, ne, a1, Operand(at));
|
| -
|
| - __ li(a0, Operand(arg_count()));
|
| - __ dsrl(at, a3, 32 - kPointerSizeLog2);
|
| - __ Daddu(at, a2, Operand(at));
|
| - __ ld(a4, FieldMemOperand(at, FixedArray::kHeaderSize));
|
| -
|
| - // Verify that a4 contains an AllocationSite
|
| - __ ld(a5, FieldMemOperand(a4, HeapObject::kMapOffset));
|
| - __ LoadRoot(at, Heap::kAllocationSiteMapRootIndex);
|
| - __ Branch(&miss, ne, a5, Operand(at));
|
| + __ Branch(miss, ne, a1, Operand(at));
|
|
|
| // Increment the call count for monomorphic function calls.
|
| __ dsrl(t0, a3, 32 - kPointerSizeLog2);
|
| @@ -2793,13 +2782,6 @@ void CallIC_ArrayStub::Generate(MacroAssembler* masm) {
|
| __ mov(a3, a1);
|
| ArrayConstructorStub stub(masm->isolate(), arg_count());
|
| __ TailCallStub(&stub);
|
| -
|
| - __ bind(&miss);
|
| - GenerateMiss(masm);
|
| -
|
| - // The slow case, we need this no matter what to complete a call after a miss.
|
| - __ li(a0, Operand(arg_count()));
|
| - __ Jump(masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET);
|
| }
|
|
|
|
|
| @@ -2874,11 +2856,20 @@ void CallICStub::Generate(MacroAssembler* masm) {
|
| }
|
|
|
| __ bind(&extra_checks_or_miss);
|
| - Label uninitialized, miss;
|
| + Label uninitialized, miss, not_allocation_site;
|
|
|
| __ LoadRoot(at, Heap::kmegamorphic_symbolRootIndex);
|
| __ Branch(&slow_start, eq, a4, Operand(at));
|
|
|
| + // Verify that a4 contains an AllocationSite
|
| + __ ld(a5, FieldMemOperand(a4, HeapObject::kMapOffset));
|
| + __ LoadRoot(at, Heap::kAllocationSiteMapRootIndex);
|
| + __ Branch(¬_allocation_site, ne, a5, Operand(at));
|
| +
|
| + HandleArrayCase(masm, &miss);
|
| +
|
| + __ bind(¬_allocation_site);
|
| +
|
| // The following cases attempt to handle MISS cases without going to the
|
| // runtime.
|
| if (FLAG_trace_ic) {
|
| @@ -2970,10 +2961,7 @@ void CallICStub::GenerateMiss(MacroAssembler* masm) {
|
| __ Push(a1, a2, a3);
|
|
|
| // Call the entry.
|
| - Runtime::FunctionId id = GetICState() == DEFAULT
|
| - ? Runtime::kCallIC_Miss //
|
| - : Runtime::kCallIC_Customization_Miss;
|
| - __ CallRuntime(id, 3);
|
| + __ CallRuntime(Runtime::kCallIC_Miss, 3);
|
|
|
| // Move result to a1 and exit the internal frame.
|
| __ mov(a1, v0);
|
| @@ -4531,13 +4519,6 @@ void CallICTrampolineStub::Generate(MacroAssembler* masm) {
|
| }
|
|
|
|
|
| -void CallIC_ArrayTrampolineStub::Generate(MacroAssembler* masm) {
|
| - EmitLoadTypeFeedbackVector(masm, a2);
|
| - CallIC_ArrayStub stub(isolate(), state());
|
| - __ Jump(stub.GetCode(), RelocInfo::CODE_TARGET);
|
| -}
|
| -
|
| -
|
| void LoadICStub::Generate(MacroAssembler* masm) { GenerateImpl(masm, false); }
|
|
|
|
|
|
|