Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Side by Side Diff: src/mips/builtins-mips.cc

Issue 1323463005: [Interpreter] Add support for JS calls. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add MIPS port contributed by akos.palfi@imgtec.com Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/interpreter/interpreter.cc ('k') | src/mips/interface-descriptors-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_MIPS 5 #if V8_TARGET_ARCH_MIPS
6 6
7 #include "src/codegen.h" 7 #include "src/codegen.h"
8 #include "src/debug/debug.h" 8 #include "src/debug/debug.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/full-codegen/full-codegen.h" 10 #include "src/full-codegen/full-codegen.h"
(...skipping 1646 matching lines...) Expand 10 before | Expand all | Expand 10 after
1657 __ mov(a1, v0); 1657 __ mov(a1, v0);
1658 __ Pop(a0); 1658 __ Pop(a0);
1659 __ sra(a0, a0, kSmiTagSize); // Un-tag. 1659 __ sra(a0, a0, kSmiTagSize); // Un-tag.
1660 } 1660 }
1661 // The delegate is always a regular function. 1661 // The delegate is always a regular function.
1662 __ AssertFunction(a1); 1662 __ AssertFunction(a1);
1663 __ Jump(masm->isolate()->builtins()->CallFunction(), RelocInfo::CODE_TARGET); 1663 __ Jump(masm->isolate()->builtins()->CallFunction(), RelocInfo::CODE_TARGET);
1664 } 1664 }
1665 1665
1666 1666
1667 // static
1668 void Builtins::Generate_PushArgsAndCall(MacroAssembler* masm) {
1669 // ----------- S t a t e -------------
1670 // -- a0 : the number of arguments (not including the receiver)
1671 // -- a2 : the address of the first argument to be pushed. Subsequent
1672 // arguments should be consecutive above this, in the same order as
1673 // they are to be pushed onto the stack.
1674 // -- a1 : the target to call (can be any Object).
1675
1676 // Find the address of the last argument.
1677 __ Addu(a3, a0, Operand(1)); // Add one for receiver.
1678 __ sll(a3, a3, kPointerSizeLog2);
1679 __ Subu(a3, a2, Operand(a3));
1680
1681 // Push the arguments.
1682 Label loop_header, loop_check;
1683 __ Branch(&loop_check);
1684 __ bind(&loop_header);
1685 __ lw(t0, MemOperand(a2));
1686 __ Addu(a2, a2, Operand(-kPointerSize));
1687 __ push(t0);
1688 __ bind(&loop_check);
1689 __ Branch(&loop_header, gt, a2, Operand(a3));
1690
1691 // Call the target.
1692 __ Jump(masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET);
1693 }
1694
1695
1667 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { 1696 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) {
1668 // State setup as expected by MacroAssembler::InvokePrologue. 1697 // State setup as expected by MacroAssembler::InvokePrologue.
1669 // ----------- S t a t e ------------- 1698 // ----------- S t a t e -------------
1670 // -- a0: actual arguments count 1699 // -- a0: actual arguments count
1671 // -- a1: function (passed through to callee) 1700 // -- a1: function (passed through to callee)
1672 // -- a2: expected arguments count 1701 // -- a2: expected arguments count
1673 // ----------------------------------- 1702 // -----------------------------------
1674 1703
1675 Label stack_overflow; 1704 Label stack_overflow;
1676 ArgumentAdaptorStackCheck(masm, &stack_overflow); 1705 ArgumentAdaptorStackCheck(masm, &stack_overflow);
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
1816 } 1845 }
1817 } 1846 }
1818 1847
1819 1848
1820 #undef __ 1849 #undef __
1821 1850
1822 } // namespace internal 1851 } // namespace internal
1823 } // namespace v8 1852 } // namespace v8
1824 1853
1825 #endif // V8_TARGET_ARCH_MIPS 1854 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/interpreter/interpreter.cc ('k') | src/mips/interface-descriptors-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698