MIPS: convert compile-time checkable DCHECKs to STATIC_ASSERTs.

Port cc6c373e2a

BUG=

Review URL: https://codereview.chromium.org/867093003

Cr-Commit-Position: refs/heads/master@{#26248}
This commit is contained in:
balazs.kilvady 2015-01-23 04:00:04 -08:00 committed by Commit bot
parent a18fdd61dc
commit 21a465607d
2 changed files with 2 additions and 2 deletions

View File

@ -3954,7 +3954,7 @@ void NameDictionaryLookupStub::GenerateNegativeLookup(MacroAssembler* masm,
Smi::FromInt(name->Hash() + NameDictionary::GetProbeOffset(i)))); Smi::FromInt(name->Hash() + NameDictionary::GetProbeOffset(i))));
// Scale the index by multiplying by the entry size. // Scale the index by multiplying by the entry size.
DCHECK(NameDictionary::kEntrySize == 3); STATIC_ASSERT(NameDictionary::kEntrySize == 3);
__ sll(at, index, 1); __ sll(at, index, 1);
__ Addu(index, index, at); __ Addu(index, index, at);

View File

@ -3993,7 +3993,7 @@ void NameDictionaryLookupStub::GenerateNegativeLookup(MacroAssembler* masm,
Operand(name->Hash() + NameDictionary::GetProbeOffset(i))); Operand(name->Hash() + NameDictionary::GetProbeOffset(i)));
// Scale the index by multiplying by the entry size. // Scale the index by multiplying by the entry size.
DCHECK(NameDictionary::kEntrySize == 3); STATIC_ASSERT(NameDictionary::kEntrySize == 3);
__ dsll(at, index, 1); __ dsll(at, index, 1);
__ Daddu(index, index, at); // index *= 3. __ Daddu(index, index, at); // index *= 3.