Revision: 24668
Author: [email protected]
Date: Thu Oct 16 16:39:51 2014 UTC
Log: MIPS: Eliminate special keyed load string stub in favor of
uniform handlers.
Port r24661 (5499efb)
Original commit message:
KeyedLoadIC installs a special case if the receiver is a string.
Although there are several maps for strings, in practice we seem to
be able to treat them individually because a given KeyedLoad site
only sees 1-2 string types.
BUG=
[email protected]
Review URL: https://codereview.chromium.org/657413002
https://code.google.com/p/v8/source/detail?r=24668
Modified:
/branches/bleeding_edge/src/ic/mips64/ic-mips64.cc
/branches/bleeding_edge/src/mips64/code-stubs-mips64.cc
=======================================
--- /branches/bleeding_edge/src/ic/mips64/ic-mips64.cc Thu Oct 9 18:09:14
2014 UTC
+++ /branches/bleeding_edge/src/ic/mips64/ic-mips64.cc Thu Oct 16 16:39:51
2014 UTC
@@ -597,32 +597,6 @@
// Now jump to the place where smi keys are handled.
__ Branch(&index_smi);
}
-
-
-void KeyedLoadIC::GenerateString(MacroAssembler* masm) {
- // Return address is in ra.
- Label miss;
-
- Register receiver = LoadDescriptor::ReceiverRegister();
- Register index = LoadDescriptor::NameRegister();
- Register scratch = a3;
- Register result = v0;
- DCHECK(!scratch.is(receiver) && !scratch.is(index));
-
- StringCharAtGenerator char_at_generator(receiver, index, scratch, result,
- &miss, // When not a string.
- &miss, // When not a number.
- &miss, // When index out of
range.
- STRING_INDEX_IS_ARRAY_INDEX);
- char_at_generator.GenerateFast(masm);
- __ Ret();
-
- StubRuntimeCallHelper call_helper;
- char_at_generator.GenerateSlow(masm, call_helper);
-
- __ bind(&miss);
- GenerateMiss(masm);
-}
static void KeyedStoreGenerateGenericHelper(
=======================================
--- /branches/bleeding_edge/src/mips64/code-stubs-mips64.cc Thu Oct 16
16:25:27 2014 UTC
+++ /branches/bleeding_edge/src/mips64/code-stubs-mips64.cc Thu Oct 16
16:39:51 2014 UTC
@@ -1403,6 +1403,34 @@
// Return.
__ Jump(ra);
}
+
+
+void LoadIndexedStringStub::Generate(MacroAssembler* masm) {
+ // Return address is in ra.
+ Label miss;
+
+ Register receiver = LoadDescriptor::ReceiverRegister();
+ Register index = LoadDescriptor::NameRegister();
+ Register scratch = a3;
+ Register result = v0;
+ DCHECK(!scratch.is(receiver) && !scratch.is(index));
+
+ StringCharAtGenerator char_at_generator(receiver, index, scratch, result,
+ &miss, // When not a string.
+ &miss, // When not a number.
+ &miss, // When index out of
range.
+ STRING_INDEX_IS_ARRAY_INDEX,
+ RECEIVER_IS_STRING);
+ char_at_generator.GenerateFast(masm);
+ __ Ret();
+
+ StubRuntimeCallHelper call_helper;
+ char_at_generator.GenerateSlow(masm, call_helper);
+
+ __ bind(&miss);
+ PropertyAccessCompiler::TailCallBuiltin(
+ masm, PropertyAccessCompiler::MissBuiltin(Code::KEYED_LOAD_IC));
+}
// Uses registers a0 to a4.
--
--
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/d/optout.