/
githubmirror
/
node
Обзор
Документация
Войти
/
githubmirror
/
node
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
deps/v8/src/common/checks.h
50 строк
2 KB
Michaël Zasso
deps: update V8 to 14.6.202.33
24 апр 2026, 19:01
Не верифицирован
24 апр 2026, 19:01
f1e0b83
Код
Авторство
О чём код?
// 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_COMMON_CHECKS_H_ #define V8_COMMON_CHECKS_H_ #include "include/v8-internal.h" #include "src/base/logging.h" #include "src/common/globals.h" #ifdef ENABLE_SLOW_DCHECKS #include "src/flags/flags.h" #endif #ifdef ENABLE_SLOW_DCHECKS #define SLOW_DCHECK(condition) \ CHECK(!v8::internal::v8_flags.enable_slow_asserts.value() || (condition)) #define SLOW_DCHECK_IMPLIES(lhs, rhs) SLOW_DCHECK(!(lhs) || (rhs)) #else #define SLOW_DCHECK(condition) ((void)0) #define SLOW_DCHECK_IMPLIES(v1, v2) ((void)0) #endif #ifdef DEBUG #define DCHECK_WITH_SANDBOX_ACCESS(condition) \ do { \ v8::internal::AllowSandboxAccess sandbox_access( \ "Sandbox access for debug check"); \ DCHECK(condition); \ } while (false) #define DCHECK_WITH_SANDBOX_ACCESS_AND_MSG_AND_LOC(condition, msg, loc) \ do { \ v8::internal::AllowSandboxAccess sandbox_access( \ "Sandbox access for debug check"); \ DCHECK_WITH_MSG_AND_LOC(condition, msg, loc); \ } while (false) #else #define DCHECK_WITH_SANDBOX_ACCESS(condition) ((void)0) #define DCHECK_WITH_SANDBOX_ACCESS_AND_MSG_AND_LOC(condition, msg, loc) \ ((void)0) #endif #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_COMMON_CHECKS_H_