* lisp.h (eassert): Assume that COND is true when optimizing.
[bpt/emacs.git] / src / data.c
index 82cfd74..b268616 100644 (file)
@@ -2966,24 +2966,31 @@ lowercase l) for small endian machines.  */)
 static size_t
 bool_vector_spare_mask (ptrdiff_t nr_bits)
 {
-  eassert_and_assume (nr_bits > 0);
+  eassert (nr_bits > 0);
   return (((size_t) 1) << (nr_bits % BITS_PER_SIZE_T)) - 1;
 }
 
 #if _MSC_VER >= 1500 && (defined _M_IX86 || defined _M_X64)
 # define USE_MSC_POPCOUNT
+# define POPCOUNT_STATIC_INLINE static inline
 #elif __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
 # define USE_GCC_POPCOUNT
+# if 199901L <= __STDC_VERSION__ || !__STRICT_ANSI__
+#  define POPCOUNT_STATIC_INLINE static inline
+# endif
 #else
 # define NEED_GENERIC_POPCOUNT
 #endif
+#ifndef POPCOUNT_STATIC_INLINE
+# define POPCOUNT_STATIC_INLINE static
+#endif
 
 #ifdef USE_MSC_POPCOUNT
-#define NEED_GENERIC_POPCOUNT
+# define NEED_GENERIC_POPCOUNT
 #endif
 
 #ifdef NEED_GENERIC_POPCOUNT
-static unsigned int
+POPCOUNT_STATIC_INLINE unsigned int
 popcount_size_t_generic (size_t val)
 {
     unsigned short j;
@@ -2997,7 +3004,7 @@ popcount_size_t_generic (size_t val)
 #endif
 
 #ifdef USE_MSC_POPCOUNT
-static unsigned int
+POPCOUNT_STATIC_INLINE unsigned int
 popcount_size_t_msc (size_t val)
 {
   unsigned int count;
@@ -3042,7 +3049,7 @@ popcount_size_t_msc (size_t val)
 #endif /* USE_MSC_POPCOUNT */
 
 #ifdef USE_GCC_POPCOUNT
-static unsigned int
+POPCOUNT_STATIC_INLINE unsigned int
 popcount_size_t_gcc (size_t val)
 {
 # if BITS_PER_SIZE_T == 64
@@ -3053,7 +3060,7 @@ popcount_size_t_gcc (size_t val)
 }
 #endif /* USE_GCC_POPCOUNT */
 
-static unsigned int
+POPCOUNT_STATIC_INLINE unsigned int
 popcount_size_t (size_t val)
 {
 #if defined USE_MSC_POPCOUNT
@@ -3101,7 +3108,7 @@ bool_vector_binop_driver (Lisp_Object op1,
       nr_bits = min (nr_bits, XBOOL_VECTOR (dest)->size);
     }
 
-  eassert_and_assume (nr_bits >= 0);
+  eassert (nr_bits >= 0);
   nr_words = ROUNDUP (nr_bits, BITS_PER_SIZE_T) / BITS_PER_SIZE_T;
 
   adata = (size_t *) XBOOL_VECTOR (dest)->data;
@@ -3268,7 +3275,7 @@ Return the destination vector.  */)
   bdata = (size_t *) XBOOL_VECTOR (b)->data;
   adata = (size_t *) XBOOL_VECTOR (a)->data;
 
-  eassert_and_assume (nr_bits >= 0);
+  eassert (nr_bits >= 0);
 
   for (i = 0; i < nr_bits / BITS_PER_SIZE_T; i++)
     bdata[i] = ~adata[i];
@@ -3303,7 +3310,7 @@ A must be a bool vector.  B is a generalized bool.  */)
   match = NILP (b) ? (size_t) -1 : 0;
   adata = (size_t *) XBOOL_VECTOR (a)->data;
 
-  eassert_and_assume (nr_bits >= 0);
+  eassert (nr_bits >= 0);
 
   for (i = 0; i < nr_bits / BITS_PER_SIZE_T; ++i)
     count += popcount_size_t (adata[i] ^ match);