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

Unified Diff: src/arm64/code-stubs-arm64.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/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 8788f19b274b0b5b3c06fc75b5d38a3d3f5de596..9d4e1e284ff915522dfad977c5bbf083be6a7775 100644
--- a/src/arm64/code-stubs-arm64.cc
+++ b/src/arm64/code-stubs-arm64.cc
@@ -3101,49 +3101,6 @@ void SubStringStub::Generate(MacroAssembler* masm) {
generator.SkipSlow(masm, &runtime);
}
-
-void ToNumberStub::Generate(MacroAssembler* masm) {
- // The ToNumber stub takes one argument in x0.
- Label not_smi;
- __ JumpIfNotSmi(x0, &not_smi);
- __ Ret();
- __ Bind(&not_smi);
-
- Label not_heap_number;
- __ CompareObjectType(x0, x1, x1, HEAP_NUMBER_TYPE);
- // x0: receiver
- // x1: receiver instance type
- __ B(ne, &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 x0.
- __ AssertNotNumber(x0);
-
- Label not_string;
- __ CompareObjectType(x0, x1, x1, FIRST_NONSTRING_TYPE);
- // x0: receiver
- // x1: receiver instance type
- __ B(hs, &not_string);
- __ Jump(isolate()->builtins()->StringToNumber(), RelocInfo::CODE_TARGET);
- __ Bind(&not_string);
-
- Label not_oddball;
- __ Cmp(x1, ODDBALL_TYPE);
- __ B(ne, &not_oddball);
- __ Ldr(x0, FieldMemOperand(x0, Oddball::kToNumberOffset));
- __ Ret();
- __ Bind(&not_oddball);
-
- __ Push(x0); // Push argument.
- __ TailCallRuntime(Runtime::kToNumber);
-}
-
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