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

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

Issue 2050853003: [stubs] StringToNumberStub --> StringToNumber 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/x87/builtins-x87.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 c833305b04eaed1473b6fa826cc8e26cc0e87fea..1e944ea4e466b4b81773a0c236ad9d3344292773 100644
--- a/src/x87/code-stubs-x87.cc
+++ b/src/x87/code-stubs-x87.cc
@@ -2198,8 +2198,7 @@ void NonNumberToNumberStub::Generate(MacroAssembler* masm) {
// eax: object
// edi: object map
__ j(above_equal, &not_string, Label::kNear);
- StringToNumberStub stub(masm->isolate());
- __ TailCallStub(&stub);
+ __ Jump(isolate()->builtins()->StringToNumber(), RelocInfo::CODE_TARGET);
__ bind(&not_string);
Label not_oddball;
@@ -2215,26 +2214,6 @@ void NonNumberToNumberStub::Generate(MacroAssembler* masm) {
__ TailCallRuntime(Runtime::kToNumber);
}
-void StringToNumberStub::Generate(MacroAssembler* masm) {
- // The StringToNumber stub takes one argument in eax.
- __ AssertString(eax);
-
- // Check if string has a cached array index.
- Label runtime;
- __ test(FieldOperand(eax, String::kHashFieldOffset),
- Immediate(String::kContainsCachedArrayIndexMask));
- __ j(not_zero, &runtime, Label::kNear);
- __ mov(eax, FieldOperand(eax, String::kHashFieldOffset));
- __ IndexFromHash(eax, eax);
- __ Ret();
-
- __ bind(&runtime);
- __ PopReturnAddressTo(ecx); // Pop return address.
- __ Push(eax); // Push argument.
- __ PushReturnAddressFrom(ecx); // Push return address.
- __ TailCallRuntime(Runtime::kStringToNumber);
-}
-
void ToStringStub::Generate(MacroAssembler* masm) {
// The ToString stub takes one argument in eax.
Label is_number;
« no previous file with comments | « src/x87/builtins-x87.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698