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; |