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

Unified Diff: src/arm64/code-stubs-arm64.cc

Issue 2050853003: [stubs] StringToNumberStub --> StringToNumber builtin. (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 | « src/arm64/builtins-arm64.cc ('k') | src/builtins.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm64/code-stubs-arm64.cc
diff --git a/src/arm64/code-stubs-arm64.cc b/src/arm64/code-stubs-arm64.cc
index 2658b86a73fb8843305bf54fa68cb6664b4a7cfc..8788f19b274b0b5b3c06fc75b5d38a3d3f5de596 100644
--- a/src/arm64/code-stubs-arm64.cc
+++ b/src/arm64/code-stubs-arm64.cc
@@ -3130,8 +3130,7 @@ void NonNumberToNumberStub::Generate(MacroAssembler* masm) {
// x0: receiver
// x1: receiver instance type
__ B(hs, &not_string);
- StringToNumberStub stub(masm->isolate());
- __ TailCallStub(&stub);
+ __ Jump(isolate()->builtins()->StringToNumber(), RelocInfo::CODE_TARGET);
__ Bind(&not_string);
Label not_oddball;
@@ -3145,23 +3144,6 @@ void NonNumberToNumberStub::Generate(MacroAssembler* masm) {
__ TailCallRuntime(Runtime::kToNumber);
}
-void StringToNumberStub::Generate(MacroAssembler* masm) {
- // The StringToNumber stub takes one argument in x0.
- __ AssertString(x0);
-
- // Check if string has a cached array index.
- Label runtime;
- __ Ldr(x2, FieldMemOperand(x0, String::kHashFieldOffset));
- __ Tst(x2, Operand(String::kContainsCachedArrayIndexMask));
- __ B(ne, &runtime);
- __ IndexFromHash(x2, x0);
- __ Ret();
-
- __ Bind(&runtime);
- __ Push(x0); // Push argument.
- __ TailCallRuntime(Runtime::kStringToNumber);
-}
-
void ToStringStub::Generate(MacroAssembler* masm) {
// The ToString stub takes one argument in x0.
Label is_number;
« no previous file with comments | « src/arm64/builtins-arm64.cc ('k') | src/builtins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698