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

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

Issue 403393008: MIPS: Introduce FLAG_vector_ics. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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/lithium-mips.cc ('k') | src/mips64/ic-mips64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips64/full-codegen-mips64.cc
diff --git a/src/mips64/full-codegen-mips64.cc b/src/mips64/full-codegen-mips64.cc
index 4fa27b92c32deb483f2e0b13c5e9687f073291bc..494cf1a15635c5ba6573a24bf874053abdd76b4b 100644
--- a/src/mips64/full-codegen-mips64.cc
+++ b/src/mips64/full-codegen-mips64.cc
@@ -1347,7 +1347,7 @@ void FullCodeGenerator::VisitVariableProxy(VariableProxy* expr) {
}
-void FullCodeGenerator::EmitLoadGlobalCheckExtensions(Variable* var,
+void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy,
TypeofState typeof_state,
Label* slow) {
Register current = cp;
@@ -1393,7 +1393,12 @@ void FullCodeGenerator::EmitLoadGlobalCheckExtensions(Variable* var,
}
__ ld(LoadIC::ReceiverRegister(), GlobalObjectOperand());
- __ li(LoadIC::NameRegister(), Operand(var->name()));
+ __ li(LoadIC::NameRegister(), Operand(proxy->var()->name()));
+ if (FLAG_vector_ics) {
+ __ li(LoadIC::SlotRegister(),
+ Operand(Smi::FromInt(proxy->VariableFeedbackSlot())));
+ }
+
ContextualMode mode = (typeof_state == INSIDE_TYPEOF)
? NOT_CONTEXTUAL
: CONTEXTUAL;
@@ -1431,7 +1436,7 @@ MemOperand FullCodeGenerator::ContextSlotOperandCheckExtensions(Variable* var,
}
-void FullCodeGenerator::EmitDynamicLookupFastCase(Variable* var,
+void FullCodeGenerator::EmitDynamicLookupFastCase(VariableProxy* proxy,
TypeofState typeof_state,
Label* slow,
Label* done) {
@@ -1440,8 +1445,9 @@ void FullCodeGenerator::EmitDynamicLookupFastCase(Variable* var,
// introducing variables. In those cases, we do not want to
// perform a runtime call for all variables in the scope
// containing the eval.
+ Variable* var = proxy->var();
if (var->mode() == DYNAMIC_GLOBAL) {
- EmitLoadGlobalCheckExtensions(var, typeof_state, slow);
+ EmitLoadGlobalCheckExtensions(proxy, typeof_state, slow);
__ Branch(done);
} else if (var->mode() == DYNAMIC_LOCAL) {
Variable* local = var->local_if_not_shadowed();
@@ -1479,6 +1485,10 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
// object (receiver) in a0.
__ ld(LoadIC::ReceiverRegister(), GlobalObjectOperand());
__ li(LoadIC::NameRegister(), Operand(var->name()));
+ if (FLAG_vector_ics) {
+ __ li(LoadIC::SlotRegister(),
+ Operand(Smi::FromInt(proxy->VariableFeedbackSlot())));
+ }
CallLoadIC(CONTEXTUAL);
context()->Plug(v0);
break;
@@ -1557,7 +1567,7 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
Label done, slow;
// Generate code for loading from variables potentially shadowed
// by eval-introduced variables.
- EmitDynamicLookupFastCase(var, NOT_INSIDE_TYPEOF, &slow, &done);
+ EmitDynamicLookupFastCase(proxy, NOT_INSIDE_TYPEOF, &slow, &done);
__ bind(&slow);
__ li(a1, Operand(var->name()));
__ Push(cp, a1); // Context and name.
@@ -2076,6 +2086,10 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ bind(&l_call);
__ ld(load_receiver, MemOperand(sp, kPointerSize));
__ ld(load_name, MemOperand(sp, 2 * kPointerSize));
+ if (FLAG_vector_ics) {
+ __ li(LoadIC::SlotRegister(),
+ Operand(Smi::FromInt(expr->KeyedLoadFeedbackSlot())));
+ }
Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
CallIC(ic, TypeFeedbackId::None());
__ mov(a0, v0);
@@ -2090,8 +2104,12 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
// if (!result.done) goto l_try;
__ Move(load_receiver, v0);
- __ push(load_receiver); // save result
+ __ push(load_receiver); // save result
__ LoadRoot(load_name, Heap::kdone_stringRootIndex); // "done"
+ if (FLAG_vector_ics) {
+ __ li(LoadIC::SlotRegister(),
+ Operand(Smi::FromInt(expr->DoneFeedbackSlot())));
+ }
CallLoadIC(NOT_CONTEXTUAL); // v0=result.done
__ mov(a0, v0);
Handle<Code> bool_ic = ToBooleanStub::GetUninitialized(isolate());
@@ -2101,6 +2119,10 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
// result.value
__ pop(load_receiver); // result
__ LoadRoot(load_name, Heap::kvalue_stringRootIndex); // "value"
+ if (FLAG_vector_ics) {
+ __ li(LoadIC::SlotRegister(),
+ Operand(Smi::FromInt(expr->ValueFeedbackSlot())));
+ }
CallLoadIC(NOT_CONTEXTUAL); // v0=result.value
context()->DropAndPlug(2, v0); // drop iter and g
break;
@@ -2266,8 +2288,13 @@ void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
SetSourcePosition(prop->position());
Literal* key = prop->key()->AsLiteral();
__ li(LoadIC::NameRegister(), Operand(key->value()));
- // Call load IC. It has register arguments receiver and property.
- CallLoadIC(NOT_CONTEXTUAL, prop->PropertyFeedbackId());
+ if (FLAG_vector_ics) {
+ __ li(LoadIC::SlotRegister(),
+ Operand(Smi::FromInt(prop->PropertyFeedbackSlot())));
+ CallLoadIC(NOT_CONTEXTUAL);
+ } else {
+ CallLoadIC(NOT_CONTEXTUAL, prop->PropertyFeedbackId());
+ }
}
@@ -2275,7 +2302,13 @@ void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
SetSourcePosition(prop->position());
// Call keyed load IC. It has register arguments receiver and key.
Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
- CallIC(ic, prop->PropertyFeedbackId());
+ if (FLAG_vector_ics) {
+ __ li(LoadIC::SlotRegister(),
+ Operand(Smi::FromInt(prop->PropertyFeedbackSlot())));
+ CallIC(ic);
+ } else {
+ CallIC(ic, prop->PropertyFeedbackId());
+ }
}
@@ -2753,7 +2786,7 @@ void FullCodeGenerator::VisitCall(Call* expr) {
{ PreservePositionScope scope(masm()->positions_recorder());
// Generate code for loading from variables potentially shadowed
// by eval-introduced variables.
- EmitDynamicLookupFastCase(proxy->var(), NOT_INSIDE_TYPEOF, &slow, &done);
+ EmitDynamicLookupFastCase(proxy, NOT_INSIDE_TYPEOF, &slow, &done);
}
__ bind(&slow);
@@ -4083,7 +4116,13 @@ void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) {
// Load the function from the receiver.
__ li(LoadIC::NameRegister(), Operand(expr->name()));
- CallLoadIC(NOT_CONTEXTUAL, expr->CallRuntimeFeedbackId());
+ if (FLAG_vector_ics) {
+ __ li(LoadIC::SlotRegister(),
+ Operand(Smi::FromInt(expr->CallRuntimeFeedbackSlot())));
+ CallLoadIC(NOT_CONTEXTUAL);
+ } else {
+ CallLoadIC(NOT_CONTEXTUAL, expr->CallRuntimeFeedbackId());
+ }
// Push the target function under the receiver.
__ ld(at, MemOperand(sp, 0));
@@ -4422,6 +4461,10 @@ void FullCodeGenerator::VisitForTypeofValue(Expression* expr) {
Comment cmnt(masm_, "[ Global variable");
__ ld(LoadIC::ReceiverRegister(), GlobalObjectOperand());
__ li(LoadIC::NameRegister(), Operand(proxy->name()));
+ if (FLAG_vector_ics) {
+ __ li(LoadIC::SlotRegister(),
+ Operand(Smi::FromInt(proxy->VariableFeedbackSlot())));
+ }
// Use a regular load, not a contextual load, to avoid a reference
// error.
CallLoadIC(NOT_CONTEXTUAL);
@@ -4433,7 +4476,7 @@ void FullCodeGenerator::VisitForTypeofValue(Expression* expr) {
// Generate code for loading from variables potentially shadowed
// by eval-introduced variables.
- EmitDynamicLookupFastCase(proxy->var(), INSIDE_TYPEOF, &slow, &done);
+ EmitDynamicLookupFastCase(proxy, INSIDE_TYPEOF, &slow, &done);
__ bind(&slow);
__ li(a0, Operand(proxy->name()));
« no previous file with comments | « src/mips/lithium-mips.cc ('k') | src/mips64/ic-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698