Commit 4960fc0b authored by chunyang.dai's avatar chunyang.dai Committed by Commit bot

X87: Vector ICs: Turbofan vector store ic support

port 17c8ffea (r29173)

original commit message:

    Vector ICs: Turbofan vector store ic support

    Turbofan needs to pass vector slots around for named and keyed stores.
    Also, the CL addresses a missing slot for ClassLiterals.

BUG=

Review URL: https://codereview.chromium.org/1195793007

Cr-Commit-Position: refs/heads/master@{#29212}
parent f2ac8520
......@@ -2454,7 +2454,8 @@ void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr,
}
void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) {
void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit,
int* used_store_slots) {
// Constructor is in eax.
DCHECK(lit != NULL);
__ push(eax);
......@@ -2465,10 +2466,6 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) {
__ mov(scratch, FieldOperand(eax, JSFunction::kPrototypeOrInitialMapOffset));
__ Push(scratch);
// store_slot_index points to the vector IC slot for the next store IC used.
// ClassLiteral::ComputeFeedbackRequirements controls the allocation of slots
// and must be updated if the number of store ICs emitted here changes.
int store_slot_index = 0;
for (int i = 0; i < lit->properties()->length(); i++) {
ObjectLiteral::Property* property = lit->properties()->at(i);
Expression* value = property->value();
......@@ -2491,7 +2488,7 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) {
VisitForStackValue(value);
EmitSetHomeObjectIfNeeded(value, 2,
lit->SlotForHomeObject(value, &store_slot_index));
lit->SlotForHomeObject(value, used_store_slots));
switch (property->kind()) {
case ObjectLiteral::Property::CONSTANT:
......@@ -2519,10 +2516,6 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) {
// constructor
__ CallRuntime(Runtime::kToFastProperties, 1);
// Verify that compilation exactly consumed the number of store ic slots that
// the ClassLiteral node had to offer.
DCHECK(!FLAG_vector_stores || store_slot_index == lit->slot_count());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment