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

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

Issue 2380973002: [stubs] replaced ToString MacroAssembler Stub with CodeStubAssembler builtin (Closed)
Patch Set: completely removed ToStringStub 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
« src/builtins/builtins-conversion.cc ('K') | « src/x64/code-stubs-x64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x87/code-stubs-x87.cc
diff --git a/src/x87/code-stubs-x87.cc b/src/x87/code-stubs-x87.cc
index 1d72ab3a6880808ad885ddb88334a6a007ed5600..32588725c03ab46109a892625149ad9d348313fc 100644
--- a/src/x87/code-stubs-x87.cc
+++ b/src/x87/code-stubs-x87.cc
@@ -2128,40 +2128,6 @@ void SubStringStub::Generate(MacroAssembler* masm) {
generator.SkipSlow(masm, &runtime);
}
-void ToStringStub::Generate(MacroAssembler* masm) {
- // The ToString stub takes one argument in eax.
- Label is_number;
- __ JumpIfSmi(eax, &is_number, Label::kNear);
-
- Label not_string;
- __ CmpObjectType(eax, FIRST_NONSTRING_TYPE, edi);
- // eax: receiver
- // edi: receiver map
- __ j(above_equal, &not_string, Label::kNear);
- __ Ret();
- __ bind(&not_string);
-
- Label not_heap_number;
- __ CompareMap(eax, masm->isolate()->factory()->heap_number_map());
- __ j(not_equal, &not_heap_number, Label::kNear);
- __ bind(&is_number);
- NumberToStringStub stub(isolate());
- __ TailCallStub(&stub);
- __ bind(&not_heap_number);
-
- Label not_oddball;
- __ CmpInstanceType(edi, ODDBALL_TYPE);
- __ j(not_equal, &not_oddball, Label::kNear);
- __ mov(eax, FieldOperand(eax, Oddball::kToStringOffset));
- __ Ret();
- __ bind(&not_oddball);
-
- __ pop(ecx); // Pop return address.
- __ push(eax); // Push argument.
- __ push(ecx); // Push return address.
- __ TailCallRuntime(Runtime::kToString);
-}
-
void StringHelper::GenerateFlatOneByteStringEquals(MacroAssembler* masm,
Register left,
« src/builtins/builtins-conversion.cc ('K') | « src/x64/code-stubs-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698