| Index: src/x64/builtins-x64.cc
|
| diff --git a/src/x64/builtins-x64.cc b/src/x64/builtins-x64.cc
|
| index a6dc0037098063244db9f6ee3c18bf9a8caa1e8c..aa2fdc194dee55cbf19d4c21c7ec36fcec098ac7 100644
|
| --- a/src/x64/builtins-x64.cc
|
| +++ b/src/x64/builtins-x64.cc
|
| @@ -694,21 +694,6 @@ void Builtins::Generate_NotifyLazyDeoptimized(MacroAssembler* masm) {
|
| }
|
|
|
|
|
| -void Builtins::Generate_NotifyOSR(MacroAssembler* masm) {
|
| - // For now, we are relying on the fact that Runtime::NotifyOSR
|
| - // doesn't do any garbage collection which allows us to save/restore
|
| - // the registers without worrying about which of them contain
|
| - // pointers. This seems a bit fragile.
|
| - __ Pushad();
|
| - {
|
| - FrameScope scope(masm, StackFrame::INTERNAL);
|
| - __ CallRuntime(Runtime::kNotifyOSR, 0);
|
| - }
|
| - __ Popad();
|
| - __ ret(0);
|
| -}
|
| -
|
| -
|
| void Builtins::Generate_FunctionCall(MacroAssembler* masm) {
|
| // Stack Layout:
|
| // rsp[0] : Return address
|
| @@ -1401,6 +1386,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
|
|
|