Chromium Code Reviews| Index: src/ia32/builtins-ia32.cc |
| diff --git a/src/ia32/builtins-ia32.cc b/src/ia32/builtins-ia32.cc |
| index be46ff216f4b737771a4bddd4e97f815eed25733..41296b9581e86a6b6ae50dfefcd619f6ba7b43ae 100644 |
| --- a/src/ia32/builtins-ia32.cc |
| +++ b/src/ia32/builtins-ia32.cc |
| @@ -74,6 +74,43 @@ void Builtins::Generate_Adaptor(MacroAssembler* masm, |
| } |
| +static void GenerateTailCallToSharedCode(MacroAssembler* masm) { |
| + __ mov(eax, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); |
| + __ mov(eax, FieldOperand(eax, SharedFunctionInfo::kCodeOffset)); |
| + __ add(eax, Immediate(Code::kHeaderSize - kHeapObjectTag)); |
|
Yang
2012/07/19 12:47:30
Use the lea instruction and FieldOperand would be
sanjoy
2012/07/19 15:06:09
Done.
|
| + __ jmp(eax); |
| +} |
| + |
| + |
| +void Builtins::Generate_InRecompileQueue(MacroAssembler* masm) { |
| + GenerateTailCallToSharedCode(masm); |
| +} |
| + |
| + |
| +void Builtins::Generate_ParallelRecompile(MacroAssembler* masm) { |
| + { |
| + FrameScope scope(masm, StackFrame::INTERNAL); |
| + |
| + // Push a copy of the function onto the stack. |
| + __ push(edi); |
| + // Push call kind information. |
| + __ push(ecx); |
| + |
| + __ push(edi); // Function is also the parameter to the runtime call. |
| + __ CallRuntime(Runtime::kParallelRecompile, 1); |
| + |
| + // Restore call kind information. |
| + __ pop(ecx); |
| + // Restore receiver. |
| + __ pop(edi); |
| + |
| + // Tear down internal frame. |
| + } |
| + |
| + GenerateTailCallToSharedCode(masm); |
| +} |
| + |
| + |
| static void Generate_JSConstructStubHelper(MacroAssembler* masm, |
| bool is_api_function, |
| bool count_constructions) { |