Index: src/arm/builtins-arm.cc |
diff --git a/src/arm/builtins-arm.cc b/src/arm/builtins-arm.cc |
index 78fbe60a8072fc1e06365c33c8a9d928bfa1dcc8..961bae0bc2bed3d293751c51a606b20e3719d4e4 100644 |
--- a/src/arm/builtins-arm.cc |
+++ b/src/arm/builtins-arm.cc |
@@ -2699,8 +2699,15 @@ void Builtins::Generate_StringToNumber(MacroAssembler* masm) { |
__ Ret(); |
__ bind(&runtime); |
- __ Push(r0); // Push argument. |
- __ TailCallRuntime(Runtime::kStringToNumber); |
+ { |
+ FrameScope frame(masm, StackFrame::INTERNAL); |
+ // Push argument. |
+ __ Push(r0); |
+ // We cannot use a tail call here because this builtin can also be called |
+ // from wasm. |
+ __ CallRuntime(Runtime::kStringToNumber); |
+ } |
+ __ Ret(); |
} |
void Builtins::Generate_ToNumber(MacroAssembler* masm) { |
@@ -2734,9 +2741,15 @@ void Builtins::Generate_NonNumberToNumber(MacroAssembler* masm) { |
__ ldr(r0, FieldMemOperand(r0, Oddball::kToNumberOffset)); |
__ Ret(); |
__ bind(¬_oddball); |
- |
- __ Push(r0); // Push argument. |
- __ TailCallRuntime(Runtime::kToNumber); |
+ { |
+ FrameScope frame(masm, StackFrame::INTERNAL); |
+ // Push argument. |
+ __ Push(r0); |
+ // We cannot use a tail call here because this builtin can also be called |
+ // from wasm. |
+ __ CallRuntime(Runtime::kToNumber); |
+ } |
+ __ Ret(); |
} |
void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { |