Index: src/arm/lithium-codegen-arm.cc |
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc |
index 03b5eb3da3de6c2d32b598e1acf328c094f4fc06..dcebbd0efe59d384b9d5449fbde02115b2a9c0ca 100644 |
--- a/src/arm/lithium-codegen-arm.cc |
+++ b/src/arm/lithium-codegen-arm.cc |
@@ -2947,6 +2947,20 @@ void LCodeGen::EmitVectorLoadICRegisters(T* instr) { |
} |
+template <class T> |
+void LCodeGen::EmitVectorStoreICRegisters(T* instr) { |
+ Register vector_register = ToRegister(instr->temp_vector()); |
+ Register slot_register = ToRegister(instr->temp_slot()); |
+ |
+ AllowDeferredHandleDereference vector_structure_check; |
+ Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); |
+ __ Move(vector_register, vector); |
+ FeedbackVectorICSlot slot = instr->hydrogen()->slot(); |
+ int index = vector->GetIndex(slot); |
+ __ mov(slot_register, Operand(Smi::FromInt(index))); |
+} |
+ |
+ |
void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { |
DCHECK(ToRegister(instr->context()).is(cp)); |
DCHECK(ToRegister(instr->global_object()) |
@@ -4192,10 +4206,14 @@ void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { |
DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister())); |
DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister())); |
+ if (instr->hydrogen()->HasVectorAndSlot()) { |
+ EmitVectorStoreICRegisters<LStoreNamedGeneric>(instr); |
+ } |
+ |
__ mov(StoreDescriptor::NameRegister(), Operand(instr->name())); |
- Handle<Code> ic = |
- StoreIC::initialize_stub(isolate(), instr->language_mode(), |
- instr->hydrogen()->initialization_state()); |
+ Handle<Code> ic = CodeFactory::StoreICInOptimizedCode( |
+ isolate(), instr->language_mode(), |
+ instr->hydrogen()->initialization_state()).code(); |
CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS); |
} |
@@ -4416,6 +4434,10 @@ void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) { |
DCHECK(ToRegister(instr->key()).is(StoreDescriptor::NameRegister())); |
DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister())); |
+ if (instr->hydrogen()->HasVectorAndSlot()) { |
+ EmitVectorStoreICRegisters<LStoreKeyedGeneric>(instr); |
+ } |
+ |
Handle<Code> ic = CodeFactory::KeyedStoreICInOptimizedCode( |
isolate(), instr->language_mode(), |
instr->hydrogen()->initialization_state()).code(); |