Index: src/mips/lithium-codegen-mips.cc |
diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc |
index ccf0e5346e0ab533d32e5faf62ad793f786e2b06..ed9864249b4006e1870bd0390cbe4f17238297b0 100644 |
--- a/src/mips/lithium-codegen-mips.cc |
+++ b/src/mips/lithium-codegen-mips.cc |
@@ -2857,6 +2857,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(); |
+ __ li(vector_register, vector); |
+ FeedbackVectorICSlot slot = instr->hydrogen()->slot(); |
+ int index = vector->GetIndex(slot); |
+ __ li(slot_register, Operand(Smi::FromInt(index))); |
+} |
+ |
+ |
void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { |
DCHECK(ToRegister(instr->context()).is(cp)); |
DCHECK(ToRegister(instr->global_object()) |
@@ -4151,10 +4165,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); |
+ } |
+ |
__ li(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); |
} |
@@ -4385,6 +4403,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(); |