| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 // Get the receiver of the function from the stack. | 505 // Get the receiver of the function from the stack. |
| 506 __ lw(a3, MemOperand(sp, argc*kPointerSize)); | 506 __ lw(a3, MemOperand(sp, argc*kPointerSize)); |
| 507 | 507 |
| 508 { | 508 { |
| 509 FrameScope scope(masm, StackFrame::INTERNAL); | 509 FrameScope scope(masm, StackFrame::INTERNAL); |
| 510 | 510 |
| 511 // Push the receiver and the name of the function. | 511 // Push the receiver and the name of the function. |
| 512 __ Push(a3, a2); | 512 __ Push(a3, a2); |
| 513 | 513 |
| 514 // Call the entry. | 514 // Call the entry. |
| 515 __ li(a0, Operand(2)); | 515 __ PrepareCEntryArgs(2); |
| 516 __ li(a1, Operand(ExternalReference(IC_Utility(id), isolate))); | 516 __ PrepareCEntryFunction(ExternalReference(IC_Utility(id), isolate)); |
| 517 | 517 |
| 518 CEntryStub stub(1); | 518 CEntryStub stub(1); |
| 519 __ CallStub(&stub); | 519 __ CallStub(&stub); |
| 520 | 520 |
| 521 // Move result to a1 and leave the internal frame. | 521 // Move result to a1 and leave the internal frame. |
| 522 __ mov(a1, v0); | 522 __ mov(a1, v0); |
| 523 } | 523 } |
| 524 | 524 |
| 525 // Check if the receiver is a global object of some sort. | 525 // Check if the receiver is a global object of some sort. |
| 526 // This can happen only for regular CallIC but not KeyedCallIC. | 526 // This can happen only for regular CallIC but not KeyedCallIC. |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 837 | 837 |
| 838 void KeyedLoadIC::GenerateNonStrictArguments(MacroAssembler* masm) { | 838 void KeyedLoadIC::GenerateNonStrictArguments(MacroAssembler* masm) { |
| 839 // ---------- S t a t e -------------- | 839 // ---------- S t a t e -------------- |
| 840 // -- lr : return address | 840 // -- lr : return address |
| 841 // -- a0 : key | 841 // -- a0 : key |
| 842 // -- a1 : receiver | 842 // -- a1 : receiver |
| 843 // ----------------------------------- | 843 // ----------------------------------- |
| 844 Label slow, notin; | 844 Label slow, notin; |
| 845 MemOperand mapped_location = | 845 MemOperand mapped_location = |
| 846 GenerateMappedArgumentsLookup(masm, a1, a0, a2, a3, t0, ¬in, &slow); | 846 GenerateMappedArgumentsLookup(masm, a1, a0, a2, a3, t0, ¬in, &slow); |
| 847 __ Ret(USE_DELAY_SLOT); |
| 847 __ lw(v0, mapped_location); | 848 __ lw(v0, mapped_location); |
| 848 __ Ret(); | |
| 849 __ bind(¬in); | 849 __ bind(¬in); |
| 850 // The unmapped lookup expects that the parameter map is in a2. | 850 // The unmapped lookup expects that the parameter map is in a2. |
| 851 MemOperand unmapped_location = | 851 MemOperand unmapped_location = |
| 852 GenerateUnmappedArgumentsLookup(masm, a0, a2, a3, &slow); | 852 GenerateUnmappedArgumentsLookup(masm, a0, a2, a3, &slow); |
| 853 __ lw(a2, unmapped_location); | 853 __ lw(a2, unmapped_location); |
| 854 __ LoadRoot(a3, Heap::kTheHoleValueRootIndex); | 854 __ LoadRoot(a3, Heap::kTheHoleValueRootIndex); |
| 855 __ Branch(&slow, eq, a2, Operand(a3)); | 855 __ Branch(&slow, eq, a2, Operand(a3)); |
| 856 __ Ret(USE_DELAY_SLOT); |
| 856 __ mov(v0, a2); | 857 __ mov(v0, a2); |
| 857 __ Ret(); | |
| 858 __ bind(&slow); | 858 __ bind(&slow); |
| 859 GenerateMiss(masm, false); | 859 GenerateMiss(masm, false); |
| 860 } | 860 } |
| 861 | 861 |
| 862 | 862 |
| 863 void KeyedStoreIC::GenerateNonStrictArguments(MacroAssembler* masm) { | 863 void KeyedStoreIC::GenerateNonStrictArguments(MacroAssembler* masm) { |
| 864 // ---------- S t a t e -------------- | 864 // ---------- S t a t e -------------- |
| 865 // -- a0 : value | 865 // -- a0 : value |
| 866 // -- a1 : key | 866 // -- a1 : key |
| 867 // -- a2 : receiver | 867 // -- a2 : receiver |
| (...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1752 Register reg = Register::from_code(Assembler::GetRs(instr_at_patch)); | 1752 Register reg = Register::from_code(Assembler::GetRs(instr_at_patch)); |
| 1753 patcher.masm()->andi(at, reg, kSmiTagMask); | 1753 patcher.masm()->andi(at, reg, kSmiTagMask); |
| 1754 patcher.ChangeBranchCondition(eq); | 1754 patcher.ChangeBranchCondition(eq); |
| 1755 } | 1755 } |
| 1756 } | 1756 } |
| 1757 | 1757 |
| 1758 | 1758 |
| 1759 } } // namespace v8::internal | 1759 } } // namespace v8::internal |
| 1760 | 1760 |
| 1761 #endif // V8_TARGET_ARCH_MIPS | 1761 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |