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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 __ lea(eax, FieldOperand(eax, Code::kHeaderSize)); | 80 __ lea(eax, FieldOperand(eax, Code::kHeaderSize)); |
81 __ jmp(eax); | 81 __ jmp(eax); |
82 } | 82 } |
83 | 83 |
84 | 84 |
85 void Builtins::Generate_InRecompileQueue(MacroAssembler* masm) { | 85 void Builtins::Generate_InRecompileQueue(MacroAssembler* masm) { |
86 GenerateTailCallToSharedCode(masm); | 86 GenerateTailCallToSharedCode(masm); |
87 } | 87 } |
88 | 88 |
89 | 89 |
| 90 void Builtins::Generate_InstallRecompiledCode(MacroAssembler* masm) { |
| 91 { |
| 92 FrameScope scope(masm, StackFrame::INTERNAL); |
| 93 |
| 94 // Push a copy of the function. |
| 95 __ push(edi); |
| 96 // Push call kind information. |
| 97 __ push(ecx); |
| 98 |
| 99 __ push(edi); // Function is also the parameter to the runtime call. |
| 100 __ CallRuntime(Runtime::kInstallRecompiledCode, 1); |
| 101 |
| 102 // Restore call kind information. |
| 103 __ pop(ecx); |
| 104 // Restore receiver. |
| 105 __ pop(edi); |
| 106 |
| 107 // Tear down internal frame. |
| 108 } |
| 109 |
| 110 // Do a tail-call of the compiled function. |
| 111 __ lea(eax, FieldOperand(eax, Code::kHeaderSize)); |
| 112 __ jmp(eax); |
| 113 } |
| 114 |
| 115 |
90 void Builtins::Generate_ParallelRecompile(MacroAssembler* masm) { | 116 void Builtins::Generate_ParallelRecompile(MacroAssembler* masm) { |
91 { | 117 { |
92 FrameScope scope(masm, StackFrame::INTERNAL); | 118 FrameScope scope(masm, StackFrame::INTERNAL); |
93 | 119 |
94 // Push a copy of the function onto the stack. | 120 // Push a copy of the function onto the stack. |
95 __ push(edi); | 121 __ push(edi); |
96 // Push call kind information. | 122 // Push call kind information. |
97 __ push(ecx); | 123 __ push(ecx); |
98 | 124 |
99 __ push(edi); // Function is also the parameter to the runtime call. | 125 __ push(edi); // Function is also the parameter to the runtime call. |
(...skipping 1756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1856 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR); | 1882 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR); |
1857 generator.Generate(); | 1883 generator.Generate(); |
1858 } | 1884 } |
1859 | 1885 |
1860 | 1886 |
1861 #undef __ | 1887 #undef __ |
1862 } | 1888 } |
1863 } // namespace v8::internal | 1889 } // namespace v8::internal |
1864 | 1890 |
1865 #endif // V8_TARGET_ARCH_IA32 | 1891 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |