10afbb7e0f
Move everything defined in the v8::internal namespace from include/v8.h into a separate header that can be included by globals.h/checks.h instead of the whole v8.h. Also moves V8_EXPORT into v8config.h (so it can be use in the new v8-internal.h). Bug: v8:8015 Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng Change-Id: I22cdc2728d91a94b309a3d030ed06c0f8a06c723 Reviewed-on: https://chromium-review.googlesource.com/1210102 Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Dan Elphick <delphick@chromium.org> Cr-Commit-Position: refs/heads/master@{#55707}
37 lines
910 B
C++
37 lines
910 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-internal.h"
|
|
#include "src/base/logging.h"
|
|
#include "src/globals.h"
|
|
|
|
namespace v8 {
|
|
|
|
class Value;
|
|
|
|
namespace internal {
|
|
|
|
#ifdef ENABLE_SLOW_DCHECKS
|
|
#define SLOW_DCHECK(condition) \
|
|
CHECK(!v8::internal::FLAG_enable_slow_asserts || (condition))
|
|
V8_EXPORT_PRIVATE extern bool FLAG_enable_slow_asserts;
|
|
#else
|
|
#define SLOW_DCHECK(condition) ((void) 0)
|
|
static const bool FLAG_enable_slow_asserts = false;
|
|
#endif
|
|
|
|
} // namespace internal
|
|
} // namespace v8
|
|
|
|
#define DCHECK_TAG_ALIGNED(address) \
|
|
DCHECK((address & ::v8::internal::kHeapObjectTagMask) == 0)
|
|
|
|
#define DCHECK_SIZE_TAG_ALIGNED(size) \
|
|
DCHECK((size & ::v8::internal::kHeapObjectTagMask) == 0)
|
|
|
|
#endif // V8_CHECKS_H_
|