Index: src/arm/stub-cache-arm.cc |
diff --git a/src/arm/stub-cache-arm.cc b/src/arm/stub-cache-arm.cc |
index 98002dc6688c3f4397427bfc855b5f98cb3617e4..1898dbc6fb2704c9fee39495c8eff4fde57d90c8 100644 |
--- a/src/arm/stub-cache-arm.cc |
+++ b/src/arm/stub-cache-arm.cc |
@@ -1294,10 +1294,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, r3, r4, r5 }; |
+ Register map = KeyedStoreIC::MapRegister(); |
+ static Register registers[] = { receiver, name, map, r4, r5 }; |
return registers; |
} |
@@ -1397,7 +1398,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())); |
int receiver_count = types->length(); |
int number_of_handled_maps = 0; |