Revision: 22405
Author: [email protected]
Date: Tue Jul 15 10:41:23 2014 UTC
Log: 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=
[email protected]
Review URL: https://codereview.chromium.org/391933002
Patch from Chunyang Dai <[email protected]>.
http://code.google.com/p/v8/source/detail?r=22405
Modified:
/branches/bleeding_edge/src/x87/code-stubs-x87.cc
/branches/bleeding_edge/src/x87/ic-x87.cc
/branches/bleeding_edge/src/x87/stub-cache-x87.cc
=======================================
--- /branches/bleeding_edge/src/x87/code-stubs-x87.cc Fri Jul 11 07:47:58
2014 UTC
+++ /branches/bleeding_edge/src/x87/code-stubs-x87.cc Tue Jul 15 10:41:23
2014 UTC
@@ -223,14 +223,6 @@
descriptor->SetMissHandler(
ExternalReference(IC_Utility(IC::kToBooleanIC_Miss), isolate()));
}
-
-
-void ElementsTransitionAndStoreStub::InitializeInterfaceDescriptor(
- CodeStubInterfaceDescriptor* descriptor) {
- Register registers[] = { eax, ebx, ecx, edx };
- descriptor->Initialize(ARRAY_SIZE(registers), registers,
- FUNCTION_ADDR(ElementsTransitionAndStoreIC_Miss));
-}
void BinaryOpICStub::InitializeInterfaceDescriptor(
=======================================
--- /branches/bleeding_edge/src/x87/ic-x87.cc Tue Jul 15 09:46:10 2014 UTC
+++ /branches/bleeding_edge/src/x87/ic-x87.cc Tue Jul 15 10:41:23 2014 UTC
@@ -1039,6 +1039,11 @@
const Register KeyedStoreIC::ValueRegister() {
return StoreIC::ValueRegister();
}
+
+
+const Register KeyedStoreIC::MapRegister() {
+ return ebx;
+}
void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
=======================================
--- /branches/bleeding_edge/src/x87/stub-cache-x87.cc Fri Jul 11 07:47:58
2014 UTC
+++ /branches/bleeding_edge/src/x87/stub-cache-x87.cc Tue Jul 15 10:41:23
2014 UTC
@@ -1313,10 +1313,11 @@
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 @@
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.