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

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

Issue 513533003: X87: Move register conventions out of the IC classes. (Closed) Base URL: https://chromium.googlesource.com/external/v8.git@bleeding_edge
Patch Set: Created 6 years, 4 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/x87/debug-x87.cc ('k') | src/x87/lithium-codegen-x87.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x87/full-codegen-x87.cc
diff --git a/src/x87/full-codegen-x87.cc b/src/x87/full-codegen-x87.cc
index a9ea85a5985136c375e4d32f212d90fe2be0ea18..b8803c6cc350f266a303c4701e364368bb5cbc2d 100644
--- a/src/x87/full-codegen-x87.cc
+++ b/src/x87/full-codegen-x87.cc
@@ -1324,10 +1324,10 @@ void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy,
// All extension objects were empty and it is safe to use a global
// load IC call.
- __ mov(LoadIC::ReceiverRegister(), GlobalObjectOperand());
- __ mov(LoadIC::NameRegister(), proxy->var()->name());
+ __ mov(LoadConvention::ReceiverRegister(), GlobalObjectOperand());
+ __ mov(LoadConvention::NameRegister(), proxy->var()->name());
if (FLAG_vector_ics) {
- __ mov(LoadIC::SlotRegister(),
+ __ mov(VectorLoadConvention::SlotRegister(),
Immediate(Smi::FromInt(proxy->VariableFeedbackSlot())));
}
@@ -1411,10 +1411,10 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
switch (var->location()) {
case Variable::UNALLOCATED: {
Comment cmnt(masm_, "[ Global variable");
- __ mov(LoadIC::ReceiverRegister(), GlobalObjectOperand());
- __ mov(LoadIC::NameRegister(), var->name());
+ __ mov(LoadConvention::ReceiverRegister(), GlobalObjectOperand());
+ __ mov(LoadConvention::NameRegister(), var->name());
if (FLAG_vector_ics) {
- __ mov(LoadIC::SlotRegister(),
+ __ mov(VectorLoadConvention::SlotRegister(),
Immediate(Smi::FromInt(proxy->VariableFeedbackSlot())));
}
CallLoadIC(CONTEXTUAL);
@@ -1630,9 +1630,9 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
if (key->value()->IsInternalizedString()) {
if (property->emit_store()) {
VisitForAccumulatorValue(value);
- DCHECK(StoreIC::ValueRegister().is(eax));
- __ mov(StoreIC::NameRegister(), Immediate(key->value()));
- __ mov(StoreIC::ReceiverRegister(), Operand(esp, 0));
+ DCHECK(StoreConvention::ValueRegister().is(eax));
+ __ mov(StoreConvention::NameRegister(), Immediate(key->value()));
+ __ mov(StoreConvention::ReceiverRegister(), Operand(esp, 0));
CallStoreIC(key->LiteralFeedbackId());
PrepareForBailoutForId(key->id(), NO_REGISTERS);
} else {
@@ -1810,7 +1810,7 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) {
if (expr->is_compound()) {
// We need the receiver both on the stack and in the register.
VisitForStackValue(property->obj());
- __ mov(LoadIC::ReceiverRegister(), Operand(esp, 0));
+ __ mov(LoadConvention::ReceiverRegister(), Operand(esp, 0));
} else {
VisitForStackValue(property->obj());
}
@@ -1819,8 +1819,8 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) {
if (expr->is_compound()) {
VisitForStackValue(property->obj());
VisitForStackValue(property->key());
- __ mov(LoadIC::ReceiverRegister(), Operand(esp, kPointerSize));
- __ mov(LoadIC::NameRegister(), Operand(esp, 0));
+ __ mov(LoadConvention::ReceiverRegister(), Operand(esp, kPointerSize));
+ __ mov(LoadConvention::NameRegister(), Operand(esp, 0));
} else {
VisitForStackValue(property->obj());
VisitForStackValue(property->key());
@@ -1960,8 +1960,8 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
Label l_catch, l_try, l_suspend, l_continuation, l_resume;
Label l_next, l_call, l_loop;
- Register load_receiver = LoadIC::ReceiverRegister();
- Register load_name = LoadIC::NameRegister();
+ Register load_receiver = LoadConvention::ReceiverRegister();
+ Register load_name = LoadConvention::NameRegister();
// Initial send value is undefined.
__ mov(eax, isolate()->factory()->undefined_value());
@@ -2017,7 +2017,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ bind(&l_call);
__ mov(load_receiver, Operand(esp, kPointerSize));
if (FLAG_vector_ics) {
- __ mov(LoadIC::SlotRegister(),
+ __ mov(VectorLoadConvention::SlotRegister(),
Immediate(Smi::FromInt(expr->KeyedLoadFeedbackSlot())));
}
Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
@@ -2037,7 +2037,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ mov(load_name,
isolate()->factory()->done_string()); // "done"
if (FLAG_vector_ics) {
- __ mov(LoadIC::SlotRegister(),
+ __ mov(VectorLoadConvention::SlotRegister(),
Immediate(Smi::FromInt(expr->DoneFeedbackSlot())));
}
CallLoadIC(NOT_CONTEXTUAL); // result.done in eax
@@ -2051,7 +2051,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ mov(load_name,
isolate()->factory()->value_string()); // "value"
if (FLAG_vector_ics) {
- __ mov(LoadIC::SlotRegister(),
+ __ mov(VectorLoadConvention::SlotRegister(),
Immediate(Smi::FromInt(expr->ValueFeedbackSlot())));
}
CallLoadIC(NOT_CONTEXTUAL); // result.value in eax
@@ -2213,9 +2213,9 @@ void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
SetSourcePosition(prop->position());
Literal* key = prop->key()->AsLiteral();
DCHECK(!key->value()->IsSmi());
- __ mov(LoadIC::NameRegister(), Immediate(key->value()));
+ __ mov(LoadConvention::NameRegister(), Immediate(key->value()));
if (FLAG_vector_ics) {
- __ mov(LoadIC::SlotRegister(),
+ __ mov(VectorLoadConvention::SlotRegister(),
Immediate(Smi::FromInt(prop->PropertyFeedbackSlot())));
CallLoadIC(NOT_CONTEXTUAL);
} else {
@@ -2228,7 +2228,7 @@ void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
SetSourcePosition(prop->position());
Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
if (FLAG_vector_ics) {
- __ mov(LoadIC::SlotRegister(),
+ __ mov(VectorLoadConvention::SlotRegister(),
Immediate(Smi::FromInt(prop->PropertyFeedbackSlot())));
CallIC(ic);
} else {
@@ -2368,9 +2368,10 @@ void FullCodeGenerator::EmitAssignment(Expression* expr) {
case NAMED_PROPERTY: {
__ push(eax); // Preserve value.
VisitForAccumulatorValue(prop->obj());
- __ Move(StoreIC::ReceiverRegister(), eax);
- __ pop(StoreIC::ValueRegister()); // Restore value.
- __ mov(StoreIC::NameRegister(), prop->key()->AsLiteral()->value());
+ __ Move(StoreConvention::ReceiverRegister(), eax);
+ __ pop(StoreConvention::ValueRegister()); // Restore value.
+ __ mov(StoreConvention::NameRegister(),
+ prop->key()->AsLiteral()->value());
CallStoreIC();
break;
}
@@ -2378,9 +2379,9 @@ void FullCodeGenerator::EmitAssignment(Expression* expr) {
__ push(eax); // Preserve value.
VisitForStackValue(prop->obj());
VisitForAccumulatorValue(prop->key());
- __ Move(KeyedStoreIC::NameRegister(), eax);
- __ pop(KeyedStoreIC::ReceiverRegister()); // Receiver.
- __ pop(KeyedStoreIC::ValueRegister()); // Restore value.
+ __ Move(StoreConvention::NameRegister(), eax);
+ __ pop(StoreConvention::ReceiverRegister()); // Receiver.
+ __ pop(StoreConvention::ValueRegister()); // Restore value.
Handle<Code> ic = strict_mode() == SLOPPY
? isolate()->builtins()->KeyedStoreIC_Initialize()
: isolate()->builtins()->KeyedStoreIC_Initialize_Strict();
@@ -2407,8 +2408,8 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var,
Token::Value op) {
if (var->IsUnallocated()) {
// Global var, const, or let.
- __ mov(StoreIC::NameRegister(), var->name());
- __ mov(StoreIC::ReceiverRegister(), GlobalObjectOperand());
+ __ mov(StoreConvention::NameRegister(), var->name());
+ __ mov(StoreConvention::ReceiverRegister(), GlobalObjectOperand());
CallStoreIC();
} else if (op == Token::INIT_CONST_LEGACY) {
@@ -2481,8 +2482,8 @@ void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) {
// Record source code position before IC call.
SetSourcePosition(expr->position());
- __ mov(StoreIC::NameRegister(), prop->key()->AsLiteral()->value());
- __ pop(StoreIC::ReceiverRegister());
+ __ mov(StoreConvention::NameRegister(), prop->key()->AsLiteral()->value());
+ __ pop(StoreConvention::ReceiverRegister());
CallStoreIC(expr->AssignmentFeedbackId());
PrepareForBailoutForId(expr->AssignmentId(), TOS_REG);
context()->Plug(eax);
@@ -2495,9 +2496,9 @@ void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) {
// esp[0] : key
// esp[kPointerSize] : receiver
- __ pop(KeyedStoreIC::NameRegister()); // Key.
- __ pop(KeyedStoreIC::ReceiverRegister());
- DCHECK(KeyedStoreIC::ValueRegister().is(eax));
+ __ pop(StoreConvention::NameRegister()); // Key.
+ __ pop(StoreConvention::ReceiverRegister());
+ DCHECK(StoreConvention::ValueRegister().is(eax));
// Record source code position before IC call.
SetSourcePosition(expr->position());
Handle<Code> ic = strict_mode() == SLOPPY
@@ -2516,15 +2517,15 @@ void FullCodeGenerator::VisitProperty(Property* expr) {
if (key->IsPropertyName()) {
VisitForAccumulatorValue(expr->obj());
- __ Move(LoadIC::ReceiverRegister(), result_register());
+ __ Move(LoadConvention::ReceiverRegister(), result_register());
EmitNamedPropertyLoad(expr);
PrepareForBailoutForId(expr->LoadId(), TOS_REG);
context()->Plug(eax);
} else {
VisitForStackValue(expr->obj());
VisitForAccumulatorValue(expr->key());
- __ pop(LoadIC::ReceiverRegister()); // Object.
- __ Move(LoadIC::NameRegister(), result_register()); // Key.
+ __ pop(LoadConvention::ReceiverRegister()); // Object.
+ __ Move(LoadConvention::NameRegister(), result_register()); // Key.
EmitKeyedPropertyLoad(expr);
context()->Plug(eax);
}
@@ -2557,7 +2558,7 @@ void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) {
} else {
// Load the function from the receiver.
DCHECK(callee->IsProperty());
- __ mov(LoadIC::ReceiverRegister(), Operand(esp, 0));
+ __ mov(LoadConvention::ReceiverRegister(), Operand(esp, 0));
EmitNamedPropertyLoad(callee->AsProperty());
PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG);
// Push the target function under the receiver.
@@ -2579,8 +2580,8 @@ void FullCodeGenerator::EmitKeyedCallWithLoadIC(Call* expr,
// Load the function from the receiver.
DCHECK(callee->IsProperty());
- __ mov(LoadIC::ReceiverRegister(), Operand(esp, 0));
- __ mov(LoadIC::NameRegister(), eax);
+ __ mov(LoadConvention::ReceiverRegister(), Operand(esp, 0));
+ __ mov(LoadConvention::NameRegister(), eax);
EmitKeyedPropertyLoad(callee->AsProperty());
PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG);
@@ -4037,10 +4038,10 @@ void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) {
__ push(FieldOperand(eax, GlobalObject::kBuiltinsOffset));
// Load the function from the receiver.
- __ mov(LoadIC::ReceiverRegister(), Operand(esp, 0));
- __ mov(LoadIC::NameRegister(), Immediate(expr->name()));
+ __ mov(LoadConvention::ReceiverRegister(), Operand(esp, 0));
+ __ mov(LoadConvention::NameRegister(), Immediate(expr->name()));
if (FLAG_vector_ics) {
- __ mov(LoadIC::SlotRegister(),
+ __ mov(VectorLoadConvention::SlotRegister(),
Immediate(Smi::FromInt(expr->CallRuntimeFeedbackSlot())));
CallLoadIC(NOT_CONTEXTUAL);
} else {
@@ -4227,14 +4228,14 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
if (assign_type == NAMED_PROPERTY) {
// Put the object both on the stack and in the register.
VisitForStackValue(prop->obj());
- __ mov(LoadIC::ReceiverRegister(), Operand(esp, 0));
+ __ mov(LoadConvention::ReceiverRegister(), Operand(esp, 0));
EmitNamedPropertyLoad(prop);
} else {
VisitForStackValue(prop->obj());
VisitForStackValue(prop->key());
- __ mov(LoadIC::ReceiverRegister(),
- Operand(esp, kPointerSize)); // Object.
- __ mov(LoadIC::NameRegister(), Operand(esp, 0)); // Key.
+ __ mov(LoadConvention::ReceiverRegister(),
+ Operand(esp, kPointerSize)); // Object.
+ __ mov(LoadConvention::NameRegister(), Operand(esp, 0)); // Key.
EmitKeyedPropertyLoad(prop);
}
}
@@ -4349,8 +4350,9 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
}
break;
case NAMED_PROPERTY: {
- __ mov(StoreIC::NameRegister(), prop->key()->AsLiteral()->value());
- __ pop(StoreIC::ReceiverRegister());
+ __ mov(StoreConvention::NameRegister(),
+ prop->key()->AsLiteral()->value());
+ __ pop(StoreConvention::ReceiverRegister());
CallStoreIC(expr->CountStoreFeedbackId());
PrepareForBailoutForId(expr->AssignmentId(), TOS_REG);
if (expr->is_postfix()) {
@@ -4363,8 +4365,8 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
break;
}
case KEYED_PROPERTY: {
- __ pop(KeyedStoreIC::NameRegister());
- __ pop(KeyedStoreIC::ReceiverRegister());
+ __ pop(StoreConvention::NameRegister());
+ __ pop(StoreConvention::ReceiverRegister());
Handle<Code> ic = strict_mode() == SLOPPY
? isolate()->builtins()->KeyedStoreIC_Initialize()
: isolate()->builtins()->KeyedStoreIC_Initialize_Strict();
@@ -4391,10 +4393,10 @@ void FullCodeGenerator::VisitForTypeofValue(Expression* expr) {
if (proxy != NULL && proxy->var()->IsUnallocated()) {
Comment cmnt(masm_, "[ Global variable");
- __ mov(LoadIC::ReceiverRegister(), GlobalObjectOperand());
- __ mov(LoadIC::NameRegister(), Immediate(proxy->name()));
+ __ mov(LoadConvention::ReceiverRegister(), GlobalObjectOperand());
+ __ mov(LoadConvention::NameRegister(), Immediate(proxy->name()));
if (FLAG_vector_ics) {
- __ mov(LoadIC::SlotRegister(),
+ __ mov(VectorLoadConvention::SlotRegister(),
Immediate(Smi::FromInt(proxy->VariableFeedbackSlot())));
}
// Use a regular load, not a contextual load, to avoid a reference
« no previous file with comments | « src/x87/debug-x87.cc ('k') | src/x87/lithium-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698