| Index: src/x87/builtins-x87.cc
|
| diff --git a/src/x87/builtins-x87.cc b/src/x87/builtins-x87.cc
|
| index 7c8c784984d2411a87603c5fe1bb09f7984dd933..0600f0d3ccc809953a6019de7fe4d2fc7443ca6e 100644
|
| --- a/src/x87/builtins-x87.cc
|
| +++ b/src/x87/builtins-x87.cc
|
| @@ -2692,10 +2692,15 @@ void Builtins::Generate_StringToNumber(MacroAssembler* masm) {
|
| __ Ret();
|
|
|
| __ bind(&runtime);
|
| - __ PopReturnAddressTo(ecx); // Pop return address.
|
| - __ Push(eax); // Push argument.
|
| - __ PushReturnAddressFrom(ecx); // Push return address.
|
| - __ TailCallRuntime(Runtime::kStringToNumber);
|
| + {
|
| + FrameScope frame(masm, StackFrame::INTERNAL);
|
| + // Push argument.
|
| + __ push(eax);
|
| + // We cannot use a tail call here because this builtin can also be called
|
| + // from wasm.
|
| + __ CallRuntime(Runtime::kStringToNumber);
|
| + }
|
| + __ Ret();
|
| }
|
|
|
| // static
|
| @@ -2736,11 +2741,15 @@ void Builtins::Generate_NonNumberToNumber(MacroAssembler* masm) {
|
| __ mov(eax, FieldOperand(eax, Oddball::kToNumberOffset));
|
| __ Ret();
|
| __ bind(¬_oddball);
|
| -
|
| - __ pop(ecx); // Pop return address.
|
| - __ push(eax); // Push argument.
|
| - __ push(ecx); // Push return address.
|
| - __ TailCallRuntime(Runtime::kToNumber);
|
| + {
|
| + FrameScope frame(masm, StackFrame::INTERNAL);
|
| + // Push argument.
|
| + __ push(eax);
|
| + // 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) {
|
|
|