Chromium Code Reviews| Index: src/arm64/builtins-arm64.cc |
| diff --git a/src/arm64/builtins-arm64.cc b/src/arm64/builtins-arm64.cc |
| index 75e5f88fef7fdcb29e5a5838d79db806cd42574a..470f370d7eba81058747dc7984c3f3dd40f1e205 100644 |
| --- a/src/arm64/builtins-arm64.cc |
| +++ b/src/arm64/builtins-arm64.cc |
| @@ -2792,8 +2792,15 @@ void Builtins::Generate_StringToNumber(MacroAssembler* masm) { |
| __ Ret(); |
| __ Bind(&runtime); |
| - __ Push(x0); // Push argument. |
| - __ TailCallRuntime(Runtime::kStringToNumber); |
| + { |
| + FrameScope frame(masm, StackFrame::INTERNAL); |
| + // Push argument. |
| + __ Push(x0); |
| + // We cannot use a tail call here because this builtin can also be called |
| + // from wasm. |
| + __ CallRuntime(Runtime::kToNumber); |
|
jbramley
2016/06/21 08:31:50
Why not kStringToNumber here?
ahaas
2016/06/21 08:52:58
Thanks for noticing.
|
| + } |
| + __ Ret(); |
| } |
| // static |
| @@ -2836,9 +2843,15 @@ void Builtins::Generate_NonNumberToNumber(MacroAssembler* masm) { |
| __ Ldr(x0, FieldMemOperand(x0, Oddball::kToNumberOffset)); |
| __ Ret(); |
| __ Bind(¬_oddball); |
| - |
| - __ Push(x0); // Push argument. |
| - __ TailCallRuntime(Runtime::kToNumber); |
| + { |
| + FrameScope frame(masm, StackFrame::INTERNAL); |
| + // Push argument. |
| + __ Push(x0); |
| + // 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) { |