v8/src/checks.h
mstarzinger 6a769ac1df [presubmit] Enable readability/namespace linter checking.
This enables linter checking for "readability/namespace" violations
during presubmit and instead marks the few known exceptions that we
allow explicitly.

R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31019}
2015-09-30 13:47:11 +00:00

37 lines
903 B
C++

// Copyright 2012 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_CHECKS_H_
#define V8_CHECKS_H_
#include "include/v8.h"
#include "src/base/logging.h"
namespace v8 {
class Value;
namespace internal {
#ifdef ENABLE_SLOW_DCHECKS
#define SLOW_DCHECK(condition) \
CHECK(!v8::internal::FLAG_enable_slow_asserts || (condition))
extern bool FLAG_enable_slow_asserts;
#else
#define SLOW_DCHECK(condition) ((void) 0)
const bool FLAG_enable_slow_asserts = false;
#endif
} // namespace internal
} // namespace v8
#define DCHECK_TAG_ALIGNED(address) \
DCHECK((reinterpret_cast<intptr_t>(address) & \
::v8::internal::kHeapObjectTagMask) == 0)
#define DCHECK_SIZE_TAG_ALIGNED(size) \
DCHECK((size & ::v8::internal::kHeapObjectTagMask) == 0)
#endif // V8_CHECKS_H_