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

Unified Diff: src/ia32/code-stubs-ia32.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/ia32/builtins-ia32.cc ('k') | src/mips/builtins-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/code-stubs-ia32.cc
diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc
index a163319384da8c93753b09d7ccb57f900b773a71..e2273f56c232b6f57f8365d411c9b0db365851ad 100644
--- a/src/ia32/code-stubs-ia32.cc
+++ b/src/ia32/code-stubs-ia32.cc
@@ -2476,8 +2476,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;
@@ -2493,26 +2492,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/ia32/builtins-ia32.cc ('k') | src/mips/builtins-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698