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

Unified Diff: src/arm/code-stubs-arm.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/arm/builtins-arm.cc ('k') | src/arm64/builtins-arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/code-stubs-arm.cc
diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc
index 92ea9f5e8b4acb614df452adaa81346fafcdcc49..cb4930df4a4f74b0e25b9c4045f460db17f0603c 100644
--- a/src/arm/code-stubs-arm.cc
+++ b/src/arm/code-stubs-arm.cc
@@ -2523,8 +2523,7 @@ void NonNumberToNumberStub::Generate(MacroAssembler* masm) {
__ CompareObjectType(r0, r1, r1, FIRST_NONSTRING_TYPE);
// r0: receiver
// r1: receiver instance type
- StringToNumberStub stub(masm->isolate());
- __ TailCallStub(&stub, lo);
+ __ Jump(isolate()->builtins()->StringToNumber(), RelocInfo::CODE_TARGET, lo);
Label not_oddball;
__ cmp(r1, Operand(ODDBALL_TYPE));
@@ -2537,23 +2536,6 @@ void NonNumberToNumberStub::Generate(MacroAssembler* masm) {
__ TailCallRuntime(Runtime::kToNumber);
}
-void StringToNumberStub::Generate(MacroAssembler* masm) {
- // The StringToNumber stub takes one argument in r0.
- __ AssertString(r0);
-
- // Check if string has a cached array index.
- Label runtime;
- __ ldr(r2, FieldMemOperand(r0, String::kHashFieldOffset));
- __ tst(r2, Operand(String::kContainsCachedArrayIndexMask));
- __ b(ne, &runtime);
- __ IndexFromHash(r2, r0);
- __ Ret();
-
- __ bind(&runtime);
- __ Push(r0); // Push argument.
- __ TailCallRuntime(Runtime::kStringToNumber);
-}
-
void ToStringStub::Generate(MacroAssembler* masm) {
// The ToString stub takes one argument in r0.
Label is_number;
« no previous file with comments | « src/arm/builtins-arm.cc ('k') | src/arm64/builtins-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698