# HG changeset patch # User Jan de Mooij # Date 1517414044 -3600 # Node ID d05ac6fbc0398adee2b0c448731927008dc7950c # Parent f123437df777ef2d4ccee179738f7db6bb1ba317 Bug 1434279 - Remove unused EmitStowICValues. r=evilpie diff --git a/js/src/jit/arm/SharedICHelpers-arm.h b/js/src/jit/arm/SharedICHelpers-arm.h --- a/js/src/jit/arm/SharedICHelpers-arm.h +++ b/js/src/jit/arm/SharedICHelpers-arm.h @@ -100,33 +100,16 @@ EmitBaselineLeaveStubFrame(MacroAssemble // Load the return address. masm.Pop(ICTailCallReg); // Discard the frame descriptor. masm.Pop(scratch); } -inline void -EmitStowICValues(MacroAssembler& masm, int values) -{ - MOZ_ASSERT(values >= 0 && values <= 2); - switch(values) { - case 1: - // Stow R0. - masm.Push(R0); - break; - case 2: - // Stow R0 and R1. - masm.Push(R0); - masm.Push(R1); - break; - } -} - template inline void EmitPreBarrier(MacroAssembler& masm, const AddrType& addr, MIRType type) { // On ARM, lr is clobbered by guardedCallPreBarrier. Save it first. masm.push(lr); masm.guardedCallPreBarrier(addr, type); masm.pop(lr); diff --git a/js/src/jit/arm64/SharedICHelpers-arm64.h b/js/src/jit/arm64/SharedICHelpers-arm64.h --- a/js/src/jit/arm64/SharedICHelpers-arm64.h +++ b/js/src/jit/arm64/SharedICHelpers-arm64.h @@ -98,34 +98,16 @@ EmitBaselineLeaveStubFrame(MacroAssemble // Pop values, discarding the frame descriptor. masm.pop(BaselineFrameReg, ICStubReg, ICTailCallReg, scratch64.asUnsized()); // Stack should remain 16-byte aligned. masm.checkStackAlignment(); } -inline void -EmitStowICValues(MacroAssembler& masm, int values) -{ - switch (values) { - case 1: - // Stow R0. - masm.Push(R0); - break; - case 2: - // Stow R0 and R1. - masm.Push(R0.valueReg()); - masm.Push(R1.valueReg()); - break; - default: - MOZ_MAKE_COMPILER_ASSUME_IS_UNREACHABLE("Expected 1 or 2 values"); - } -} - template inline void EmitPreBarrier(MacroAssembler& masm, const AddrType& addr, MIRType type) { // On AArch64, lr is clobbered by guardedCallPreBarrier. Save it first. masm.push(lr); masm.guardedCallPreBarrier(addr, type); masm.pop(lr); diff --git a/js/src/jit/mips-shared/SharedICHelpers-mips-shared.h b/js/src/jit/mips-shared/SharedICHelpers-mips-shared.h --- a/js/src/jit/mips-shared/SharedICHelpers-mips-shared.h +++ b/js/src/jit/mips-shared/SharedICHelpers-mips-shared.h @@ -112,32 +112,16 @@ EmitBaselineLeaveStubFrame(MacroAssemble masm.loadPtr(Address(StackPointer, offsetof(BaselineStubFrame, returnAddress)), ICTailCallReg); // Discard the frame descriptor. masm.loadPtr(Address(StackPointer, offsetof(BaselineStubFrame, descriptor)), ScratchRegister); masm.addPtr(Imm32(STUB_FRAME_SIZE), StackPointer); } -inline void -EmitStowICValues(MacroAssembler& masm, int values) -{ - MOZ_ASSERT(values >= 0 && values <= 2); - switch(values) { - case 1: - // Stow R0 - masm.Push(R0); - break; - case 2: - // Stow R0 and R1 - masm.Push(R0); - masm.Push(R1); - } -} - template inline void EmitPreBarrier(MacroAssembler& masm, const AddrType& addr, MIRType type) { // On MIPS, $ra is clobbered by guardedCallPreBarrier. Save it first. masm.push(ra); masm.guardedCallPreBarrier(addr, type); masm.pop(ra); diff --git a/js/src/jit/none/SharedICHelpers-none.h b/js/src/jit/none/SharedICHelpers-none.h --- a/js/src/jit/none/SharedICHelpers-none.h +++ b/js/src/jit/none/SharedICHelpers-none.h @@ -14,17 +14,16 @@ static const size_t ICStackValueOffset = inline void EmitRestoreTailCallReg(MacroAssembler&) { MOZ_CRASH(); } inline void EmitRepushTailCallReg(MacroAssembler&) { MOZ_CRASH(); } inline void EmitCallIC(CodeOffset*, MacroAssembler&) { MOZ_CRASH(); } inline void EmitEnterTypeMonitorIC(MacroAssembler&, size_t v = 0) { MOZ_CRASH(); } inline void EmitReturnFromIC(MacroAssembler&) { MOZ_CRASH(); } inline void EmitChangeICReturnAddress(MacroAssembler&, Register) { MOZ_CRASH(); } inline void EmitBaselineLeaveStubFrame(MacroAssembler&, bool v = false) { MOZ_CRASH(); } -inline void EmitStowICValues(MacroAssembler&, int) { MOZ_CRASH(); } inline void EmitStubGuardFailure(MacroAssembler&) { MOZ_CRASH(); } template inline void EmitPreBarrier(MacroAssembler&, T, MIRType) { MOZ_CRASH(); } } // namespace jit } // namespace js #endif /* jit_none_SharedICHelpers_none_h */ diff --git a/js/src/jit/x64/SharedICHelpers-x64.h b/js/src/jit/x64/SharedICHelpers-x64.h --- a/js/src/jit/x64/SharedICHelpers-x64.h +++ b/js/src/jit/x64/SharedICHelpers-x64.h @@ -90,37 +90,16 @@ EmitBaselineLeaveStubFrame(MacroAssemble // The return address is on top of the stack, followed by the frame // descriptor. Use a pop instruction to overwrite the frame descriptor // with the return address. Note that pop increments the stack pointer // before computing the address. masm.Pop(Operand(BaselineStackReg, 0)); } -inline void -EmitStowICValues(MacroAssembler& masm, int values) -{ - MOZ_ASSERT(values >= 0 && values <= 2); - switch(values) { - case 1: - // Stow R0 - masm.pop(ICTailCallReg); - masm.Push(R0); - masm.push(ICTailCallReg); - break; - case 2: - // Stow R0 and R1 - masm.pop(ICTailCallReg); - masm.Push(R0); - masm.Push(R1); - masm.push(ICTailCallReg); - break; - } -} - template inline void EmitPreBarrier(MacroAssembler& masm, const AddrType& addr, MIRType type) { masm.guardedCallPreBarrier(addr, type); } inline void diff --git a/js/src/jit/x86/SharedICHelpers-x86.h b/js/src/jit/x86/SharedICHelpers-x86.h --- a/js/src/jit/x86/SharedICHelpers-x86.h +++ b/js/src/jit/x86/SharedICHelpers-x86.h @@ -91,37 +91,16 @@ EmitBaselineLeaveStubFrame(MacroAssemble // The return address is on top of the stack, followed by the frame // descriptor. Use a pop instruction to overwrite the frame descriptor // with the return address. Note that pop increments the stack pointer // before computing the address. masm.Pop(Operand(BaselineStackReg, 0)); } -inline void -EmitStowICValues(MacroAssembler& masm, int values) -{ - MOZ_ASSERT(values >= 0 && values <= 2); - switch(values) { - case 1: - // Stow R0 - masm.pop(ICTailCallReg); - masm.Push(R0); - masm.push(ICTailCallReg); - break; - case 2: - // Stow R0 and R1 - masm.pop(ICTailCallReg); - masm.Push(R0); - masm.Push(R1); - masm.push(ICTailCallReg); - break; - } -} - template inline void EmitPreBarrier(MacroAssembler& masm, const AddrType& addr, MIRType type) { masm.guardedCallPreBarrier(addr, type); } inline void