X87: VectorICs: use a vector slot to aid in array literal processing.
port f2f46aff8b
(r31242).
original commit message:
The lack of a vector slot for the keyed store operation in filling in
non-constant array literal properties led to undesirable contortions in
compilers downwind of full-codegen. The use of a single slot to initialize all
the array elements is sufficient.
BUG=
Review URL: https://codereview.chromium.org/1422443004
Cr-Commit-Position: refs/heads/master@{#31505}
This commit is contained in:
parent
562047df0f
commit
9826a77f33
@ -1653,7 +1653,6 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
|
|||||||
void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
|
void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
|
||||||
Comment cmnt(masm_, "[ ArrayLiteral");
|
Comment cmnt(masm_, "[ ArrayLiteral");
|
||||||
|
|
||||||
expr->BuildConstantElements(isolate());
|
|
||||||
Handle<FixedArray> constant_elements = expr->constant_elements();
|
Handle<FixedArray> constant_elements = expr->constant_elements();
|
||||||
bool has_constant_fast_elements =
|
bool has_constant_fast_elements =
|
||||||
IsFastObjectElementsKind(expr->constant_elements_kind());
|
IsFastObjectElementsKind(expr->constant_elements_kind());
|
||||||
@ -1704,7 +1703,15 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
|
|||||||
}
|
}
|
||||||
VisitForAccumulatorValue(subexpr);
|
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
|
// Fast-case array literal with ElementsKind of FAST_*_ELEMENTS, they
|
||||||
// cannot transition and don't need to call the runtime stub.
|
// cannot transition and don't need to call the runtime stub.
|
||||||
int offset = FixedArray::kHeaderSize + (array_index * kPointerSize);
|
int offset = FixedArray::kHeaderSize + (array_index * kPointerSize);
|
||||||
|
Loading…
Reference in New Issue
Block a user