diff options
author | Dmitry Stogov <dmitry@zend.com> | 2015-06-25 18:56:14 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2015-06-25 18:56:14 +0300 |
commit | 2a2f42c25d068a5233bd1239222ad7d2948963ee (patch) | |
tree | 385415f87aaa7e1a034327e8ec08220869e2827e /Zend/zend_portability.h | |
parent | 04b26ba5c6a26fc5499a32251fd8b4666581b36a (diff) | |
download | php-git-2a2f42c25d068a5233bd1239222ad7d2948963ee.tar.gz |
Optimize out usless conditions used by specializer
Diffstat (limited to 'Zend/zend_portability.h')
-rw-r--r-- | Zend/zend_portability.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Zend/zend_portability.h b/Zend/zend_portability.h index 8c6989d030..214ece53e6 100644 --- a/Zend/zend_portability.h +++ b/Zend/zend_portability.h @@ -250,6 +250,14 @@ char *alloca(); # define HAVE_BUILTIN_CONSTANT_P #endif +#ifdef HAVE_BUILTIN_CONSTANT_P +# define ZEND_CONST_COND(_condition, _default) \ + (__builtin_constant_p(_condition) ? (_condition) : (_default)) +#else +# define ZEND_CONST_COND(_condition, _default) \ + (_default) +#endif + #if ZEND_DEBUG # define zend_always_inline inline # define zend_never_inline |