summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Zend/zend.h8
-rw-r--r--Zend/zend_alloc.c5
2 files changed, 8 insertions, 5 deletions
diff --git a/Zend/zend.h b/Zend/zend.h
index dd37c4d01e..75201c1190 100644
--- a/Zend/zend.h
+++ b/Zend/zend.h
@@ -329,6 +329,14 @@ struct _zval_struct {
#define zend_always_inline inline
#endif
+#if (defined (__GNUC__) && __GNUC__ > 2 ) && !defined(__INTEL_COMPILER) && !defined(DARWIN) && !defined(__hpux) && !defined(_AIX)
+# define EXPECTED(condition) __builtin_expect(condition, 1)
+# define UNEXPECTED(condition) __builtin_expect(condition, 0)
+#else
+# define EXPECTED(condition) (condition)
+# define UNEXPECTED(condition) (condition)
+#endif
+
static zend_always_inline zend_uint zval_refcount_p(zval* pz) {
return pz->refcount__gc;
}
diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c
index f491620dee..9945108b75 100644
--- a/Zend/zend_alloc.c
+++ b/Zend/zend_alloc.c
@@ -79,12 +79,7 @@ void zend_debug_alloc_output(char *format, ...)
#endif
#if (defined (__GNUC__) && __GNUC__ > 2 ) && !defined(__INTEL_COMPILER) && !defined(DARWIN) && !defined(__hpux) && !defined(_AIX)
-# define EXPECTED(condition) __builtin_expect(condition, 1)
-# define UNEXPECTED(condition) __builtin_expect(condition, 0)
static void zend_mm_panic(const char *message) __attribute__ ((noreturn));
-#else
-# define EXPECTED(condition) (condition)
-# define UNEXPECTED(condition) (condition)
#endif
static void zend_mm_panic(const char *message)