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

Unified Diff: src/ic/mips64/ic-mips64.cc

Issue 645593006: MIPS: Add MEGAMORPHIC state support for KeyedStoreIC. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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/ic/mips/ic-mips.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/mips64/ic-mips64.cc
diff --git a/src/ic/mips64/ic-mips64.cc b/src/ic/mips64/ic-mips64.cc
index a5d9fe78ff199b41867c78ec0e0efd2c44d25e75..0bed35e3ba62b28d4ce1b5b14e449e03c613513e 100644
--- a/src/ic/mips64/ic-mips64.cc
+++ b/src/ic/mips64/ic-mips64.cc
@@ -775,8 +775,9 @@ static void KeyedStoreGenerateGenericHelper(
}
-void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
- StrictMode strict_mode) {
+void KeyedStoreIC::GenerateGeneric(
+ MacroAssembler* masm, StrictMode strict_mode,
+ KeyedStoreStubCacheRequirement handler_requirement) {
// ---------- S t a t e --------------
// -- a0 : value
// -- a1 : key
@@ -785,7 +786,7 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
// -----------------------------------
Label slow, fast_object, fast_object_grow;
Label fast_double, fast_double_grow;
- Label array, extra, check_if_double_array;
+ Label array, extra, check_if_double_array, maybe_name_key, miss;
// Register usage.
Register value = StoreDescriptor::ValueRegister();
@@ -798,7 +799,7 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
// a4 and a5 are used as general scratch registers.
// Check that the key is a smi.
- __ JumpIfNotSmi(key, &slow);
+ __ JumpIfNotSmi(key, &maybe_name_key);
// Check that the object isn't a smi.
__ JumpIfSmi(receiver, &slow);
// Get the map of the object.
@@ -828,6 +829,23 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
// a1: key.
// a2: receiver.
PropertyICCompiler::GenerateRuntimeSetProperty(masm, strict_mode);
+ // Never returns to here.
+
+ __ bind(&maybe_name_key);
+ __ ld(a4, FieldMemOperand(key, HeapObject::kMapOffset));
+ __ lb(a4, FieldMemOperand(a4, Map::kInstanceTypeOffset));
+ __ JumpIfNotUniqueNameInstanceType(a4, &slow);
+ Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
+ Code::ComputeHandlerFlags(Code::STORE_IC));
+ masm->isolate()->stub_cache()->GenerateProbe(masm, flags, false, receiver,
+ key, a3, a4, a5, a6);
+ // Cache miss.
+ if (handler_requirement == kCallRuntimeOnMissingHandler) {
+ __ Branch(&slow);
+ } else {
+ DCHECK(handler_requirement == kMissOnMissingHandler);
+ __ Branch(&miss);
+ }
// Extra capacity case: Check if there is extra capacity to
// perform the store and update the length. Used for adding one
@@ -867,6 +885,9 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
&slow, kDontCheckMap, kIncrementLength, value,
key, receiver, receiver_map, elements_map,
elements);
+
+ __ bind(&miss);
+ GenerateMiss(masm);
}
« no previous file with comments | « src/ic/mips/ic-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698