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

Unified Diff: src/full-codegen/ia32/full-codegen-ia32.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/full-codegen.cc ('k') | src/full-codegen/mips/full-codegen-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e7e6aa0fe29a054cc99f58df538b01b783c11858..28164bd80acd403a2c24b1f99a441069aa17e107 100644
--- a/src/full-codegen/ia32/full-codegen-ia32.cc
+++ b/src/full-codegen/ia32/full-codegen-ia32.cc
@@ -1092,8 +1092,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();
}
@@ -1102,8 +1105,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();
}
@@ -1338,8 +1344,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));
@@ -1530,7 +1538,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);
}
@@ -1953,7 +1962,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: {
@@ -2000,7 +2012,8 @@
__ Move(StoreDescriptor::NameRegister(), eax);
PopOperand(StoreDescriptor::ReceiverRegister()); // Receiver.
PopOperand(StoreDescriptor::ValueRegister()); // Restore value.
- CallKeyedStoreIC(slot);
+ EmitLoadStoreICSlot(slot);
+ CallKeyedStoreIC();
break;
}
}
@@ -2023,11 +2036,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());
@@ -2095,8 +2110,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);
}
@@ -2139,7 +2156,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);
}
@@ -3184,8 +3202,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()) {
@@ -3223,7 +3244,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/full-codegen.cc ('k') | src/full-codegen/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698