Sha256: 70b99ae06cc3ee61764dd1f083789f24da367decf5a48ceb7399c287d519d906

Contents?: true

Size: 1.61 KB

Versions: 122

Compression:

Stored size: 1.61 KB

Contents

// Copyright 2020 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 INCLUDE_CPPGC_INTERNAL_LOGGING_H_
#define INCLUDE_CPPGC_INTERNAL_LOGGING_H_

#include "cppgc/source-location.h"
#include "v8config.h"  // NOLINT(build/include_directory)

namespace cppgc {
namespace internal {

void V8_EXPORT DCheckImpl(const char*,
                          const SourceLocation& = SourceLocation::Current());
[[noreturn]] void V8_EXPORT
FatalImpl(const char*, const SourceLocation& = SourceLocation::Current());

// Used to ignore -Wunused-variable.
template <typename>
struct EatParams {};

#if DEBUG
#define CPPGC_DCHECK_MSG(condition, message)  \
  do {                                        \
    if (V8_UNLIKELY(!(condition))) {          \
      ::cppgc::internal::DCheckImpl(message); \
    }                                         \
  } while (false)
#else
#define CPPGC_DCHECK_MSG(condition, message)                \
  (static_cast<void>(::cppgc::internal::EatParams<decltype( \
                         static_cast<void>(condition), message)>{}))
#endif

#define CPPGC_DCHECK(condition) CPPGC_DCHECK_MSG(condition, #condition)

#define CPPGC_CHECK_MSG(condition, message)  \
  do {                                       \
    if (V8_UNLIKELY(!(condition))) {         \
      ::cppgc::internal::FatalImpl(message); \
    }                                        \
  } while (false)

#define CPPGC_CHECK(condition) CPPGC_CHECK_MSG(condition, #condition)

}  // namespace internal
}  // namespace cppgc

#endif  // INCLUDE_CPPGC_INTERNAL_LOGGING_H_

Version data entries

122 entries across 122 versions & 3 rubygems

Version Path
libv8-8.4.255.0.1-x86_64-linux vendor/v8/include/cppgc/internal/logging.h
libv8-8.4.255.0.1-x86_64-darwin vendor/v8/include/cppgc/internal/logging.h
libv8-8.4.255.0.1-universal-darwin vendor/v8/include/cppgc/internal/logging.h
libv8-node-16.20.0.0-x86_64-linux vendor/v8/include/cppgc/internal/logging.h
libv8-node-16.20.0.0-x86_64-linux-musl vendor/v8/include/cppgc/internal/logging.h
libv8-node-16.20.0.0-x86_64-darwin vendor/v8/include/cppgc/internal/logging.h
libv8-node-16.20.0.0-arm64-darwin vendor/v8/include/cppgc/internal/logging.h
libv8-node-16.20.0.0-aarch64-linux vendor/v8/include/cppgc/internal/logging.h
libv8-node-16.20.0.0-aarch64-linux-musl vendor/v8/include/cppgc/internal/logging.h
libv8-node-17.9.1.1-x86_64-linux vendor/v8/include/cppgc/internal/logging.h
libv8-node-17.9.1.1-x86_64-linux-musl vendor/v8/include/cppgc/internal/logging.h
libv8-node-17.9.1.1-x86_64-darwin vendor/v8/include/cppgc/internal/logging.h
libv8-node-17.9.1.1-arm64-darwin vendor/v8/include/cppgc/internal/logging.h
libv8-node-17.9.1.1-aarch64-linux vendor/v8/include/cppgc/internal/logging.h
libv8-node-17.9.1.1-aarch64-linux-musl vendor/v8/include/cppgc/internal/logging.h
libv8-node-16.19.0.1-x86_64-linux vendor/v8/include/cppgc/internal/logging.h
libv8-node-16.19.0.1-x86_64-linux-musl vendor/v8/include/cppgc/internal/logging.h
libv8-node-16.19.0.1-x86_64-darwin vendor/v8/include/cppgc/internal/logging.h
libv8-node-16.19.0.1-arm64-darwin vendor/v8/include/cppgc/internal/logging.h
libv8-node-16.19.0.1-aarch64-linux vendor/v8/include/cppgc/internal/logging.h