Skip to content

Commit

Permalink
convert compile-time checkable DCHECKs to STATIC_ASSERTs
Browse files Browse the repository at this point in the history
Review URL: https://codereview.chromium.org/768683006

Cr-Commit-Position: refs/heads/master@{#26187}
  • Loading branch information
mostynb authored and Commit bot committed Jan 21, 2015
1 parent c6641e1 commit cc6c373
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/arm/code-stubs-arm.cc
Expand Up @@ -3744,7 +3744,7 @@ void NameDictionaryLookupStub::GenerateNegativeLookup(MacroAssembler* masm,
Smi::FromInt(name->Hash() + NameDictionary::GetProbeOffset(i))));

// Scale the index by multiplying by the entry size.
DCHECK(NameDictionary::kEntrySize == 3);
STATIC_ASSERT(NameDictionary::kEntrySize == 3);
__ add(index, index, Operand(index, LSL, 1)); // index *= 3.

Register entity_name = scratch0;
Expand Down
2 changes: 1 addition & 1 deletion src/code-stubs-hydrogen.cc
Expand Up @@ -702,7 +702,7 @@ HValue* CodeStubGraphBuilder<KeyedLoadSloppyArgumentsStub>::BuildCodeStub() {
// smi check is being emitted.
HValue* the_context = Add<HLoadKeyed>(elements, graph()->GetConstant0(),
nullptr, FAST_ELEMENTS);
DCHECK(Context::kHeaderSize == FixedArray::kHeaderSize);
STATIC_ASSERT(Context::kHeaderSize == FixedArray::kHeaderSize);
HValue* result = Add<HLoadKeyed>(the_context, mapped_index, nullptr,
FAST_ELEMENTS, ALLOW_RETURN_HOLE);
environment()->Push(result);
Expand Down

0 comments on commit cc6c373

Please sign in to comment.