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

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

Issue 584043002: Add MEGAMORPHIC state support for KeyedStoreIC (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased for landing 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/arm/ic-arm.cc ('k') | src/ic/ia32/ic-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/arm64/ic-arm64.cc
diff --git a/src/ic/arm64/ic-arm64.cc b/src/ic/arm64/ic-arm64.cc
index 76f9c24cf161285b8caf58fc40d43490fa96cd70..4ec76b66558e01c9f1693a0b152df32ed53784a5 100644
--- a/src/ic/arm64/ic-arm64.cc
+++ b/src/ic/arm64/ic-arm64.cc
@@ -798,8 +798,9 @@ static void KeyedStoreGenerateGenericHelper(
}
-void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
- StrictMode strict_mode) {
+void KeyedStoreIC::GenerateGeneric(
+ MacroAssembler* masm, StrictMode strict_mode,
+ KeyedStoreStubCacheRequirement handler_requirement) {
ASM_LOCATION("KeyedStoreIC::GenerateGeneric");
Label slow;
Label array;
@@ -808,6 +809,8 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
Label fast_object_grow;
Label fast_double_grow;
Label fast_double;
+ Label maybe_name_key;
+ Label miss;
Register value = StoreDescriptor::ValueRegister();
Register key = StoreDescriptor::NameRegister();
@@ -820,7 +823,7 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
Register elements = x4;
Register elements_map = x5;
- __ JumpIfNotSmi(key, &slow);
+ __ JumpIfNotSmi(key, &maybe_name_key);
__ JumpIfSmi(receiver, &slow);
__ Ldr(receiver_map, FieldMemOperand(receiver, HeapObject::kMapOffset));
@@ -853,7 +856,23 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
// x1: key
// x2: receiver
PropertyICCompiler::GenerateRuntimeSetProperty(masm, strict_mode);
+ // Never returns to here.
+ __ bind(&maybe_name_key);
+ __ Ldr(x10, FieldMemOperand(key, HeapObject::kMapOffset));
+ __ Ldrb(x10, FieldMemOperand(x10, Map::kInstanceTypeOffset));
+ __ JumpIfNotUniqueNameInstanceType(x10, &slow);
+ Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
+ Code::ComputeHandlerFlags(Code::STORE_IC));
+ masm->isolate()->stub_cache()->GenerateProbe(masm, flags, false, receiver,
+ key, x3, x4, x5, x6);
+ // Cache miss.
+ if (handler_requirement == kCallRuntimeOnMissingHandler) {
+ __ B(&slow);
+ } else {
+ DCHECK(handler_requirement == kMissOnMissingHandler);
+ __ B(&miss);
+ }
__ Bind(&extra);
// Extra capacity case: Check if there is extra capacity to
@@ -895,6 +914,11 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
&slow, kDontCheckMap, kIncrementLength, value,
key, receiver, receiver_map, elements_map,
elements);
+
+ if (handler_requirement == kMissOnMissingHandler) {
+ __ bind(&miss);
+ GenerateMiss(masm);
+ }
}
« no previous file with comments | « src/ic/arm/ic-arm.cc ('k') | src/ic/ia32/ic-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698