Index: src/arm64/lithium-codegen-arm64.cc |
diff --git a/src/arm64/lithium-codegen-arm64.cc b/src/arm64/lithium-codegen-arm64.cc |
index fab9c465e9ee2d99ad5a9c71fab6021fbbc0bb36..c71af490fdf8fc919541d3e0b05cc480fd36be92 100644 |
--- a/src/arm64/lithium-codegen-arm64.cc |
+++ b/src/arm64/lithium-codegen-arm64.cc |
@@ -3341,6 +3341,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, Smi::FromInt(index)); |
+} |
+ |
+ |
void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { |
DCHECK(ToRegister(instr->context()).is(cp)); |
DCHECK(ToRegister(instr->global_object()) |
@@ -5279,6 +5293,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(); |
@@ -5475,10 +5493,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); |
} |