| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 | 60 |
| 61 // Insert extra arguments. | 61 // Insert extra arguments. |
| 62 int num_extra_args = 0; | 62 int num_extra_args = 0; |
| 63 if (extra_args == NEEDS_CALLED_FUNCTION) { | 63 if (extra_args == NEEDS_CALLED_FUNCTION) { |
| 64 num_extra_args = 1; | 64 num_extra_args = 1; |
| 65 __ push(a1); | 65 __ push(a1); |
| 66 } else { | 66 } else { |
| 67 ASSERT(extra_args == NO_EXTRA_ARGUMENTS); | 67 ASSERT(extra_args == NO_EXTRA_ARGUMENTS); |
| 68 } | 68 } |
| 69 | 69 |
| 70 // JumpToExternalReference expects a0 to contain the number of arguments | 70 // JumpToExternalReference expects s0 to contain the number of arguments |
| 71 // including the receiver and the extra arguments. | 71 // including the receiver and the extra arguments. |
| 72 __ Addu(a0, a0, Operand(num_extra_args + 1)); | 72 __ Addu(s0, a0, num_extra_args + 1); |
| 73 __ sll(s1, s0, kPointerSizeLog2); |
| 74 __ Subu(s1, s1, kPointerSize); |
| 73 __ JumpToExternalReference(ExternalReference(id, masm->isolate())); | 75 __ JumpToExternalReference(ExternalReference(id, masm->isolate())); |
| 74 } | 76 } |
| 75 | 77 |
| 76 | 78 |
| 77 // Load the built-in InternalArray function from the current context. | 79 // Load the built-in InternalArray function from the current context. |
| 78 static void GenerateLoadInternalArrayFunction(MacroAssembler* masm, | 80 static void GenerateLoadInternalArrayFunction(MacroAssembler* masm, |
| 79 Register result) { | 81 Register result) { |
| 80 // Load the global context. | 82 // Load the global context. |
| 81 | 83 |
| 82 __ lw(result, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX))); | 84 __ lw(result, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX))); |
| (...skipping 1713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1796 __ bind(&dont_adapt_arguments); | 1798 __ bind(&dont_adapt_arguments); |
| 1797 __ Jump(a3); | 1799 __ Jump(a3); |
| 1798 } | 1800 } |
| 1799 | 1801 |
| 1800 | 1802 |
| 1801 #undef __ | 1803 #undef __ |
| 1802 | 1804 |
| 1803 } } // namespace v8::internal | 1805 } } // namespace v8::internal |
| 1804 | 1806 |
| 1805 #endif // V8_TARGET_ARCH_MIPS | 1807 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |