diff options
| author | Paul Eggert | 2013-10-10 23:32:29 -0700 |
|---|---|---|
| committer | Paul Eggert | 2013-10-10 23:32:29 -0700 |
| commit | b9ff995e4c091ca99c8752bb996e155ce7147a00 (patch) | |
| tree | 2606b847e60957359df7942004b774b4c68b119f /src/data.c | |
| parent | 33ac026599404c7d5177eecb4fcd0aa527180ee2 (diff) | |
| download | emacs-b9ff995e4c091ca99c8752bb996e155ce7147a00.tar.gz emacs-b9ff995e4c091ca99c8752bb996e155ce7147a00.zip | |
* lisp.h (eassume): New macro.
Also, include <verify.h>, for 'assume'.
* alloc.c (bool_vector_payload_bytes, Fmake_bool_vector)
(vroundup, vector_nbytes):
* data.c (bool_vector_spare_mask, bool_vector_binop_driver)
(Fbool_vector_not, Fbool_vector_count_matches)
(Fbool_vector_count_matches_at):
Use eassume, not eassert.
* casetab.c (set_identity, shuffle):
* composite.c (composition_gstring_put_cache):
* dispnew.c (update_frame_1):
* ftfont.c (ftfont_shape_by_flt):
* image.c (gif_load):
* intervals.c (offset_intervals):
* macfont.m (macfont_shape):
Remove calls to 'assume' that are no longer needed, because
--enable-gcc-warnings no longer generates bogus warnings
when these calls are removed.
Diffstat (limited to 'src/data.c')
| -rw-r--r-- | src/data.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/data.c b/src/data.c index 8045cd138ea..b4257243fb3 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -2969,7 +2969,7 @@ lowercase l) for small endian machines. */) | |||
| 2969 | static bits_word | 2969 | static bits_word |
| 2970 | bool_vector_spare_mask (ptrdiff_t nr_bits) | 2970 | bool_vector_spare_mask (ptrdiff_t nr_bits) |
| 2971 | { | 2971 | { |
| 2972 | eassert (nr_bits > 0); | 2972 | eassume (nr_bits > 0); |
| 2973 | return (((bits_word) 1) << (nr_bits % BITS_PER_BITS_WORD)) - 1; | 2973 | return (((bits_word) 1) << (nr_bits % BITS_PER_BITS_WORD)) - 1; |
| 2974 | } | 2974 | } |
| 2975 | 2975 | ||
| @@ -3019,7 +3019,7 @@ bool_vector_binop_driver (Lisp_Object op1, | |||
| 3019 | nr_bits = min (nr_bits, XBOOL_VECTOR (dest)->size); | 3019 | nr_bits = min (nr_bits, XBOOL_VECTOR (dest)->size); |
| 3020 | } | 3020 | } |
| 3021 | 3021 | ||
| 3022 | eassert (nr_bits >= 0); | 3022 | eassume (nr_bits >= 0); |
| 3023 | nr_words = ROUNDUP (nr_bits, BITS_PER_BITS_WORD) / BITS_PER_BITS_WORD; | 3023 | nr_words = ROUNDUP (nr_bits, BITS_PER_BITS_WORD) / BITS_PER_BITS_WORD; |
| 3024 | 3024 | ||
| 3025 | adata = (bits_word *) XBOOL_VECTOR (dest)->data; | 3025 | adata = (bits_word *) XBOOL_VECTOR (dest)->data; |
| @@ -3185,7 +3185,7 @@ Return the destination vector. */) | |||
| 3185 | bdata = (bits_word *) XBOOL_VECTOR (b)->data; | 3185 | bdata = (bits_word *) XBOOL_VECTOR (b)->data; |
| 3186 | adata = (bits_word *) XBOOL_VECTOR (a)->data; | 3186 | adata = (bits_word *) XBOOL_VECTOR (a)->data; |
| 3187 | 3187 | ||
| 3188 | eassert (nr_bits >= 0); | 3188 | eassume (nr_bits >= 0); |
| 3189 | 3189 | ||
| 3190 | for (i = 0; i < nr_bits / BITS_PER_BITS_WORD; i++) | 3190 | for (i = 0; i < nr_bits / BITS_PER_BITS_WORD; i++) |
| 3191 | bdata[i] = ~adata[i]; | 3191 | bdata[i] = ~adata[i]; |
| @@ -3220,7 +3220,7 @@ A must be a bool vector. B is a generalized bool. */) | |||
| 3220 | match = NILP (b) ? -1 : 0; | 3220 | match = NILP (b) ? -1 : 0; |
| 3221 | adata = (bits_word *) XBOOL_VECTOR (a)->data; | 3221 | adata = (bits_word *) XBOOL_VECTOR (a)->data; |
| 3222 | 3222 | ||
| 3223 | eassert (nr_bits >= 0); | 3223 | eassume (nr_bits >= 0); |
| 3224 | 3224 | ||
| 3225 | for (i = 0; i < nr_bits / BITS_PER_BITS_WORD; ++i) | 3225 | for (i = 0; i < nr_bits / BITS_PER_BITS_WORD; ++i) |
| 3226 | count += popcount_bits_word (adata[i] ^ match); | 3226 | count += popcount_bits_word (adata[i] ^ match); |
| @@ -3262,7 +3262,7 @@ index into the vector. */) | |||
| 3262 | 3262 | ||
| 3263 | adata = (bits_word *) XBOOL_VECTOR (a)->data; | 3263 | adata = (bits_word *) XBOOL_VECTOR (a)->data; |
| 3264 | 3264 | ||
| 3265 | assume (nr_bits >= 0); | 3265 | eassume (nr_bits >= 0); |
| 3266 | nr_words = ROUNDUP (nr_bits, BITS_PER_BITS_WORD) / BITS_PER_BITS_WORD; | 3266 | nr_words = ROUNDUP (nr_bits, BITS_PER_BITS_WORD) / BITS_PER_BITS_WORD; |
| 3267 | 3267 | ||
| 3268 | pos = XFASTINT (i) / BITS_PER_BITS_WORD; | 3268 | pos = XFASTINT (i) / BITS_PER_BITS_WORD; |