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

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

Issue 2079393003: [builtins] NonNumberToNumber and StringToNumber now use CallRuntime instead of TailCallRuntime (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments 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 | « src/arm/builtins-arm.cc ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm64/builtins-arm64.cc
diff --git a/src/arm64/builtins-arm64.cc b/src/arm64/builtins-arm64.cc
index 75e5f88fef7fdcb29e5a5838d79db806cd42574a..bfc73c4876720c43611ec52271e58b30735b20e6 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::kStringToNumber);
+ }
+ __ Ret();
}
// static
@@ -2836,9 +2843,15 @@ void Builtins::Generate_NonNumberToNumber(MacroAssembler* masm) {
__ Ldr(x0, FieldMemOperand(x0, Oddball::kToNumberOffset));
__ Ret();
__ Bind(&not_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) {
« no previous file with comments | « src/arm/builtins-arm.cc ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698