Index: src/ic/arm/ic-arm.cc |
diff --git a/src/ic/arm/ic-arm.cc b/src/ic/arm/ic-arm.cc |
index ae13161501fd29b6ffa679636fbb8d44660f18b4..d26dc491eb930d6e2aaec6d339ac6b3d13cc7312 100644 |
--- a/src/ic/arm/ic-arm.cc |
+++ b/src/ic/arm/ic-arm.cc |
@@ -765,8 +765,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 -------------- |
// -- r0 : value |
// -- r1 : key |
@@ -775,7 +776,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(); |
@@ -790,7 +791,7 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm, |
// r4 and r5 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. |
@@ -822,6 +823,23 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm, |
// r1: key. |
// r2: receiver. |
PropertyICCompiler::GenerateRuntimeSetProperty(masm, strict_mode); |
+ // Never returns to here. |
+ |
+ __ bind(&maybe_name_key); |
+ __ ldr(r4, FieldMemOperand(key, HeapObject::kMapOffset)); |
+ __ ldrb(r4, FieldMemOperand(r4, Map::kInstanceTypeOffset)); |
+ __ JumpIfNotUniqueNameInstanceType(r4, &slow); |
+ Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( |
+ Code::ComputeHandlerFlags(Code::STORE_IC)); |
+ masm->isolate()->stub_cache()->GenerateProbe(masm, flags, false, receiver, |
+ key, r3, r4, r5, r6); |
+ // Cache miss. |
+ if (handler_requirement == kCallRuntimeOnMissingHandler) { |
+ __ b(&slow); |
+ } else { |
+ DCHECK(handler_requirement == kMissOnMissingHandler); |
+ __ b(&miss); |
+ } |
// Extra capacity case: Check if there is extra capacity to |
// perform the store and update the length. Used for adding one |
@@ -863,6 +881,9 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm, |
&slow, kDontCheckMap, kIncrementLength, value, |
key, receiver, receiver_map, elements_map, |
elements); |
+ |
+ __ bind(&miss); |
+ GenerateMiss(masm); |
} |