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

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

Issue 2363123002: Revert 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 89e13a8739a999cbe048837ef296e642bbc8cb5f..f59bab99e6c5f6258d8a0f7006e633550505a711 100644
--- a/src/full-codegen/x87/full-codegen-x87.cc
+++ b/src/full-codegen/x87/full-codegen-x87.cc
@@ -1084,8 +1084,11 @@
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));
- CallStoreIC(slot, isolate()->factory()->home_object_symbol());
+ EmitLoadStoreICSlot(slot);
+ CallStoreIC();
}
@@ -1094,8 +1097,11 @@
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));
- CallStoreIC(slot, isolate()->factory()->home_object_symbol());
+ EmitLoadStoreICSlot(slot);
+ CallStoreIC();
}
@@ -1330,8 +1336,10 @@
if (property->emit_store()) {
VisitForAccumulatorValue(value);
DCHECK(StoreDescriptor::ValueRegister().is(eax));
+ __ mov(StoreDescriptor::NameRegister(), Immediate(key->value()));
__ mov(StoreDescriptor::ReceiverRegister(), Operand(esp, 0));
- CallStoreIC(property->GetSlot(0), key->value());
+ EmitLoadStoreICSlot(property->GetSlot(0));
+ CallStoreIC();
PrepareForBailoutForId(key->id(), BailoutState::NO_REGISTERS);
if (NeedsHomeObject(value)) {
EmitSetHomeObjectAccumulator(value, 0, property->GetSlot(1));
@@ -1522,7 +1530,8 @@
__ mov(StoreDescriptor::NameRegister(),
Immediate(Smi::FromInt(array_index)));
__ mov(StoreDescriptor::ReceiverRegister(), Operand(esp, 0));
- CallKeyedStoreIC(expr->LiteralFeedbackSlot());
+ EmitLoadStoreICSlot(expr->LiteralFeedbackSlot());
+ CallKeyedStoreIC();
PrepareForBailoutForId(expr->GetIdForElement(array_index),
BailoutState::NO_REGISTERS);
}
@@ -1945,7 +1954,10 @@
VisitForAccumulatorValue(prop->obj());
__ Move(StoreDescriptor::ReceiverRegister(), eax);
PopOperand(StoreDescriptor::ValueRegister()); // Restore value.
- CallStoreIC(slot, prop->key()->AsLiteral()->value());
+ __ mov(StoreDescriptor::NameRegister(),
+ prop->key()->AsLiteral()->value());
+ EmitLoadStoreICSlot(slot);
+ CallStoreIC();
break;
}
case NAMED_SUPER_PROPERTY: {
@@ -1992,7 +2004,8 @@
__ Move(StoreDescriptor::NameRegister(), eax);
PopOperand(StoreDescriptor::ReceiverRegister()); // Receiver.
PopOperand(StoreDescriptor::ValueRegister()); // Restore value.
- CallKeyedStoreIC(slot);
+ EmitLoadStoreICSlot(slot);
+ CallKeyedStoreIC();
break;
}
}
@@ -2015,11 +2028,13 @@
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));
- CallStoreIC(slot, var->name());
+ EmitLoadStoreICSlot(slot);
+ CallStoreIC();
} else if (IsLexicalVariableMode(var->mode()) && op != Token::INIT) {
DCHECK(!var->IsLookupSlot());
@@ -2087,8 +2102,10 @@
DCHECK(prop != NULL);
DCHECK(prop->key()->IsLiteral());
+ __ mov(StoreDescriptor::NameRegister(), prop->key()->AsLiteral()->value());
PopOperand(StoreDescriptor::ReceiverRegister());
- CallStoreIC(expr->AssignmentSlot(), prop->key()->AsLiteral()->value());
+ EmitLoadStoreICSlot(expr->AssignmentSlot());
+ CallStoreIC();
PrepareForBailoutForId(expr->AssignmentId(), BailoutState::TOS_REGISTER);
context()->Plug(eax);
}
@@ -2131,7 +2148,8 @@
PopOperand(StoreDescriptor::NameRegister()); // Key.
PopOperand(StoreDescriptor::ReceiverRegister());
DCHECK(StoreDescriptor::ValueRegister().is(eax));
- CallKeyedStoreIC(expr->AssignmentSlot());
+ EmitLoadStoreICSlot(expr->AssignmentSlot());
+ CallKeyedStoreIC();
PrepareForBailoutForId(expr->AssignmentId(), BailoutState::TOS_REGISTER);
context()->Plug(eax);
}
@@ -3176,8 +3194,11 @@
}
break;
case NAMED_PROPERTY: {
+ __ mov(StoreDescriptor::NameRegister(),
+ prop->key()->AsLiteral()->value());
PopOperand(StoreDescriptor::ReceiverRegister());
- CallStoreIC(expr->CountSlot(), prop->key()->AsLiteral()->value());
+ EmitLoadStoreICSlot(expr->CountSlot());
+ CallStoreIC();
PrepareForBailoutForId(expr->AssignmentId(), BailoutState::TOS_REGISTER);
if (expr->is_postfix()) {
if (!context()->IsEffect()) {
@@ -3215,7 +3236,8 @@
case KEYED_PROPERTY: {
PopOperand(StoreDescriptor::NameRegister());
PopOperand(StoreDescriptor::ReceiverRegister());
- CallKeyedStoreIC(expr->CountSlot());
+ EmitLoadStoreICSlot(expr->CountSlot());
+ CallKeyedStoreIC();
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