Index: src/mips64/builtins-mips64.cc |
diff --git a/src/mips64/builtins-mips64.cc b/src/mips64/builtins-mips64.cc |
index 9c817ab563af91a951c02026178ba839a907bfa6..6d0f1f02b480ed6855f1d0cab2d966f08ab922ca 100644 |
--- a/src/mips64/builtins-mips64.cc |
+++ b/src/mips64/builtins-mips64.cc |
@@ -2762,8 +2762,15 @@ void Builtins::Generate_StringToNumber(MacroAssembler* masm) { |
__ Ret(); |
__ bind(&runtime); |
- __ Push(a0); // Push argument. |
- __ TailCallRuntime(Runtime::kStringToNumber); |
+ { |
+ FrameScope frame(masm, StackFrame::INTERNAL); |
+ // Push argument. |
+ __ Push(a0); |
+ // We cannot use a tail call here because this builtin can also be called |
+ // from wasm. |
+ __ CallRuntime(Runtime::kStringToNumber); |
+ } |
+ __ Ret(); |
} |
// static |
@@ -2807,9 +2814,15 @@ void Builtins::Generate_NonNumberToNumber(MacroAssembler* masm) { |
__ Ret(USE_DELAY_SLOT); |
__ ld(v0, FieldMemOperand(a0, Oddball::kToNumberOffset)); // In delay slot. |
__ bind(¬_oddball); |
- |
- __ Push(a0); // Push argument. |
- __ TailCallRuntime(Runtime::kToNumber); |
+ { |
+ FrameScope frame(masm, StackFrame::INTERNAL); |
+ // Push argument. |
+ __ Push(a0); |
+ // 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) { |