| 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 "../../include/v8stdint.h" | 8 #include "../../include/v8stdint.h" |
| 9 | 9 |
| 10 | 10 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 | 47 |
| 48 // Newly written code should use V8_INLINE and V8_NOINLINE directly. | 48 // Newly written code should use V8_INLINE and V8_NOINLINE directly. |
| 49 #define INLINE(declarator) V8_INLINE declarator | 49 #define INLINE(declarator) V8_INLINE declarator |
| 50 #define NO_INLINE(declarator) V8_NOINLINE declarator | 50 #define NO_INLINE(declarator) V8_NOINLINE declarator |
| 51 | 51 |
| 52 | 52 |
| 53 // Newly written code should use V8_WARN_UNUSED_RESULT. | 53 // Newly written code should use V8_WARN_UNUSED_RESULT. |
| 54 #define MUST_USE_RESULT V8_WARN_UNUSED_RESULT | 54 #define MUST_USE_RESULT V8_WARN_UNUSED_RESULT |
| 55 | 55 |
| 56 | 56 |
| 57 // Define DISABLE_ASAN macros. | 57 // Define V8_USE_ADDRESS_SANITIZER macros. |
| 58 #if defined(__has_feature) | 58 #if defined(__has_feature) |
| 59 #if __has_feature(address_sanitizer) | 59 #if __has_feature(address_sanitizer) |
| 60 #define DISABLE_ASAN __attribute__((no_sanitize_address)) | 60 #define V8_USE_ADDRESS_SANITIZER 1 |
| 61 #endif | 61 #endif |
| 62 #endif | 62 #endif |
| 63 | 63 |
| 64 | 64 // Define DISABLE_ASAN macros. |
| 65 #ifndef DISABLE_ASAN | 65 #ifdef V8_USE_ADDRESS_SANITIZER |
| 66 #define DISABLE_ASAN __attribute__((no_sanitize_address)) |
| 67 #else |
| 66 #define DISABLE_ASAN | 68 #define DISABLE_ASAN |
| 67 #endif | 69 #endif |
| 68 | 70 |
| 69 | 71 |
| 70 #if V8_CC_GNU | 72 #if V8_CC_GNU |
| 71 #define V8_IMMEDIATE_CRASH() __builtin_trap() | 73 #define V8_IMMEDIATE_CRASH() __builtin_trap() |
| 72 #else | 74 #else |
| 73 #define V8_IMMEDIATE_CRASH() ((void(*)())0)() | 75 #define V8_IMMEDIATE_CRASH() ((void(*)())0)() |
| 74 #endif | 76 #endif |
| 75 | 77 |
| 76 #endif // V8_BASE_MACROS_H_ | 78 #endif // V8_BASE_MACROS_H_ |
| OLD | NEW |