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

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

Issue 2052963003: S390: [stubs] ToNumberStub --> ToNumber 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 41bc1e32a9e1f41ee7269c1b335504a561d7ff42..247b33aefbd7c657e773eb70ac2e4ab54028c69d 100644
--- a/src/s390/code-stubs-s390.cc
+++ b/src/s390/code-stubs-s390.cc
@@ -2566,44 +2566,6 @@ void SubStringStub::Generate(MacroAssembler* masm) {
generator.SkipSlow(masm, &runtime);
}
-void ToNumberStub::Generate(MacroAssembler* masm) {
- // The ToNumber stub takes one argument in r2.
- STATIC_ASSERT(kSmiTag == 0);
- __ TestIfSmi(r2);
- __ Ret(eq);
-
- __ CompareObjectType(r2, r3, r3, HEAP_NUMBER_TYPE);
- // r2: receiver
- // r3: receiver instance type
- Label not_heap_number;
- __ bne(&not_heap_number);
- __ Ret();
- __ bind(&not_heap_number);
-
- NonNumberToNumberStub stub(masm->isolate());
- __ TailCallStub(&stub);
-}
-
-void NonNumberToNumberStub::Generate(MacroAssembler* masm) {
- // The NonNumberToNumber stub takes one argument in r2.
- __ AssertNotNumber(r2);
-
- __ CompareObjectType(r2, r3, r3, FIRST_NONSTRING_TYPE);
- // r2: receiver
- // r3: receiver instance type
- __ Jump(isolate()->builtins()->StringToNumber(), RelocInfo::CODE_TARGET, lt);
-
- Label not_oddball;
- __ CmpP(r3, Operand(ODDBALL_TYPE));
- __ bne(&not_oddball, Label::kNear);
- __ LoadP(r2, FieldMemOperand(r2, Oddball::kToNumberOffset));
- __ b(r14);
- __ bind(&not_oddball);
-
- __ push(r2); // Push argument.
- __ TailCallRuntime(Runtime::kToNumber);
-}
-
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