Index: src/arm/builtins-arm.cc |
diff --git a/src/arm/builtins-arm.cc b/src/arm/builtins-arm.cc |
index ec1b227565795e02363d5a63114747cdb31c9ef9..4782b28228f0b62138f75645e8b0ea19bba9232a 100644 |
--- a/src/arm/builtins-arm.cc |
+++ b/src/arm/builtins-arm.cc |
@@ -955,6 +955,24 @@ 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; |
+ __ LoadRoot(ip, Heap::kStackLimitRootIndex); |
+ __ cmp(sp, Operand(ip)); |
+ __ b(hs, &ok); |
+ { |
+ FrameScope scope(masm, StackFrame::INTERNAL); |
+ __ CallRuntime(Runtime::kStackGuard, 0); |
+ } |
+ __ Jump(masm->isolate()->builtins()->OnStackReplacement(), |
+ RelocInfo::CODE_TARGET); |
+ |
+ __ bind(&ok); |
+ __ Ret(); |
+} |
+ |
+ |
void Builtins::Generate_FunctionCall(MacroAssembler* masm) { |
// 1. Make sure we have at least one argument. |
// r0: actual number of arguments |