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

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

Issue 2051113002: [stubs] ToNumberStub --> ToNumber builtin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix full-code on non-x64 platforms 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 cb4930df4a4f74b0e25b9c4045f460db17f0603c..7e180732b19d201d59c177491b4d81d620d91dc6 100644
--- a/src/arm/code-stubs-arm.cc
+++ b/src/arm/code-stubs-arm.cc
@@ -2500,42 +2500,6 @@ void SubStringStub::Generate(MacroAssembler* masm) {
generator.SkipSlow(masm, &runtime);
}
-
-void ToNumberStub::Generate(MacroAssembler* masm) {
- // The ToNumber stub takes one argument in r0.
- STATIC_ASSERT(kSmiTag == 0);
- __ tst(r0, Operand(kSmiTagMask));
- __ Ret(eq);
-
- __ CompareObjectType(r0, r1, r1, HEAP_NUMBER_TYPE);
- // r0: receiver
- // r1: receiver instance type
- __ Ret(eq);
-
- NonNumberToNumberStub stub(masm->isolate());
- __ TailCallStub(&stub);
-}
-
-void NonNumberToNumberStub::Generate(MacroAssembler* masm) {
- // The NonNumberToNumber stub takes one argument in r0.
- __ AssertNotNumber(r0);
-
- __ CompareObjectType(r0, r1, r1, FIRST_NONSTRING_TYPE);
- // r0: receiver
- // r1: receiver instance type
- __ Jump(isolate()->builtins()->StringToNumber(), RelocInfo::CODE_TARGET, lo);
-
- Label not_oddball;
- __ cmp(r1, Operand(ODDBALL_TYPE));
- __ b(ne, &not_oddball);
- __ ldr(r0, FieldMemOperand(r0, Oddball::kToNumberOffset));
- __ Ret();
- __ bind(&not_oddball);
-
- __ Push(r0); // Push argument.
- __ TailCallRuntime(Runtime::kToNumber);
-}
-
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