Index: src/ic/arm64/stub-cache-arm64.cc |
diff --git a/src/ic/arm64/stub-cache-arm64.cc b/src/ic/arm64/stub-cache-arm64.cc |
index 8d378ce4c24c4aa1681e604999803f4a57c34c6b..b55ff9134c56988665a1c6391d40bfec3867f591 100644 |
--- a/src/ic/arm64/stub-cache-arm64.cc |
+++ b/src/ic/arm64/stub-cache-arm64.cc |
@@ -22,7 +22,7 @@ namespace internal { |
// If there is a miss the code fall trough. |
// |
// 'receiver', 'name' and 'offset' registers are preserved on miss. |
-static void ProbeTable(Isolate* isolate, MacroAssembler* masm, |
+static void ProbeTable(StubCache* stub_cache, MacroAssembler* masm, |
Code::Flags flags, StubCache::Table table, |
Register receiver, Register name, Register offset, |
Register scratch, Register scratch2, Register scratch3) { |
@@ -30,9 +30,9 @@ static void ProbeTable(Isolate* isolate, MacroAssembler* masm, |
// 3 pointers (name, code, map). |
STATIC_ASSERT(sizeof(StubCache::Entry) == (3 * kPointerSize)); |
- ExternalReference key_offset(isolate->stub_cache()->key_reference(table)); |
- ExternalReference value_offset(isolate->stub_cache()->value_reference(table)); |
- ExternalReference map_offset(isolate->stub_cache()->map_reference(table)); |
+ ExternalReference key_offset(stub_cache->key_reference(table)); |
+ ExternalReference value_offset(stub_cache->value_reference(table)); |
+ ExternalReference map_offset(stub_cache->map_reference(table)); |
uintptr_t key_off_addr = reinterpret_cast<uintptr_t>(key_offset.address()); |
uintptr_t value_off_addr = |
@@ -86,12 +86,12 @@ static void ProbeTable(Isolate* isolate, MacroAssembler* masm, |
__ Bind(&miss); |
} |
- |
-void StubCache::GenerateProbe(MacroAssembler* masm, Code::Kind ic_kind, |
- Code::Flags flags, Register receiver, |
+void StubCache::GenerateProbe(MacroAssembler* masm, Register receiver, |
Register name, Register scratch, Register extra, |
Register extra2, Register extra3) { |
- Isolate* isolate = masm->isolate(); |
+ Code::Flags flags = |
+ Code::RemoveHolderFromFlags(Code::ComputeHandlerFlags(ic_kind_)); |
+ |
Label miss; |
// Make sure that there are no register conflicts. |
@@ -106,12 +106,13 @@ void StubCache::GenerateProbe(MacroAssembler* masm, Code::Kind ic_kind, |
// If vector-based ics are in use, ensure that scratch, extra, extra2 and |
// extra3 don't conflict with the vector and slot registers, which need |
// to be preserved for a handler call or miss. |
- if (IC::ICUseVector(ic_kind)) { |
+ if (IC::ICUseVector(ic_kind_)) { |
Register vector, slot; |
- if (ic_kind == Code::STORE_IC || ic_kind == Code::KEYED_STORE_IC) { |
+ if (ic_kind_ == Code::STORE_IC || ic_kind_ == Code::KEYED_STORE_IC) { |
vector = VectorStoreICDescriptor::VectorRegister(); |
slot = VectorStoreICDescriptor::SlotRegister(); |
} else { |
+ DCHECK(ic_kind_ == Code::LOAD_IC || ic_kind_ == Code::KEYED_LOAD_IC); |
vector = LoadWithVectorDescriptor::VectorRegister(); |
slot = LoadWithVectorDescriptor::SlotRegister(); |
} |
@@ -136,7 +137,7 @@ void StubCache::GenerateProbe(MacroAssembler* masm, Code::Kind ic_kind, |
CountTrailingZeros(kPrimaryTableSize, 64)); |
// Probe the primary table. |
- ProbeTable(isolate, masm, flags, kPrimary, receiver, name, scratch, extra, |
+ ProbeTable(this, masm, flags, kPrimary, receiver, name, scratch, extra, |
extra2, extra3); |
// Primary miss: Compute hash for secondary table. |
@@ -145,7 +146,7 @@ void StubCache::GenerateProbe(MacroAssembler* masm, Code::Kind ic_kind, |
__ And(scratch, scratch, kSecondaryTableSize - 1); |
// Probe the secondary table. |
- ProbeTable(isolate, masm, flags, kSecondary, receiver, name, scratch, extra, |
+ ProbeTable(this, masm, flags, kSecondary, receiver, name, scratch, extra, |
extra2, extra3); |
// Cache miss: Fall-through and let caller handle the miss by |