Revision: 16926
Author: [email protected]
Date: Wed Sep 25 00:41:37 2013 UTC
Log: MIPS: Turn the NumberToStringStub into a hydrogen stub.
Port r16910 (5a0dd952)
Original commit message:
This adds a BuildLookupNumberStringCache() in Hydrogen, which will
be used by the hydrogen version of StringAddStub, in addition to the
hydrogen version of NumberToStringStub.
BUG=
[email protected]
Review URL: https://codereview.chromium.org/24436004
http://code.google.com/p/v8/source/detail?r=16926
Modified:
/branches/bleeding_edge/src/mips/code-stubs-mips.cc
/branches/bleeding_edge/src/mips/code-stubs-mips.h
/branches/bleeding_edge/src/mips/full-codegen-mips.cc
/branches/bleeding_edge/src/mips/lithium-codegen-mips.cc
=======================================
--- /branches/bleeding_edge/src/mips/code-stubs-mips.cc Fri Sep 20 09:27:40
2013 UTC
+++ /branches/bleeding_edge/src/mips/code-stubs-mips.cc Wed Sep 25 00:41:37
2013 UTC
@@ -58,6 +58,16 @@
descriptor->register_params_ = registers;
descriptor->deoptimization_handler_ = NULL;
}
+
+
+void NumberToStringStub::InitializeInterfaceDescriptor(
+ Isolate* isolate,
+ CodeStubInterfaceDescriptor* descriptor) {
+ static Register registers[] = { a0 };
+ descriptor->register_param_count_ = 1;
+ descriptor->register_params_ = registers;
+ descriptor->deoptimization_handler_ = NULL;
+}
void FastCloneShallowArrayStub::InitializeInterfaceDescriptor(
@@ -992,21 +1002,6 @@
__ Ret(USE_DELAY_SLOT);
__ xori(v0, a0, 1 << Map::kIsUndetectable);
}
-
-
-void NumberToStringStub::Generate(MacroAssembler* masm) {
- Label runtime;
-
- __ lw(a1, MemOperand(sp, 0));
-
- // Generate code to lookup number in the number string cache.
- __ LookupNumberStringCache(a1, v0, a2, a3, t0, &runtime);
- __ DropAndRet(1);
-
- __ bind(&runtime);
- // Handle number to string in the runtime system if not found in the
cache.
- __ TailCallRuntime(Runtime::kNumberToString, 1, 1);
-}
static void ICCompareStub_CheckInputType(MacroAssembler* masm,
=======================================
--- /branches/bleeding_edge/src/mips/code-stubs-mips.h Thu Sep 19 15:31:51
2013 UTC
+++ /branches/bleeding_edge/src/mips/code-stubs-mips.h Wed Sep 25 00:41:37
2013 UTC
@@ -263,18 +263,6 @@
| ScratchRegisterBits::encode(scratch_.code())
| SignRegisterBits::encode(sign_.code());
}
-
- void Generate(MacroAssembler* masm);
-};
-
-
-class NumberToStringStub: public PlatformCodeStub {
- public:
- NumberToStringStub() { }
-
- private:
- Major MajorKey() { return NumberToString; }
- int MinorKey() { return 0; }
void Generate(MacroAssembler* masm);
};
=======================================
--- /branches/bleeding_edge/src/mips/full-codegen-mips.cc Thu Sep 19
09:08:08 2013 UTC
+++ /branches/bleeding_edge/src/mips/full-codegen-mips.cc Wed Sep 25
00:41:37 2013 UTC
@@ -3611,8 +3611,9 @@
ZoneList<Expression*>* args = expr->arguments();
ASSERT_EQ(args->length(), 1);
- // Load the argument on the stack and call the stub.
- VisitForStackValue(args->at(0));
+ // Load the argument into a0 and call the stub.
+ VisitForAccumulatorValue(args->at(0));
+ __ mov(a0, result_register());
NumberToStringStub stub;
__ CallStub(&stub);
=======================================
--- /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Fri Sep 20
19:05:48 2013 UTC
+++ /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Wed Sep 25
00:41:37 2013 UTC
@@ -1063,11 +1063,6 @@
CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
break;
}
- case CodeStub::NumberToString: {
- NumberToStringStub stub;
- CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
- break;
- }
case CodeStub::StringCompare: {
StringCompareStub stub;
CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.