Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(195)

Unified Diff: src/x87/builtins-x87.cc

Issue 2108543002: X87: [builtins] NonNumberToNumber and StringToNumber now use CallRuntime instead of TailCallRuntime. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(&not_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) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698