Index: src/arm/builtins-arm.cc |
diff --git a/src/arm/builtins-arm.cc b/src/arm/builtins-arm.cc |
index 578bd810d4050c1be9b6cb1933a1e9bde0886060..12a914b280752023a4b40fe247fd9cc56fc2f156 100644 |
--- a/src/arm/builtins-arm.cc |
+++ b/src/arm/builtins-arm.cc |
@@ -697,6 +697,43 @@ void Builtins::Generate_StringConstructCode(MacroAssembler* masm) { |
} |
+static void GenerateTailCallToSharedCode(MacroAssembler* masm) { |
+ __ ldr(r2, FieldMemOperand(r1, JSFunction::kSharedFunctionInfoOffset)); |
+ __ ldr(r2, FieldMemOperand(r2, SharedFunctionInfo::kCodeOffset)); |
+ __ add(r2, r2, Operand(Code::kHeaderSize - kHeapObjectTag)); |
+ __ mov(pc, r2); |
+} |
+ |
+ |
+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(r1); |
+ // Push call kind information. |
+ __ push(r5); |
+ |
+ __ push(r1); // Function is also the parameter to the runtime call. |
+ __ CallRuntime(Runtime::kParallelRecompile, 1); |
+ |
+ // Restore call kind information. |
+ __ pop(r5); |
+ // Restore receiver. |
+ __ pop(r1); |
+ |
+ // Tear down internal frame. |
+ } |
+ |
+ GenerateTailCallToSharedCode(masm); |
+} |
+ |
+ |
static void Generate_JSConstructStubHelper(MacroAssembler* masm, |
bool is_api_function, |
bool count_constructions) { |