Index: src/ic/x64/stub-cache-x64.cc |
diff --git a/src/ic/x64/stub-cache-x64.cc b/src/ic/x64/stub-cache-x64.cc |
index a83fe2383eedf73983eaaf23f72a82f9d6a09cfc..946aee51fc78c78372c06241c4e2be29793203d5 100644 |
--- a/src/ic/x64/stub-cache-x64.cc |
+++ b/src/ic/x64/stub-cache-x64.cc |
@@ -15,8 +15,7 @@ namespace internal { |
#define __ ACCESS_MASM(masm) |
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) { |
@@ -57,12 +56,6 @@ static void ProbeTable(StubCache* stub_cache, MacroAssembler* masm, |
__ LoadAddress(kScratchRegister, value_offset); |
__ movp(kScratchRegister, Operand(kScratchRegister, offset, scale_factor, 0)); |
- // Check that the flags match what we're looking for. |
- __ movl(offset, FieldOperand(kScratchRegister, Code::kFlagsOffset)); |
- __ andp(offset, Immediate(~Code::kFlagsNotUsedInLookup)); |
- __ cmpl(offset, Immediate(flags)); |
- __ j(not_equal, &miss); |
- |
#ifdef DEBUG |
if (FLAG_test_secondary_stub_cache && table == StubCache::kPrimary) { |
__ jmp(&miss); |
@@ -81,9 +74,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; |
USE(extra); // The register extra is not used on the X64 platform. |
USE(extra2); // The register extra2 is not used on the X64 platform. |
@@ -129,25 +119,25 @@ void StubCache::GenerateProbe(MacroAssembler* masm, Register receiver, |
__ movl(scratch, FieldOperand(name, Name::kHashFieldOffset)); |
// Use only the low 32 bits of the map pointer. |
__ addl(scratch, FieldOperand(receiver, HeapObject::kMapOffset)); |
- __ xorp(scratch, Immediate(flags)); |
+ __ xorp(scratch, Immediate(kPrimaryMagic)); |
// We mask out the last two bits because they are not part of the hash and |
// they are always 01 for maps. Also in the two 'and' instructions below. |
__ andp(scratch, Immediate((kPrimaryTableSize - 1) << kCacheIndexShift)); |
// Probe the primary table. |
- ProbeTable(this, masm, flags, kPrimary, receiver, name, scratch); |
+ ProbeTable(this, masm, kPrimary, receiver, name, scratch); |
// Primary miss: Compute hash for secondary probe. |
__ movl(scratch, FieldOperand(name, Name::kHashFieldOffset)); |
__ addl(scratch, FieldOperand(receiver, HeapObject::kMapOffset)); |
- __ xorp(scratch, Immediate(flags)); |
+ __ xorp(scratch, Immediate(kPrimaryMagic)); |
__ andp(scratch, Immediate((kPrimaryTableSize - 1) << kCacheIndexShift)); |
__ subl(scratch, name); |
- __ addl(scratch, Immediate(flags)); |
+ __ addl(scratch, Immediate(kSecondaryMagic)); |
__ andp(scratch, Immediate((kSecondaryTableSize - 1) << kCacheIndexShift)); |
// Probe the secondary table. |
- ProbeTable(this, masm, flags, kSecondary, receiver, name, scratch); |
+ ProbeTable(this, masm, kSecondary, receiver, name, scratch); |
// Cache miss: Fall-through and let caller handle the miss by |
// entering the runtime system. |