Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(206)

Unified Diff: src/full-codegen/x87/full-codegen-x87.cc

Issue 2361393005: Reland of [fullcodegen] Refactor code that calls store ICs. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/full-codegen/x64/full-codegen-x64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f59bab99e6c5f6258d8a0f7006e633550505a711..89e13a8739a999cbe048837ef296e642bbc8cb5f 100644
--- a/src/full-codegen/x87/full-codegen-x87.cc
+++ b/src/full-codegen/x87/full-codegen-x87.cc
@@ -1084,11 +1084,8 @@
FeedbackVectorSlot slot) {
DCHECK(NeedsHomeObject(initializer));
__ mov(StoreDescriptor::ReceiverRegister(), Operand(esp, 0));
- __ mov(StoreDescriptor::NameRegister(),
- Immediate(isolate()->factory()->home_object_symbol()));
__ mov(StoreDescriptor::ValueRegister(), Operand(esp, offset * kPointerSize));
- EmitLoadStoreICSlot(slot);
- CallStoreIC();
+ CallStoreIC(slot, isolate()->factory()->home_object_symbol());
}
@@ -1097,11 +1094,8 @@
FeedbackVectorSlot slot) {
DCHECK(NeedsHomeObject(initializer));
__ mov(StoreDescriptor::ReceiverRegister(), eax);
- __ mov(StoreDescriptor::NameRegister(),
- Immediate(isolate()->factory()->home_object_symbol()));
__ mov(StoreDescriptor::ValueRegister(), Operand(esp, offset * kPointerSize));
- EmitLoadStoreICSlot(slot);
- CallStoreIC();
+ CallStoreIC(slot, isolate()->factory()->home_object_symbol());
}
@@ -1336,10 +1330,8 @@
if (property->emit_store()) {
VisitForAccumulatorValue(value);
DCHECK(StoreDescriptor::ValueRegister().is(eax));
- __ mov(StoreDescriptor::NameRegister(), Immediate(key->value()));
__ mov(StoreDescriptor::ReceiverRegister(), Operand(esp, 0));
- EmitLoadStoreICSlot(property->GetSlot(0));
- CallStoreIC();
+ CallStoreIC(property->GetSlot(0), key->value());
PrepareForBailoutForId(key->id(), BailoutState::NO_REGISTERS);
if (NeedsHomeObject(value)) {
EmitSetHomeObjectAccumulator(value, 0, property->GetSlot(1));
@@ -1530,8 +1522,7 @@
__ mov(StoreDescriptor::NameRegister(),
Immediate(Smi::FromInt(array_index)));
__ mov(StoreDescriptor::ReceiverRegister(), Operand(esp, 0));
- EmitLoadStoreICSlot(expr->LiteralFeedbackSlot());
- CallKeyedStoreIC();
+ CallKeyedStoreIC(expr->LiteralFeedbackSlot());
PrepareForBailoutForId(expr->GetIdForElement(array_index),
BailoutState::NO_REGISTERS);
}
@@ -1954,10 +1945,7 @@
VisitForAccumulatorValue(prop->obj());
__ Move(StoreDescriptor::ReceiverRegister(), eax);
PopOperand(StoreDescriptor::ValueRegister()); // Restore value.
- __ mov(StoreDescriptor::NameRegister(),
- prop->key()->AsLiteral()->value());
- EmitLoadStoreICSlot(slot);
- CallStoreIC();
+ CallStoreIC(slot, prop->key()->AsLiteral()->value());
break;
}
case NAMED_SUPER_PROPERTY: {
@@ -2004,8 +1992,7 @@
__ Move(StoreDescriptor::NameRegister(), eax);
PopOperand(StoreDescriptor::ReceiverRegister()); // Receiver.
PopOperand(StoreDescriptor::ValueRegister()); // Restore value.
- EmitLoadStoreICSlot(slot);
- CallKeyedStoreIC();
+ CallKeyedStoreIC(slot);
break;
}
}
@@ -2028,13 +2015,11 @@
FeedbackVectorSlot slot) {
if (var->IsUnallocated()) {
// Global var, const, or let.
- __ mov(StoreDescriptor::NameRegister(), var->name());
__ mov(StoreDescriptor::ReceiverRegister(), NativeContextOperand());
__ mov(StoreDescriptor::ReceiverRegister(),
ContextOperand(StoreDescriptor::ReceiverRegister(),
Context::EXTENSION_INDEX));
- EmitLoadStoreICSlot(slot);
- CallStoreIC();
+ CallStoreIC(slot, var->name());
} else if (IsLexicalVariableMode(var->mode()) && op != Token::INIT) {
DCHECK(!var->IsLookupSlot());
@@ -2102,10 +2087,8 @@
DCHECK(prop != NULL);
DCHECK(prop->key()->IsLiteral());
- __ mov(StoreDescriptor::NameRegister(), prop->key()->AsLiteral()->value());
PopOperand(StoreDescriptor::ReceiverRegister());
- EmitLoadStoreICSlot(expr->AssignmentSlot());
- CallStoreIC();
+ CallStoreIC(expr->AssignmentSlot(), prop->key()->AsLiteral()->value());
PrepareForBailoutForId(expr->AssignmentId(), BailoutState::TOS_REGISTER);
context()->Plug(eax);
}
@@ -2148,8 +2131,7 @@
PopOperand(StoreDescriptor::NameRegister()); // Key.
PopOperand(StoreDescriptor::ReceiverRegister());
DCHECK(StoreDescriptor::ValueRegister().is(eax));
- EmitLoadStoreICSlot(expr->AssignmentSlot());
- CallKeyedStoreIC();
+ CallKeyedStoreIC(expr->AssignmentSlot());
PrepareForBailoutForId(expr->AssignmentId(), BailoutState::TOS_REGISTER);
context()->Plug(eax);
}
@@ -3194,11 +3176,8 @@
}
break;
case NAMED_PROPERTY: {
- __ mov(StoreDescriptor::NameRegister(),
- prop->key()->AsLiteral()->value());
PopOperand(StoreDescriptor::ReceiverRegister());
- EmitLoadStoreICSlot(expr->CountSlot());
- CallStoreIC();
+ CallStoreIC(expr->CountSlot(), prop->key()->AsLiteral()->value());
PrepareForBailoutForId(expr->AssignmentId(), BailoutState::TOS_REGISTER);
if (expr->is_postfix()) {
if (!context()->IsEffect()) {
@@ -3236,8 +3215,7 @@
case KEYED_PROPERTY: {
PopOperand(StoreDescriptor::NameRegister());
PopOperand(StoreDescriptor::ReceiverRegister());
- EmitLoadStoreICSlot(expr->CountSlot());
- CallKeyedStoreIC();
+ CallKeyedStoreIC(expr->CountSlot());
PrepareForBailoutForId(expr->AssignmentId(), BailoutState::TOS_REGISTER);
if (expr->is_postfix()) {
// Result is on the stack
« no previous file with comments | « src/full-codegen/x64/full-codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698