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

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

Issue 2302923002: [stubs] Port ToName stub to TurboFan. (Closed)
Patch Set: Addressed nits. Created 4 years, 3 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/code-stubs-s390.cc ('k') | src/x87/code-stubs-x87.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/code-stubs-x64.cc
diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc
index 806ec7e6039310e6d3d11cc39f7fa85d4ee56fa5..8b236fb03168bcbbb7aa713a56905331dad96ffc 100644
--- a/src/x64/code-stubs-x64.cc
+++ b/src/x64/code-stubs-x64.cc
@@ -2274,41 +2274,6 @@ void ToStringStub::Generate(MacroAssembler* masm) {
__ TailCallRuntime(Runtime::kToString);
}
-void ToNameStub::Generate(MacroAssembler* masm) {
- // The ToName stub takes one argument in rax.
- Label is_number;
- __ JumpIfSmi(rax, &is_number, Label::kNear);
-
- Label not_name;
- STATIC_ASSERT(FIRST_NAME_TYPE == FIRST_TYPE);
- __ CmpObjectType(rax, LAST_NAME_TYPE, rdi);
- // rax: receiver
- // rdi: receiver map
- __ j(above, &not_name, Label::kNear);
- __ Ret();
- __ bind(&not_name);
-
- Label not_heap_number;
- __ CompareRoot(rdi, Heap::kHeapNumberMapRootIndex);
- __ j(not_equal, &not_heap_number, Label::kNear);
- __ bind(&is_number);
- NumberToStringStub stub(isolate());
- __ TailCallStub(&stub);
- __ bind(&not_heap_number);
-
- Label not_oddball;
- __ CmpInstanceType(rdi, ODDBALL_TYPE);
- __ j(not_equal, &not_oddball, Label::kNear);
- __ movp(rax, FieldOperand(rax, Oddball::kToStringOffset));
- __ Ret();
- __ bind(&not_oddball);
-
- __ PopReturnAddressTo(rcx); // Pop return address.
- __ Push(rax); // Push argument.
- __ PushReturnAddressFrom(rcx); // Push return address.
- __ TailCallRuntime(Runtime::kToName);
-}
-
void StringHelper::GenerateFlatOneByteStringEquals(MacroAssembler* masm,
Register left,
« no previous file with comments | « src/s390/code-stubs-s390.cc ('k') | src/x87/code-stubs-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698