convert compile-time checkable DCHECKs to STATIC_ASSERTs
authormostynb <mostynb@opera.com>
Wed, 21 Jan 2015 13:38:06 +0000 (05:38 -0800)
committerCommit bot <commit-bot@chromium.org>
Wed, 21 Jan 2015 13:38:21 +0000 (13:38 +0000)
Review URL: https://codereview.chromium.org/768683006

Cr-Commit-Position: refs/heads/master@{#26187}

src/arm/code-stubs-arm.cc
src/code-stubs-hydrogen.cc

index 4578c6b..f19941d 100644 (file)
@@ -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;
index e61b2f8..83a994b 100644 (file)
@@ -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);