Index: src/full-codegen/ia32/full-codegen-ia32.cc |
diff --git a/src/full-codegen/ia32/full-codegen-ia32.cc b/src/full-codegen/ia32/full-codegen-ia32.cc |
index 250b476eafd65af101291b8c5d61fb0d87b38d31..8390ba7a45aabb79bb99cd5da795c3df3a49dd6d 100644 |
--- a/src/full-codegen/ia32/full-codegen-ia32.cc |
+++ b/src/full-codegen/ia32/full-codegen-ia32.cc |
@@ -1675,7 +1675,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()); |
@@ -1726,7 +1725,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); |
@@ -1735,17 +1742,14 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { |
// Store the subexpression value in the array's elements. |
__ mov(FieldOperand(ebx, offset), result_register()); |
// Update the write barrier for the array store. |
- __ RecordWriteField(ebx, offset, result_register(), ecx, |
- kDontSaveFPRegs, |
- EMIT_REMEMBERED_SET, |
- INLINE_SMI_CHECK); |
+ __ RecordWriteField(ebx, offset, result_register(), ecx, kDontSaveFPRegs, |
+ EMIT_REMEMBERED_SET, INLINE_SMI_CHECK); |
} else { |
// Store the subexpression value in the array's elements. |
__ mov(ecx, Immediate(Smi::FromInt(array_index))); |
StoreArrayLiteralElementStub stub(isolate()); |
__ CallStub(&stub); |
} |
- |
PrepareForBailoutForId(expr->GetIdForElement(array_index), NO_REGISTERS); |
} |