| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 V8CONFIG_H_ | 5 #ifndef V8CONFIG_H_ |
| 6 #define V8CONFIG_H_ | 6 #define V8CONFIG_H_ |
| 7 | 7 |
| 8 // Platform headers for feature detection below. | 8 // Platform headers for feature detection below. |
| 9 #if defined(__ANDROID__) | 9 #if defined(__ANDROID__) |
| 10 # include <sys/cdefs.h> | 10 # include <sys/cdefs.h> |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 #elif defined(V8_DEPRECATION_WARNINGS) && V8_HAS_ATTRIBUTE_DEPRECATED | 332 #elif defined(V8_DEPRECATION_WARNINGS) && V8_HAS_ATTRIBUTE_DEPRECATED |
| 333 # define V8_DEPRECATED(message, declarator) \ | 333 # define V8_DEPRECATED(message, declarator) \ |
| 334 declarator __attribute__((deprecated)) | 334 declarator __attribute__((deprecated)) |
| 335 #elif defined(V8_DEPRECATION_WARNINGS) && V8_HAS_DECLSPEC_DEPRECATED | 335 #elif defined(V8_DEPRECATION_WARNINGS) && V8_HAS_DECLSPEC_DEPRECATED |
| 336 # define V8_DEPRECATED(message, declarator) __declspec(deprecated) declarator | 336 # define V8_DEPRECATED(message, declarator) __declspec(deprecated) declarator |
| 337 #else | 337 #else |
| 338 # define V8_DEPRECATED(message, declarator) declarator | 338 # define V8_DEPRECATED(message, declarator) declarator |
| 339 #endif | 339 #endif |
| 340 | 340 |
| 341 | 341 |
| 342 // a macro to make it easier to see what will be deprecated. |
| 343 #define V8_DEPRECATE_SOON(message, declarator) declarator |
| 344 |
| 345 |
| 342 // A macro to provide the compiler with branch prediction information. | 346 // A macro to provide the compiler with branch prediction information. |
| 343 #if V8_HAS_BUILTIN_EXPECT | 347 #if V8_HAS_BUILTIN_EXPECT |
| 344 # define V8_UNLIKELY(condition) (__builtin_expect(!!(condition), 0)) | 348 # define V8_UNLIKELY(condition) (__builtin_expect(!!(condition), 0)) |
| 345 # define V8_LIKELY(condition) (__builtin_expect(!!(condition), 1)) | 349 # define V8_LIKELY(condition) (__builtin_expect(!!(condition), 1)) |
| 346 #else | 350 #else |
| 347 # define V8_UNLIKELY(condition) (condition) | 351 # define V8_UNLIKELY(condition) (condition) |
| 348 # define V8_LIKELY(condition) (condition) | 352 # define V8_LIKELY(condition) (condition) |
| 349 #endif | 353 #endif |
| 350 | 354 |
| 351 | 355 |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 // Annotate a function indicating the caller must examine the return value. | 428 // Annotate a function indicating the caller must examine the return value. |
| 425 // Use like: | 429 // Use like: |
| 426 // int foo() WARN_UNUSED_RESULT; | 430 // int foo() WARN_UNUSED_RESULT; |
| 427 #if V8_HAS_ATTRIBUTE_WARN_UNUSED_RESULT | 431 #if V8_HAS_ATTRIBUTE_WARN_UNUSED_RESULT |
| 428 #define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) | 432 #define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) |
| 429 #else | 433 #else |
| 430 #define V8_WARN_UNUSED_RESULT /* NOT SUPPORTED */ | 434 #define V8_WARN_UNUSED_RESULT /* NOT SUPPORTED */ |
| 431 #endif | 435 #endif |
| 432 | 436 |
| 433 #endif // V8CONFIG_H_ | 437 #endif // V8CONFIG_H_ |
| OLD | NEW |