| 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 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 751 __ Addu(at, a2, Operand(Code::kHeaderSize - kHeapObjectTag)); | 751 __ Addu(at, a2, Operand(Code::kHeaderSize - kHeapObjectTag)); |
| 752 __ Jump(at); | 752 __ Jump(at); |
| 753 } | 753 } |
| 754 | 754 |
| 755 | 755 |
| 756 void Builtins::Generate_InRecompileQueue(MacroAssembler* masm) { | 756 void Builtins::Generate_InRecompileQueue(MacroAssembler* masm) { |
| 757 GenerateTailCallToSharedCode(masm); | 757 GenerateTailCallToSharedCode(masm); |
| 758 } | 758 } |
| 759 | 759 |
| 760 | 760 |
| 761 void Builtins::Generate_InstallRecompiledCode(MacroAssembler* masm) { |
| 762 // Enter an internal frame. |
| 763 { |
| 764 FrameScope scope(masm, StackFrame::INTERNAL); |
| 765 |
| 766 // Preserve the function. |
| 767 __ push(a1); |
| 768 // Push call kind information. |
| 769 __ push(t1); |
| 770 |
| 771 // Push the function on the stack as the argument to the runtime function. |
| 772 __ push(a1); |
| 773 __ CallRuntime(Runtime::kInstallRecompiledCode, 1); |
| 774 // Calculate the entry point. |
| 775 __ Addu(t9, v0, Operand(Code::kHeaderSize - kHeapObjectTag)); |
| 776 |
| 777 // Restore call kind information. |
| 778 __ pop(t1); |
| 779 // Restore saved function. |
| 780 __ pop(a1); |
| 781 |
| 782 // Tear down temporary frame. |
| 783 } |
| 784 |
| 785 // Do a tail-call of the compiled function. |
| 786 __ Jump(t9); |
| 787 } |
| 788 |
| 789 |
| 761 void Builtins::Generate_ParallelRecompile(MacroAssembler* masm) { | 790 void Builtins::Generate_ParallelRecompile(MacroAssembler* masm) { |
| 762 { | 791 { |
| 763 FrameScope scope(masm, StackFrame::INTERNAL); | 792 FrameScope scope(masm, StackFrame::INTERNAL); |
| 764 | 793 |
| 765 // Push a copy of the function onto the stack. | 794 // Push a copy of the function onto the stack. |
| 766 __ push(a1); | 795 __ push(a1); |
| 767 // Push call kind information. | 796 // Push call kind information. |
| 768 __ push(t1); | 797 __ push(t1); |
| 769 | 798 |
| 770 __ push(a1); // Function is also the parameter to the runtime call. | 799 __ push(a1); // Function is also the parameter to the runtime call. |
| (...skipping 1157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1928 __ bind(&dont_adapt_arguments); | 1957 __ bind(&dont_adapt_arguments); |
| 1929 __ Jump(a3); | 1958 __ Jump(a3); |
| 1930 } | 1959 } |
| 1931 | 1960 |
| 1932 | 1961 |
| 1933 #undef __ | 1962 #undef __ |
| 1934 | 1963 |
| 1935 } } // namespace v8::internal | 1964 } } // namespace v8::internal |
| 1936 | 1965 |
| 1937 #endif // V8_TARGET_ARCH_MIPS | 1966 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |