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

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

Issue 2167493003: [ic] [stubs] Don't use Code::flags in megamorphic stub cache hash computations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@stub-cache-fix
Patch Set: Rebasing Created 4 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/ic/arm/stub-cache-arm.cc ('k') | src/ic/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 75369a3983de4e653c14923ac4cf306d79200c69..81c820725ac05606d225e8a5f9f7d3a6ffbeefc2 100644
--- a/src/ic/arm64/stub-cache-arm64.cc
+++ b/src/ic/arm64/stub-cache-arm64.cc
@@ -23,8 +23,7 @@ namespace internal {
//
// 'receiver', 'name' and 'offset' registers are preserved on miss.
static void ProbeTable(StubCache* stub_cache, MacroAssembler* masm,
- Code::Flags flags, StubCache::Table table,
- Register receiver, Register name,
+ StubCache::Table table, Register receiver, Register name,
// The offset is scaled by 4, based on
// kCacheIndexShift, which is two bits
Register offset, Register scratch, Register scratch2,
@@ -69,12 +68,6 @@ static void ProbeTable(StubCache* stub_cache, MacroAssembler* masm,
// Get the code entry from the cache.
__ Ldr(scratch, MemOperand(scratch, value_off_addr - key_off_addr));
- // Check that the flags match what we're looking for.
- __ Ldr(scratch2.W(), FieldMemOperand(scratch, Code::kFlagsOffset));
- __ Bic(scratch2.W(), scratch2.W(), Code::kFlagsNotUsedInLookup);
- __ Cmp(scratch2.W(), flags);
- __ B(ne, &miss);
-
#ifdef DEBUG
if (FLAG_test_secondary_stub_cache && table == StubCache::kPrimary) {
__ B(&miss);
@@ -94,9 +87,6 @@ static void ProbeTable(StubCache* stub_cache, MacroAssembler* masm,
void StubCache::GenerateProbe(MacroAssembler* masm, Register receiver,
Register name, Register scratch, Register extra,
Register extra2, Register extra3) {
- Code::Flags flags =
- Code::RemoveHolderFromFlags(Code::ComputeHandlerFlags(ic_kind_));
-
Label miss;
// Make sure that there are no register conflicts.
@@ -136,23 +126,23 @@ void StubCache::GenerateProbe(MacroAssembler* masm, Register receiver,
__ Ldr(scratch.W(), FieldMemOperand(name, Name::kHashFieldOffset));
__ Ldr(extra, FieldMemOperand(receiver, HeapObject::kMapOffset));
__ Add(scratch, scratch, extra);
- __ Eor(scratch, scratch, flags);
+ __ Eor(scratch, scratch, kPrimaryMagic);
__ And(scratch, scratch,
Operand((kPrimaryTableSize - 1) << kCacheIndexShift));
// Probe the primary table.
- ProbeTable(this, masm, flags, kPrimary, receiver, name, scratch, extra,
- extra2, extra3);
+ ProbeTable(this, masm, kPrimary, receiver, name, scratch, extra, extra2,
+ extra3);
// Primary miss: Compute hash for secondary table.
__ Sub(scratch, scratch, Operand(name));
- __ Add(scratch, scratch, Operand(flags));
+ __ Add(scratch, scratch, Operand(kSecondaryMagic));
__ And(scratch, scratch,
Operand((kSecondaryTableSize - 1) << kCacheIndexShift));
// Probe the secondary table.
- ProbeTable(this, masm, flags, kSecondary, receiver, name, scratch, extra,
- extra2, extra3);
+ ProbeTable(this, masm, kSecondary, receiver, name, scratch, extra, extra2,
+ extra3);
// Cache miss: Fall-through and let caller handle the miss by
// entering the runtime system.
« no previous file with comments | « src/ic/arm/stub-cache-arm.cc ('k') | src/ic/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698