Index: src/ppc/lithium-codegen-ppc.cc |
diff --git a/src/ppc/lithium-codegen-ppc.cc b/src/ppc/lithium-codegen-ppc.cc |
index fea04e36f0b0a2746003f919b0422afa8b2da37f..23b270dfaf97c8028dd1590c5e9dbb5447c833de 100644 |
--- a/src/ppc/lithium-codegen-ppc.cc |
+++ b/src/ppc/lithium-codegen-ppc.cc |
@@ -3012,7 +3012,21 @@ void LCodeGen::EmitVectorLoadICRegisters(T* instr) { |
// No need to allocate this register. |
FeedbackVectorICSlot slot = instr->hydrogen()->slot(); |
int index = vector->GetIndex(slot); |
- __ mov(slot_register, Operand(Smi::FromInt(index))); |
+ __ LoadSmiLiteral(slot_register, Smi::FromInt(index)); |
+} |
+ |
+ |
+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); |
+ __ LoadSmiLiteral(slot_register, Smi::FromInt(index)); |
} |
@@ -4420,10 +4434,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); |
} |
@@ -4687,6 +4705,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(); |