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

Unified Diff: src/mips/code-stubs-mips.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/mips/builtins-mips.cc ('k') | src/mips64/builtins-mips64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/code-stubs-mips.cc
diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc
index 951eedea308edd57bf60d7f0caf9d62f3912cb53..88b0c70c7a9b75674adc76373d36aa7a51cacb4e 100644
--- a/src/mips/code-stubs-mips.cc
+++ b/src/mips/code-stubs-mips.cc
@@ -2658,8 +2658,7 @@ void NonNumberToNumberStub::Generate(MacroAssembler* masm) {
// a0: receiver
// a1: receiver instance type
__ Branch(&not_string, hs, a1, Operand(FIRST_NONSTRING_TYPE));
- StringToNumberStub stub(masm->isolate());
- __ TailCallStub(&stub);
+ __ Jump(isolate()->builtins()->StringToNumber(), RelocInfo::CODE_TARGET);
__ bind(&not_string);
Label not_oddball;
@@ -2672,23 +2671,6 @@ void NonNumberToNumberStub::Generate(MacroAssembler* masm) {
__ TailCallRuntime(Runtime::kToNumber);
}
-void StringToNumberStub::Generate(MacroAssembler* masm) {
- // The StringToNumber stub takes on argument in a0.
- __ AssertString(a0);
-
- // Check if string has a cached array index.
- Label runtime;
- __ lw(a2, FieldMemOperand(a0, String::kHashFieldOffset));
- __ And(at, a2, Operand(String::kContainsCachedArrayIndexMask));
- __ Branch(&runtime, ne, at, Operand(zero_reg));
- __ IndexFromHash(a2, v0);
- __ Ret();
-
- __ bind(&runtime);
- __ Push(a0); // Push argument.
- __ TailCallRuntime(Runtime::kStringToNumber);
-}
-
void ToStringStub::Generate(MacroAssembler* masm) {
// The ToString stub takes on argument in a0.
Label is_number;
« no previous file with comments | « src/mips/builtins-mips.cc ('k') | src/mips64/builtins-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698