diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2013-10-10 23:32:29 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2013-10-10 23:32:29 -0700 |
commit | b9ff995e4c091ca99c8752bb996e155ce7147a00 (patch) | |
tree | 2606b847e60957359df7942004b774b4c68b119f /src/alloc.c | |
parent | 33ac026599404c7d5177eecb4fcd0aa527180ee2 (diff) | |
download | emacs-b9ff995e4c091ca99c8752bb996e155ce7147a00.tar.gz |
* 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/alloc.c')
-rw-r--r-- | src/alloc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/alloc.c b/src/alloc.c index 17f1b19b3c0..0667353c1a8 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -2027,7 +2027,7 @@ bool_vector_payload_bytes (ptrdiff_t nr_bits, ptrdiff_t exact_needed_bytes; ptrdiff_t needed_bytes; - eassert (nr_bits >= 0); + eassume (nr_bits >= 0); exact_needed_bytes = ROUNDUP ((size_t) nr_bits, CHAR_BIT) / CHAR_BIT; needed_bytes = ROUNDUP ((size_t) nr_bits, BITS_PER_BITS_WORD) / CHAR_BIT; @@ -2064,8 +2064,8 @@ LENGTH must be a number. INIT matters only in whether it is t or nil. */) total_payload_bytes = bool_vector_payload_bytes (XFASTINT (length), &exact_payload_bytes); - eassert (exact_payload_bytes <= total_payload_bytes); - eassert (0 <= exact_payload_bytes); + eassume (exact_payload_bytes <= total_payload_bytes); + eassume (0 <= exact_payload_bytes); needed_elements = ROUNDUP ((size_t) ((bool_header_size - header_size) + total_payload_bytes), @@ -2622,7 +2622,7 @@ verify (VECTOR_BLOCK_SIZE <= (1 << PSEUDOVECTOR_SIZE_BITS)); /* Round up X to nearest mult-of-ROUNDUP_SIZE --- use at compile time. */ #define vroundup_ct(x) ROUNDUP ((size_t) (x), roundup_size) /* Round up X to nearest mult-of-ROUNDUP_SIZE --- use at runtime. */ -#define vroundup(x) (assume ((x) >= 0), vroundup_ct (x)) +#define vroundup(x) (eassume ((x) >= 0), vroundup_ct (x)) /* Rounding helps to maintain alignment constraints if USE_LSB_TAG. */ @@ -2820,7 +2820,7 @@ vector_nbytes (struct Lisp_Vector *v) ptrdiff_t payload_bytes = bool_vector_payload_bytes (bv->size, NULL); - eassert (payload_bytes >= 0); + eassume (payload_bytes >= 0); size = bool_header_size + ROUNDUP (payload_bytes, word_size); } else |