Index: src/x64/code-stubs-x64.cc |
diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc |
index 7fdca9487cd60e8eeccc933f6ad0ddb3b30db365..f72708d91e6eb7a66935627e0c92d7440722f70b 100644 |
--- a/src/x64/code-stubs-x64.cc |
+++ b/src/x64/code-stubs-x64.cc |
@@ -2416,8 +2416,7 @@ void NonNumberToNumberStub::Generate(MacroAssembler* masm) { |
// rax: object |
// rdi: object map |
__ j(above_equal, ¬_string, Label::kNear); |
- StringToNumberStub stub(masm->isolate()); |
- __ TailCallStub(&stub); |
+ __ Jump(isolate()->builtins()->StringToNumber(), RelocInfo::CODE_TARGET); |
__ bind(¬_string); |
Label not_oddball; |
@@ -2433,26 +2432,6 @@ void NonNumberToNumberStub::Generate(MacroAssembler* masm) { |
__ TailCallRuntime(Runtime::kToNumber); |
} |
-void StringToNumberStub::Generate(MacroAssembler* masm) { |
- // The StringToNumber stub takes one argument in rax. |
- __ AssertString(rax); |
- |
- // Check if string has a cached array index. |
- Label runtime; |
- __ testl(FieldOperand(rax, String::kHashFieldOffset), |
- Immediate(String::kContainsCachedArrayIndexMask)); |
- __ j(not_zero, &runtime, Label::kNear); |
- __ movl(rax, FieldOperand(rax, String::kHashFieldOffset)); |
- __ IndexFromHash(rax, rax); |
- __ Ret(); |
- |
- __ bind(&runtime); |
- __ PopReturnAddressTo(rcx); // Pop return address. |
- __ Push(rax); // Push argument. |
- __ PushReturnAddressFrom(rcx); // Push return address. |
- __ TailCallRuntime(Runtime::kStringToNumber); |
-} |
- |
void ToStringStub::Generate(MacroAssembler* masm) { |
// The ToString stub takes one argument in rax. |
Label is_number; |