// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Slightly adapted for inclusion in V8. // Copyright 2014 the V8 project authors. All rights reserved. // List of adaptations: // - include guard names // - wrap in v8 namespace // - formatting (git cl format) #ifndef V8_BASE_SAFE_CONVERSIONS_IMPL_H_ #define V8_BASE_SAFE_CONVERSIONS_IMPL_H_ #include <stddef.h> #include <stdint.h> #include <limits> #include <type_traits> #if defined(__GNUC__) || defined(__clang__) #define BASE_NUMERICS_LIKELY(x) … #define BASE_NUMERICS_UNLIKELY(x) … #else #define BASE_NUMERICS_LIKELY … #define BASE_NUMERICS_UNLIKELY … #endif namespace v8 { namespace base { internal // namespace internal } // namespace base } // namespace v8 #endif // V8_BASE_SAFE_CONVERSIONS_IMPL_H_