Index: src/ia32/builtins-ia32.cc |
diff --git a/src/ia32/builtins-ia32.cc b/src/ia32/builtins-ia32.cc |
index e1ed68b23e7dbee7adacb76ea17591dd155d318f..65b8cc9510b102eb33dc0d85d4e6e1607320886d 100644 |
--- a/src/ia32/builtins-ia32.cc |
+++ b/src/ia32/builtins-ia32.cc |
@@ -2666,10 +2666,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 |
@@ -2710,11 +2715,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) { |