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

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

Issue 2052833003: S390: [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/s390/builtins-s390.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/s390/code-stubs-s390.cc
diff --git a/src/s390/code-stubs-s390.cc b/src/s390/code-stubs-s390.cc
index a3913e48577bbb859d6a862f6dd6d5a88d992b3a..41bc1e32a9e1f41ee7269c1b335504a561d7ff42 100644
--- a/src/s390/code-stubs-s390.cc
+++ b/src/s390/code-stubs-s390.cc
@@ -2591,8 +2591,7 @@ void NonNumberToNumberStub::Generate(MacroAssembler* masm) {
__ CompareObjectType(r2, r3, r3, FIRST_NONSTRING_TYPE);
// r2: receiver
// r3: receiver instance type
- StringToNumberStub stub(masm->isolate());
- __ TailCallStub(&stub, lt);
+ __ Jump(isolate()->builtins()->StringToNumber(), RelocInfo::CODE_TARGET, lt);
Label not_oddball;
__ CmpP(r3, Operand(ODDBALL_TYPE));
@@ -2605,23 +2604,6 @@ void NonNumberToNumberStub::Generate(MacroAssembler* masm) {
__ TailCallRuntime(Runtime::kToNumber);
}
-void StringToNumberStub::Generate(MacroAssembler* masm) {
- // The StringToNumber stub takes one argument in r2.
- __ AssertString(r2);
-
- // Check if string has a cached array index.
- Label runtime;
- __ LoadlW(r4, FieldMemOperand(r2, String::kHashFieldOffset));
- __ And(r0, r4, Operand(String::kContainsCachedArrayIndexMask));
- __ bne(&runtime);
- __ IndexFromHash(r4, r2);
- __ Ret();
-
- __ bind(&runtime);
- __ push(r2); // Push argument.
- __ TailCallRuntime(Runtime::kStringToNumber);
-}
-
void ToStringStub::Generate(MacroAssembler* masm) {
// The ToString stub takes one argument in r2.
Label done;
« no previous file with comments | « src/s390/builtins-s390.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698