Reviewers: Weiliang, mvstanton,
Message:
weiliang.
please help to review it.
thanks.
Description:
X87: Use the same registers for StoreIC and KeyedStoreIC.
port r22387
original commit message:
Use the same registers for StoreIC and KeyedStoreIC.
Based on https://codereview.chromium.org/389283002 ("Use register
parameters
in ElementsTransitionGenerator") which must land first.
BUG=
Please review this at https://codereview.chromium.org/391933002/
SVN Base: https://chromium.googlesource.com/external/v8.git@bleeding_edge
Affected files (+11, -10 lines):
M src/x87/code-stubs-x87.cc
M src/x87/ic-x87.cc
M src/x87/stub-cache-x87.cc
Index: src/x87/code-stubs-x87.cc
diff --git a/src/x87/code-stubs-x87.cc b/src/x87/code-stubs-x87.cc
index
8acb800868c402bd208e18eff7905b3ef229947d..aa6583b190b969065e1e76db5e66c00e17dd748c
100644
--- a/src/x87/code-stubs-x87.cc
+++ b/src/x87/code-stubs-x87.cc
@@ -225,14 +225,6 @@ void ToBooleanStub::InitializeInterfaceDescriptor(
}
-void ElementsTransitionAndStoreStub::InitializeInterfaceDescriptor(
- CodeStubInterfaceDescriptor* descriptor) {
- Register registers[] = { eax, ebx, ecx, edx };
- descriptor->Initialize(ARRAY_SIZE(registers), registers,
- FUNCTION_ADDR(ElementsTransitionAndStoreIC_Miss));
-}
-
-
void BinaryOpICStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) {
Register registers[] = { edx, eax };
Index: src/x87/ic-x87.cc
diff --git a/src/x87/ic-x87.cc b/src/x87/ic-x87.cc
index
ed21d4d3de6e99d32e2b27b0d01d668ef8049c15..72557e1c13156cb73ffb753134df3a054c259d05
100644
--- a/src/x87/ic-x87.cc
+++ b/src/x87/ic-x87.cc
@@ -1041,6 +1041,11 @@ const Register KeyedStoreIC::ValueRegister() {
}
+const Register KeyedStoreIC::MapRegister() {
+ return ebx;
+}
+
+
void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
// Return address is on the stack.
LoadIC_PushArgs(masm);
Index: src/x87/stub-cache-x87.cc
diff --git a/src/x87/stub-cache-x87.cc b/src/x87/stub-cache-x87.cc
index
8a5f36d4737436c3ac6750fc90bb85c50a8bc654..74275f937c27c128e75142c0b850b034ef84ce65
100644
--- a/src/x87/stub-cache-x87.cc
+++ b/src/x87/stub-cache-x87.cc
@@ -1313,10 +1313,11 @@ Register* StoreStubCompiler::registers() {
Register* KeyedStoreStubCompiler::registers() {
- // receiver, name, scratch1, scratch2, scratch3.
+ // receiver, name, scratch1/map, scratch2, scratch3.
Register receiver = KeyedStoreIC::ReceiverRegister();
Register name = KeyedStoreIC::NameRegister();
- static Register registers[] = { receiver, name, ebx, edi, no_reg };
+ Register map = KeyedStoreIC::MapRegister();
+ static Register registers[] = { receiver, name, map, edi, no_reg };
return registers;
}
@@ -1417,7 +1418,10 @@ Handle<Code>
BaseLoadStoreStubCompiler::CompilePolymorphicIC(
Label* smi_target = IncludesNumberType(types) ? &number_case : &miss;
__ JumpIfSmi(receiver(), smi_target);
+ // Polymorphic keyed stores may use the map register
Register map_reg = scratch1();
+ ASSERT(kind() != Code::KEYED_STORE_IC ||
+ map_reg.is(KeyedStoreIC::MapRegister()));
__ mov(map_reg, FieldOperand(receiver(), HeapObject::kMapOffset));
int receiver_count = types->length();
int number_of_handled_maps = 0;
--
--
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.