Index: src/full-codegen/x87/full-codegen-x87.cc |
diff --git a/src/full-codegen/x87/full-codegen-x87.cc b/src/full-codegen/x87/full-codegen-x87.cc |
index bc389be2d3ca55bca386d555697e9e45b69055e6..42c90d9830b7c767ff1878767677446adb1bb956 100644 |
--- a/src/full-codegen/x87/full-codegen-x87.cc |
+++ b/src/full-codegen/x87/full-codegen-x87.cc |
@@ -1653,7 +1653,6 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { |
void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { |
Comment cmnt(masm_, "[ ArrayLiteral"); |
- expr->BuildConstantElements(isolate()); |
Handle<FixedArray> constant_elements = expr->constant_elements(); |
bool has_constant_fast_elements = |
IsFastObjectElementsKind(expr->constant_elements_kind()); |
@@ -1704,7 +1703,15 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { |
} |
VisitForAccumulatorValue(subexpr); |
- if (has_constant_fast_elements) { |
+ if (FLAG_vector_stores) { |
+ __ mov(StoreDescriptor::NameRegister(), |
+ Immediate(Smi::FromInt(array_index))); |
+ __ mov(StoreDescriptor::ReceiverRegister(), Operand(esp, kPointerSize)); |
+ EmitLoadStoreICSlot(expr->LiteralFeedbackSlot()); |
+ Handle<Code> ic = |
+ CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); |
+ CallIC(ic); |
+ } else if (has_constant_fast_elements) { |
// Fast-case array literal with ElementsKind of FAST_*_ELEMENTS, they |
// cannot transition and don't need to call the runtime stub. |
int offset = FixedArray::kHeaderSize + (array_index * kPointerSize); |