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

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

Issue 538573002: MIPS: Make concrete classes for individual call descriptors. - internal (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: mips64 port added. 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/mips/debug-mips.cc ('k') | src/mips/interface-descriptors-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/full-codegen-mips.cc
diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc
index ea48ade0b06740152095065aad0f3f8e9df00683..62205bd9849d94f8d69616fd088d2e223a4f7636 100644
--- a/src/mips/full-codegen-mips.cc
+++ b/src/mips/full-codegen-mips.cc
@@ -1386,10 +1386,10 @@ void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy,
__ bind(&fast);
}
- __ lw(LoadConvention::ReceiverRegister(), GlobalObjectOperand());
- __ li(LoadConvention::NameRegister(), Operand(proxy->var()->name()));
+ __ lw(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand());
+ __ li(LoadDescriptor::NameRegister(), Operand(proxy->var()->name()));
if (FLAG_vector_ics) {
- __ li(VectorLoadConvention::SlotRegister(),
+ __ li(VectorLoadICDescriptor::SlotRegister(),
Operand(Smi::FromInt(proxy->VariableFeedbackSlot())));
}
@@ -1475,10 +1475,10 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
switch (var->location()) {
case Variable::UNALLOCATED: {
Comment cmnt(masm_, "[ Global variable");
- __ lw(LoadConvention::ReceiverRegister(), GlobalObjectOperand());
- __ li(LoadConvention::NameRegister(), Operand(var->name()));
+ __ lw(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand());
+ __ li(LoadDescriptor::NameRegister(), Operand(var->name()));
if (FLAG_vector_ics) {
- __ li(VectorLoadConvention::SlotRegister(),
+ __ li(VectorLoadICDescriptor::SlotRegister(),
Operand(Smi::FromInt(proxy->VariableFeedbackSlot())));
}
CallLoadIC(CONTEXTUAL);
@@ -1688,10 +1688,10 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
if (key->value()->IsInternalizedString()) {
if (property->emit_store()) {
VisitForAccumulatorValue(value);
- __ mov(StoreConvention::ValueRegister(), result_register());
- DCHECK(StoreConvention::ValueRegister().is(a0));
- __ li(StoreConvention::NameRegister(), Operand(key->value()));
- __ lw(StoreConvention::ReceiverRegister(), MemOperand(sp));
+ __ mov(StoreDescriptor::ValueRegister(), result_register());
+ DCHECK(StoreDescriptor::ValueRegister().is(a0));
+ __ li(StoreDescriptor::NameRegister(), Operand(key->value()));
+ __ lw(StoreDescriptor::ReceiverRegister(), MemOperand(sp));
CallStoreIC(key->LiteralFeedbackId());
PrepareForBailoutForId(key->id(), NO_REGISTERS);
} else {
@@ -1873,7 +1873,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());
- __ lw(LoadConvention::ReceiverRegister(), MemOperand(sp, 0));
+ __ lw(LoadDescriptor::ReceiverRegister(), MemOperand(sp, 0));
} else {
VisitForStackValue(property->obj());
}
@@ -1883,9 +1883,9 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) {
if (expr->is_compound()) {
VisitForStackValue(property->obj());
VisitForStackValue(property->key());
- __ lw(LoadConvention::ReceiverRegister(),
+ __ lw(LoadDescriptor::ReceiverRegister(),
MemOperand(sp, 1 * kPointerSize));
- __ lw(LoadConvention::NameRegister(), MemOperand(sp, 0));
+ __ lw(LoadDescriptor::NameRegister(), MemOperand(sp, 0));
} else {
VisitForStackValue(property->obj());
VisitForStackValue(property->key());
@@ -2023,8 +2023,8 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
Label l_catch, l_try, l_suspend, l_continuation, l_resume;
Label l_next, l_call;
- 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.
__ LoadRoot(a0, Heap::kUndefinedValueRootIndex);
@@ -2082,7 +2082,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ lw(load_receiver, MemOperand(sp, kPointerSize));
__ lw(load_name, MemOperand(sp, 2 * kPointerSize));
if (FLAG_vector_ics) {
- __ li(VectorLoadConvention::SlotRegister(),
+ __ li(VectorLoadICDescriptor::SlotRegister(),
Operand(Smi::FromInt(expr->KeyedLoadFeedbackSlot())));
}
Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
@@ -2102,7 +2102,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ push(load_receiver); // save result
__ LoadRoot(load_name, Heap::kdone_stringRootIndex); // "done"
if (FLAG_vector_ics) {
- __ li(VectorLoadConvention::SlotRegister(),
+ __ li(VectorLoadICDescriptor::SlotRegister(),
Operand(Smi::FromInt(expr->DoneFeedbackSlot())));
}
CallLoadIC(NOT_CONTEXTUAL); // v0=result.done
@@ -2115,7 +2115,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ pop(load_receiver); // result
__ LoadRoot(load_name, Heap::kvalue_stringRootIndex); // "value"
if (FLAG_vector_ics) {
- __ li(VectorLoadConvention::SlotRegister(),
+ __ li(VectorLoadICDescriptor::SlotRegister(),
Operand(Smi::FromInt(expr->ValueFeedbackSlot())));
}
CallLoadIC(NOT_CONTEXTUAL); // v0=result.value
@@ -2280,9 +2280,9 @@ void FullCodeGenerator::EmitCreateIteratorResult(bool done) {
void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
SetSourcePosition(prop->position());
Literal* key = prop->key()->AsLiteral();
- __ li(LoadConvention::NameRegister(), Operand(key->value()));
+ __ li(LoadDescriptor::NameRegister(), Operand(key->value()));
if (FLAG_vector_ics) {
- __ li(VectorLoadConvention::SlotRegister(),
+ __ li(VectorLoadICDescriptor::SlotRegister(),
Operand(Smi::FromInt(prop->PropertyFeedbackSlot())));
CallLoadIC(NOT_CONTEXTUAL);
} else {
@@ -2295,7 +2295,7 @@ void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
SetSourcePosition(prop->position());
Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
if (FLAG_vector_ics) {
- __ li(VectorLoadConvention::SlotRegister(),
+ __ li(VectorLoadICDescriptor::SlotRegister(),
Operand(Smi::FromInt(prop->PropertyFeedbackSlot())));
CallIC(ic);
} else {
@@ -2434,9 +2434,9 @@ void FullCodeGenerator::EmitAssignment(Expression* expr) {
case NAMED_PROPERTY: {
__ push(result_register()); // Preserve value.
VisitForAccumulatorValue(prop->obj());
- __ mov(StoreConvention::ReceiverRegister(), result_register());
- __ pop(StoreConvention::ValueRegister()); // Restore value.
- __ li(StoreConvention::NameRegister(),
+ __ mov(StoreDescriptor::ReceiverRegister(), result_register());
+ __ pop(StoreDescriptor::ValueRegister()); // Restore value.
+ __ li(StoreDescriptor::NameRegister(),
Operand(prop->key()->AsLiteral()->value()));
CallStoreIC();
break;
@@ -2445,9 +2445,9 @@ void FullCodeGenerator::EmitAssignment(Expression* expr) {
__ push(result_register()); // Preserve value.
VisitForStackValue(prop->obj());
VisitForAccumulatorValue(prop->key());
- __ mov(StoreConvention::NameRegister(), result_register());
- __ Pop(StoreConvention::ValueRegister(),
- StoreConvention::ReceiverRegister());
+ __ mov(StoreDescriptor::NameRegister(), result_register());
+ __ Pop(StoreDescriptor::ValueRegister(),
+ StoreDescriptor::ReceiverRegister());
Handle<Code> ic = strict_mode() == SLOPPY
? isolate()->builtins()->KeyedStoreIC_Initialize()
: isolate()->builtins()->KeyedStoreIC_Initialize_Strict();
@@ -2475,9 +2475,9 @@ void FullCodeGenerator::EmitStoreToStackLocalOrContextSlot(
void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op) {
if (var->IsUnallocated()) {
// Global var, const, or let.
- __ mov(StoreConvention::ValueRegister(), result_register());
- __ li(StoreConvention::NameRegister(), Operand(var->name()));
- __ lw(StoreConvention::ReceiverRegister(), GlobalObjectOperand());
+ __ mov(StoreDescriptor::ValueRegister(), result_register());
+ __ li(StoreDescriptor::NameRegister(), Operand(var->name()));
+ __ lw(StoreDescriptor::ReceiverRegister(), GlobalObjectOperand());
CallStoreIC();
} else if (op == Token::INIT_CONST_LEGACY) {
@@ -2547,10 +2547,10 @@ void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) {
// Record source code position before IC call.
SetSourcePosition(expr->position());
- __ mov(StoreConvention::ValueRegister(), result_register());
- __ li(StoreConvention::NameRegister(),
+ __ mov(StoreDescriptor::ValueRegister(), result_register());
+ __ li(StoreDescriptor::NameRegister(),
Operand(prop->key()->AsLiteral()->value()));
- __ pop(StoreConvention::ReceiverRegister());
+ __ pop(StoreDescriptor::ReceiverRegister());
CallStoreIC(expr->AssignmentFeedbackId());
PrepareForBailoutForId(expr->AssignmentId(), TOS_REG);
@@ -2568,9 +2568,9 @@ void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) {
// - a0 is the value,
// - a1 is the key,
// - a2 is the receiver.
- __ mov(StoreConvention::ValueRegister(), result_register());
- __ Pop(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister());
- DCHECK(StoreConvention::ValueRegister().is(a0));
+ __ mov(StoreDescriptor::ValueRegister(), result_register());
+ __ Pop(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister());
+ DCHECK(StoreDescriptor::ValueRegister().is(a0));
Handle<Code> ic = strict_mode() == SLOPPY
? isolate()->builtins()->KeyedStoreIC_Initialize()
@@ -2588,15 +2588,15 @@ void FullCodeGenerator::VisitProperty(Property* expr) {
if (key->IsPropertyName()) {
VisitForAccumulatorValue(expr->obj());
- __ Move(LoadConvention::ReceiverRegister(), v0);
+ __ Move(LoadDescriptor::ReceiverRegister(), v0);
EmitNamedPropertyLoad(expr);
PrepareForBailoutForId(expr->LoadId(), TOS_REG);
context()->Plug(v0);
} else {
VisitForStackValue(expr->obj());
VisitForAccumulatorValue(expr->key());
- __ Move(LoadConvention::NameRegister(), v0);
- __ pop(LoadConvention::ReceiverRegister());
+ __ Move(LoadDescriptor::NameRegister(), v0);
+ __ pop(LoadDescriptor::ReceiverRegister());
EmitKeyedPropertyLoad(expr);
context()->Plug(v0);
}
@@ -2630,7 +2630,7 @@ void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) {
} else {
// Load the function from the receiver.
DCHECK(callee->IsProperty());
- __ lw(LoadConvention::ReceiverRegister(), MemOperand(sp, 0));
+ __ lw(LoadDescriptor::ReceiverRegister(), MemOperand(sp, 0));
EmitNamedPropertyLoad(callee->AsProperty());
PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG);
// Push the target function under the receiver.
@@ -2653,8 +2653,8 @@ void FullCodeGenerator::EmitKeyedCallWithLoadIC(Call* expr,
// Load the function from the receiver.
DCHECK(callee->IsProperty());
- __ lw(LoadConvention::ReceiverRegister(), MemOperand(sp, 0));
- __ Move(LoadConvention::NameRegister(), v0);
+ __ lw(LoadDescriptor::ReceiverRegister(), MemOperand(sp, 0));
+ __ Move(LoadDescriptor::NameRegister(), v0);
EmitKeyedPropertyLoad(callee->AsProperty());
PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG);
@@ -4098,15 +4098,15 @@ void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) {
if (expr->is_jsruntime()) {
// Push the builtins object as the receiver.
- Register receiver = LoadConvention::ReceiverRegister();
+ Register receiver = LoadDescriptor::ReceiverRegister();
__ lw(receiver, GlobalObjectOperand());
__ lw(receiver, FieldMemOperand(receiver, GlobalObject::kBuiltinsOffset));
__ push(receiver);
// Load the function from the receiver.
- __ li(LoadConvention::NameRegister(), Operand(expr->name()));
+ __ li(LoadDescriptor::NameRegister(), Operand(expr->name()));
if (FLAG_vector_ics) {
- __ li(VectorLoadConvention::SlotRegister(),
+ __ li(VectorLoadICDescriptor::SlotRegister(),
Operand(Smi::FromInt(expr->CallRuntimeFeedbackSlot())));
CallLoadIC(NOT_CONTEXTUAL);
} else {
@@ -4289,14 +4289,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());
- __ lw(LoadConvention::ReceiverRegister(), MemOperand(sp, 0));
+ __ lw(LoadDescriptor::ReceiverRegister(), MemOperand(sp, 0));
EmitNamedPropertyLoad(prop);
} else {
VisitForStackValue(prop->obj());
VisitForStackValue(prop->key());
- __ lw(LoadConvention::ReceiverRegister(),
+ __ lw(LoadDescriptor::ReceiverRegister(),
MemOperand(sp, 1 * kPointerSize));
- __ lw(LoadConvention::NameRegister(), MemOperand(sp, 0));
+ __ lw(LoadDescriptor::NameRegister(), MemOperand(sp, 0));
EmitKeyedPropertyLoad(prop);
}
}
@@ -4407,10 +4407,10 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
}
break;
case NAMED_PROPERTY: {
- __ mov(StoreConvention::ValueRegister(), result_register());
- __ li(StoreConvention::NameRegister(),
+ __ mov(StoreDescriptor::ValueRegister(), result_register());
+ __ li(StoreDescriptor::NameRegister(),
Operand(prop->key()->AsLiteral()->value()));
- __ pop(StoreConvention::ReceiverRegister());
+ __ pop(StoreDescriptor::ReceiverRegister());
CallStoreIC(expr->CountStoreFeedbackId());
PrepareForBailoutForId(expr->AssignmentId(), TOS_REG);
if (expr->is_postfix()) {
@@ -4423,9 +4423,9 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
break;
}
case KEYED_PROPERTY: {
- __ mov(StoreConvention::ValueRegister(), result_register());
- __ Pop(StoreConvention::ReceiverRegister(),
- StoreConvention::NameRegister());
+ __ mov(StoreDescriptor::ValueRegister(), result_register());
+ __ Pop(StoreDescriptor::ReceiverRegister(),
+ StoreDescriptor::NameRegister());
Handle<Code> ic = strict_mode() == SLOPPY
? isolate()->builtins()->KeyedStoreIC_Initialize()
: isolate()->builtins()->KeyedStoreIC_Initialize_Strict();
@@ -4450,10 +4450,10 @@ void FullCodeGenerator::VisitForTypeofValue(Expression* expr) {
VariableProxy* proxy = expr->AsVariableProxy();
if (proxy != NULL && proxy->var()->IsUnallocated()) {
Comment cmnt(masm_, "[ Global variable");
- __ lw(LoadConvention::ReceiverRegister(), GlobalObjectOperand());
- __ li(LoadConvention::NameRegister(), Operand(proxy->name()));
+ __ lw(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand());
+ __ li(LoadDescriptor::NameRegister(), Operand(proxy->name()));
if (FLAG_vector_ics) {
- __ li(VectorLoadConvention::SlotRegister(),
+ __ li(VectorLoadICDescriptor::SlotRegister(),
Operand(Smi::FromInt(proxy->VariableFeedbackSlot())));
}
// Use a regular load, not a contextual load, to avoid a reference
« no previous file with comments | « src/mips/debug-mips.cc ('k') | src/mips/interface-descriptors-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698