Index: src/x64/builtins-x64.cc |
diff --git a/src/x64/builtins-x64.cc b/src/x64/builtins-x64.cc |
index a6dc0037098063244db9f6ee3c18bf9a8caa1e8c..26488efaf2486f4487dd81d7f935a20af2a86d33 100644 |
--- a/src/x64/builtins-x64.cc |
+++ b/src/x64/builtins-x64.cc |
@@ -1401,6 +1401,23 @@ void Builtins::Generate_OnStackReplacement(MacroAssembler* masm) { |
} |
+void Builtins::Generate_OsrAfterStackCheck(MacroAssembler* masm) { |
+ // We check the stack limit as indicator that recompilation might be done. |
+ Label ok; |
+ __ CompareRoot(rsp, Heap::kStackLimitRootIndex); |
+ __ j(above_equal, &ok); |
+ { |
+ FrameScope scope(masm, StackFrame::INTERNAL); |
+ __ CallRuntime(Runtime::kStackGuard, 0); |
+ } |
+ __ jmp(masm->isolate()->builtins()->OnStackReplacement(), |
+ RelocInfo::CODE_TARGET); |
+ |
+ __ bind(&ok); |
+ __ ret(0); |
+} |
+ |
+ |
#undef __ |
} } // namespace v8::internal |