| Index: src/x64/builtins-x64.cc
|
| diff --git a/src/x64/builtins-x64.cc b/src/x64/builtins-x64.cc
|
| index 5905b7cc127e7d5cac4d6a6d296fd36e0c95832b..92338e0af31a29be68783d9c897f074a6187a4cc 100644
|
| --- a/src/x64/builtins-x64.cc
|
| +++ b/src/x64/builtins-x64.cc
|
| @@ -2094,10 +2094,15 @@ void Builtins::Generate_StringToNumber(MacroAssembler* masm) {
|
| __ Ret();
|
|
|
| __ bind(&runtime);
|
| - __ PopReturnAddressTo(rcx); // Pop return address.
|
| - __ Push(rax); // Push argument.
|
| - __ PushReturnAddressFrom(rcx); // Push return address.
|
| - __ TailCallRuntime(Runtime::kStringToNumber);
|
| + {
|
| + FrameScope frame(masm, StackFrame::INTERNAL);
|
| + // Push argument.
|
| + __ Push(rax);
|
| + // We cannot use a tail call here because this builtin can also be called
|
| + // from wasm.
|
| + __ CallRuntime(Runtime::kStringToNumber);
|
| + }
|
| + __ Ret();
|
| }
|
|
|
| // static
|
| @@ -2139,11 +2144,15 @@ void Builtins::Generate_NonNumberToNumber(MacroAssembler* masm) {
|
| __ movp(rax, FieldOperand(rax, Oddball::kToNumberOffset));
|
| __ Ret();
|
| __ bind(¬_oddball);
|
| -
|
| - __ PopReturnAddressTo(rcx); // Pop return address.
|
| - __ Push(rax); // Push argument.
|
| - __ PushReturnAddressFrom(rcx); // Push return address.
|
| - __ TailCallRuntime(Runtime::kToNumber);
|
| + {
|
| + FrameScope frame(masm, StackFrame::INTERNAL);
|
| + // Push argument.
|
| + __ Push(rax);
|
| + // 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) {
|
|
|