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

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

Issue 544943002: X87: Make concrete classes for individual call descriptors (Closed) Base URL: https://github.com/v8/v8.git@bleeding_edge
Patch Set: Created 6 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/x87/debug-x87.cc ('k') | src/x87/interface-descriptors-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 b72ff86d9be8edc5c2faf651884476f58c008eb1..a9b2b31b1cf96b842704740f344877f0ec86d4b9 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(LoadConvention::ReceiverRegister(), GlobalObjectOperand());
- __ mov(LoadConvention::NameRegister(), proxy->var()->name());
+ __ mov(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand());
+ __ mov(LoadDescriptor::NameRegister(), proxy->var()->name());
if (FLAG_vector_ics) {
- __ mov(VectorLoadConvention::SlotRegister(),
+ __ mov(VectorLoadICDescriptor::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(LoadConvention::ReceiverRegister(), GlobalObjectOperand());
- __ mov(LoadConvention::NameRegister(), var->name());
+ __ mov(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand());
+ __ mov(LoadDescriptor::NameRegister(), var->name());
if (FLAG_vector_ics) {
- __ mov(VectorLoadConvention::SlotRegister(),
+ __ mov(VectorLoadICDescriptor::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(StoreConvention::ValueRegister().is(eax));
- __ mov(StoreConvention::NameRegister(), Immediate(key->value()));
- __ mov(StoreConvention::ReceiverRegister(), Operand(esp, 0));
+ DCHECK(StoreDescriptor::ValueRegister().is(eax));
+ __ mov(StoreDescriptor::NameRegister(), Immediate(key->value()));
+ __ mov(StoreDescriptor::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(LoadConvention::ReceiverRegister(), Operand(esp, 0));
+ __ mov(LoadDescriptor::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(LoadConvention::ReceiverRegister(), Operand(esp, kPointerSize));
- __ mov(LoadConvention::NameRegister(), Operand(esp, 0));
+ __ mov(LoadDescriptor::ReceiverRegister(), Operand(esp, kPointerSize));
+ __ mov(LoadDescriptor::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 = LoadConvention::ReceiverRegister();
- Register load_name = LoadConvention::NameRegister();
+ Register load_receiver = LoadDescriptor::ReceiverRegister();
+ Register load_name = LoadDescriptor::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(VectorLoadConvention::SlotRegister(),
+ __ mov(VectorLoadICDescriptor::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(VectorLoadConvention::SlotRegister(),
+ __ mov(VectorLoadICDescriptor::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(VectorLoadConvention::SlotRegister(),
+ __ mov(VectorLoadICDescriptor::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(LoadConvention::NameRegister(), Immediate(key->value()));
+ __ mov(LoadDescriptor::NameRegister(), Immediate(key->value()));
if (FLAG_vector_ics) {
- __ mov(VectorLoadConvention::SlotRegister(),
+ __ mov(VectorLoadICDescriptor::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(VectorLoadConvention::SlotRegister(),
+ __ mov(VectorLoadICDescriptor::SlotRegister(),
Immediate(Smi::FromInt(prop->PropertyFeedbackSlot())));
CallIC(ic);
} else {
@@ -2368,9 +2368,9 @@ void FullCodeGenerator::EmitAssignment(Expression* expr) {
case NAMED_PROPERTY: {
__ push(eax); // Preserve value.
VisitForAccumulatorValue(prop->obj());
- __ Move(StoreConvention::ReceiverRegister(), eax);
- __ pop(StoreConvention::ValueRegister()); // Restore value.
- __ mov(StoreConvention::NameRegister(),
+ __ Move(StoreDescriptor::ReceiverRegister(), eax);
+ __ pop(StoreDescriptor::ValueRegister()); // Restore value.
+ __ mov(StoreDescriptor::NameRegister(),
prop->key()->AsLiteral()->value());
CallStoreIC();
break;
@@ -2379,9 +2379,9 @@ void FullCodeGenerator::EmitAssignment(Expression* expr) {
__ push(eax); // Preserve value.
VisitForStackValue(prop->obj());
VisitForAccumulatorValue(prop->key());
- __ Move(StoreConvention::NameRegister(), eax);
- __ pop(StoreConvention::ReceiverRegister()); // Receiver.
- __ pop(StoreConvention::ValueRegister()); // Restore value.
+ __ Move(StoreDescriptor::NameRegister(), eax);
+ __ pop(StoreDescriptor::ReceiverRegister()); // Receiver.
+ __ pop(StoreDescriptor::ValueRegister()); // Restore value.
Handle<Code> ic = strict_mode() == SLOPPY
? isolate()->builtins()->KeyedStoreIC_Initialize()
: isolate()->builtins()->KeyedStoreIC_Initialize_Strict();
@@ -2408,8 +2408,8 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var,
Token::Value op) {
if (var->IsUnallocated()) {
// Global var, const, or let.
- __ mov(StoreConvention::NameRegister(), var->name());
- __ mov(StoreConvention::ReceiverRegister(), GlobalObjectOperand());
+ __ mov(StoreDescriptor::NameRegister(), var->name());
+ __ mov(StoreDescriptor::ReceiverRegister(), GlobalObjectOperand());
CallStoreIC();
} else if (op == Token::INIT_CONST_LEGACY) {
@@ -2482,8 +2482,8 @@ void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) {
// Record source code position before IC call.
SetSourcePosition(expr->position());
- __ mov(StoreConvention::NameRegister(), prop->key()->AsLiteral()->value());
- __ pop(StoreConvention::ReceiverRegister());
+ __ mov(StoreDescriptor::NameRegister(), prop->key()->AsLiteral()->value());
+ __ pop(StoreDescriptor::ReceiverRegister());
CallStoreIC(expr->AssignmentFeedbackId());
PrepareForBailoutForId(expr->AssignmentId(), TOS_REG);
context()->Plug(eax);
@@ -2496,9 +2496,9 @@ void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) {
// esp[0] : key
// esp[kPointerSize] : receiver
- __ pop(StoreConvention::NameRegister()); // Key.
- __ pop(StoreConvention::ReceiverRegister());
- DCHECK(StoreConvention::ValueRegister().is(eax));
+ __ pop(StoreDescriptor::NameRegister()); // Key.
+ __ pop(StoreDescriptor::ReceiverRegister());
+ DCHECK(StoreDescriptor::ValueRegister().is(eax));
// Record source code position before IC call.
SetSourcePosition(expr->position());
Handle<Code> ic = strict_mode() == SLOPPY
@@ -2517,15 +2517,15 @@ void FullCodeGenerator::VisitProperty(Property* expr) {
if (key->IsPropertyName()) {
VisitForAccumulatorValue(expr->obj());
- __ Move(LoadConvention::ReceiverRegister(), result_register());
+ __ Move(LoadDescriptor::ReceiverRegister(), result_register());
EmitNamedPropertyLoad(expr);
PrepareForBailoutForId(expr->LoadId(), TOS_REG);
context()->Plug(eax);
} else {
VisitForStackValue(expr->obj());
VisitForAccumulatorValue(expr->key());
- __ pop(LoadConvention::ReceiverRegister()); // Object.
- __ Move(LoadConvention::NameRegister(), result_register()); // Key.
+ __ pop(LoadDescriptor::ReceiverRegister()); // Object.
+ __ Move(LoadDescriptor::NameRegister(), result_register()); // Key.
EmitKeyedPropertyLoad(expr);
context()->Plug(eax);
}
@@ -2558,7 +2558,7 @@ void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) {
} else {
// Load the function from the receiver.
DCHECK(callee->IsProperty());
- __ mov(LoadConvention::ReceiverRegister(), Operand(esp, 0));
+ __ mov(LoadDescriptor::ReceiverRegister(), Operand(esp, 0));
EmitNamedPropertyLoad(callee->AsProperty());
PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG);
// Push the target function under the receiver.
@@ -2580,8 +2580,8 @@ void FullCodeGenerator::EmitKeyedCallWithLoadIC(Call* expr,
// Load the function from the receiver.
DCHECK(callee->IsProperty());
- __ mov(LoadConvention::ReceiverRegister(), Operand(esp, 0));
- __ mov(LoadConvention::NameRegister(), eax);
+ __ mov(LoadDescriptor::ReceiverRegister(), Operand(esp, 0));
+ __ mov(LoadDescriptor::NameRegister(), eax);
EmitKeyedPropertyLoad(callee->AsProperty());
PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG);
@@ -4038,10 +4038,10 @@ void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) {
__ push(FieldOperand(eax, GlobalObject::kBuiltinsOffset));
// Load the function from the receiver.
- __ mov(LoadConvention::ReceiverRegister(), Operand(esp, 0));
- __ mov(LoadConvention::NameRegister(), Immediate(expr->name()));
+ __ mov(LoadDescriptor::ReceiverRegister(), Operand(esp, 0));
+ __ mov(LoadDescriptor::NameRegister(), Immediate(expr->name()));
if (FLAG_vector_ics) {
- __ mov(VectorLoadConvention::SlotRegister(),
+ __ mov(VectorLoadICDescriptor::SlotRegister(),
Immediate(Smi::FromInt(expr->CallRuntimeFeedbackSlot())));
CallLoadIC(NOT_CONTEXTUAL);
} else {
@@ -4228,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(LoadConvention::ReceiverRegister(), Operand(esp, 0));
+ __ mov(LoadDescriptor::ReceiverRegister(), Operand(esp, 0));
EmitNamedPropertyLoad(prop);
} else {
VisitForStackValue(prop->obj());
VisitForStackValue(prop->key());
- __ mov(LoadConvention::ReceiverRegister(),
+ __ mov(LoadDescriptor::ReceiverRegister(),
Operand(esp, kPointerSize)); // Object.
- __ mov(LoadConvention::NameRegister(), Operand(esp, 0)); // Key.
+ __ mov(LoadDescriptor::NameRegister(), Operand(esp, 0)); // Key.
EmitKeyedPropertyLoad(prop);
}
}
@@ -4350,9 +4350,9 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
}
break;
case NAMED_PROPERTY: {
- __ mov(StoreConvention::NameRegister(),
+ __ mov(StoreDescriptor::NameRegister(),
prop->key()->AsLiteral()->value());
- __ pop(StoreConvention::ReceiverRegister());
+ __ pop(StoreDescriptor::ReceiverRegister());
CallStoreIC(expr->CountStoreFeedbackId());
PrepareForBailoutForId(expr->AssignmentId(), TOS_REG);
if (expr->is_postfix()) {
@@ -4365,8 +4365,8 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
break;
}
case KEYED_PROPERTY: {
- __ pop(StoreConvention::NameRegister());
- __ pop(StoreConvention::ReceiverRegister());
+ __ pop(StoreDescriptor::NameRegister());
+ __ pop(StoreDescriptor::ReceiverRegister());
Handle<Code> ic = strict_mode() == SLOPPY
? isolate()->builtins()->KeyedStoreIC_Initialize()
: isolate()->builtins()->KeyedStoreIC_Initialize_Strict();
@@ -4393,10 +4393,10 @@ void FullCodeGenerator::VisitForTypeofValue(Expression* expr) {
if (proxy != NULL && proxy->var()->IsUnallocated()) {
Comment cmnt(masm_, "[ Global variable");
- __ mov(LoadConvention::ReceiverRegister(), GlobalObjectOperand());
- __ mov(LoadConvention::NameRegister(), Immediate(proxy->name()));
+ __ mov(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand());
+ __ mov(LoadDescriptor::NameRegister(), Immediate(proxy->name()));
if (FLAG_vector_ics) {
- __ mov(VectorLoadConvention::SlotRegister(),
+ __ mov(VectorLoadICDescriptor::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/interface-descriptors-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698