Index: src/ia32/lithium-codegen-ia32.cc |
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc |
index ba601db35dd22f033c7737d4276abdac5478dec2..3522ed5f203f623f89073af07a86336e0d8a33e0 100644 |
--- a/src/ia32/lithium-codegen-ia32.cc |
+++ b/src/ia32/lithium-codegen-ia32.cc |
@@ -2827,6 +2827,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(); |
+ __ mov(vector_register, vector); |
+ FeedbackVectorICSlot slot = instr->hydrogen()->slot(); |
+ int index = vector->GetIndex(slot); |
+ __ mov(slot_register, Immediate(Smi::FromInt(index))); |
+} |
+ |
+ |
void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { |
DCHECK(ToRegister(instr->context()).is(esi)); |
DCHECK(ToRegister(instr->global_object()) |
@@ -4084,10 +4098,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(), 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); |
} |
@@ -4264,6 +4282,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(); |