| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_BASE_MACROS_H_ | 5 #ifndef V8_BASE_MACROS_H_ |
| 6 #define V8_BASE_MACROS_H_ | 6 #define V8_BASE_MACROS_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 #endif | 266 #endif |
| 267 #endif | 267 #endif |
| 268 | 268 |
| 269 // Define DISABLE_ASAN macros. | 269 // Define DISABLE_ASAN macros. |
| 270 #ifdef V8_USE_ADDRESS_SANITIZER | 270 #ifdef V8_USE_ADDRESS_SANITIZER |
| 271 #define DISABLE_ASAN __attribute__((no_sanitize_address)) | 271 #define DISABLE_ASAN __attribute__((no_sanitize_address)) |
| 272 #else | 272 #else |
| 273 #define DISABLE_ASAN | 273 #define DISABLE_ASAN |
| 274 #endif | 274 #endif |
| 275 | 275 |
| 276 #if defined(__has_attribute) |
| 277 #if __has_attribute(no_sanitize) |
| 278 #define DISABLE_CFI_UNRELATED_CAST \ |
| 279 __attribute__((no_sanitize("cfi-unrelated-cast"))) |
| 280 #else |
| 281 #define DISABLE_CFI_UNRELATED_CAST |
| 282 #endif |
| 283 #else |
| 284 #define DISABLE_CFI_UNRELATED_CAST |
| 285 #endif |
| 276 | 286 |
| 277 #if V8_CC_GNU | 287 #if V8_CC_GNU |
| 278 #define V8_IMMEDIATE_CRASH() __builtin_trap() | 288 #define V8_IMMEDIATE_CRASH() __builtin_trap() |
| 279 #else | 289 #else |
| 280 #define V8_IMMEDIATE_CRASH() ((void(*)())0)() | 290 #define V8_IMMEDIATE_CRASH() ((void(*)())0)() |
| 281 #endif | 291 #endif |
| 282 | 292 |
| 283 | 293 |
| 284 // Use C++11 static_assert if possible, which gives error | 294 // Use C++11 static_assert if possible, which gives error |
| 285 // messages that are easier to understand on first sight. | 295 // messages that are easier to understand on first sight. |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 } | 427 } |
| 418 | 428 |
| 419 template <> | 429 template <> |
| 420 inline bool is_fundamental<uint8_t>() { | 430 inline bool is_fundamental<uint8_t>() { |
| 421 return true; | 431 return true; |
| 422 } | 432 } |
| 423 } | 433 } |
| 424 } // namespace v8::base | 434 } // namespace v8::base |
| 425 | 435 |
| 426 #endif // V8_BASE_MACROS_H_ | 436 #endif // V8_BASE_MACROS_H_ |
| OLD | NEW |