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/alloc.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/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, | |||
| 2027 | ptrdiff_t exact_needed_bytes; | 2027 | ptrdiff_t exact_needed_bytes; |
| 2028 | ptrdiff_t needed_bytes; | 2028 | ptrdiff_t needed_bytes; |
| 2029 | 2029 | ||
| 2030 | eassert (nr_bits >= 0); | 2030 | eassume (nr_bits >= 0); |
| 2031 | 2031 | ||
| 2032 | exact_needed_bytes = ROUNDUP ((size_t) nr_bits, CHAR_BIT) / CHAR_BIT; | 2032 | exact_needed_bytes = ROUNDUP ((size_t) nr_bits, CHAR_BIT) / CHAR_BIT; |
| 2033 | needed_bytes = ROUNDUP ((size_t) nr_bits, BITS_PER_BITS_WORD) / CHAR_BIT; | 2033 | 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. */) | |||
| 2064 | total_payload_bytes = bool_vector_payload_bytes | 2064 | total_payload_bytes = bool_vector_payload_bytes |
| 2065 | (XFASTINT (length), &exact_payload_bytes); | 2065 | (XFASTINT (length), &exact_payload_bytes); |
| 2066 | 2066 | ||
| 2067 | eassert (exact_payload_bytes <= total_payload_bytes); | 2067 | eassume (exact_payload_bytes <= total_payload_bytes); |
| 2068 | eassert (0 <= exact_payload_bytes); | 2068 | eassume (0 <= exact_payload_bytes); |
| 2069 | 2069 | ||
| 2070 | needed_elements = ROUNDUP ((size_t) ((bool_header_size - header_size) | 2070 | needed_elements = ROUNDUP ((size_t) ((bool_header_size - header_size) |
| 2071 | + total_payload_bytes), | 2071 | + total_payload_bytes), |
| @@ -2622,7 +2622,7 @@ verify (VECTOR_BLOCK_SIZE <= (1 << PSEUDOVECTOR_SIZE_BITS)); | |||
| 2622 | /* Round up X to nearest mult-of-ROUNDUP_SIZE --- use at compile time. */ | 2622 | /* Round up X to nearest mult-of-ROUNDUP_SIZE --- use at compile time. */ |
| 2623 | #define vroundup_ct(x) ROUNDUP ((size_t) (x), roundup_size) | 2623 | #define vroundup_ct(x) ROUNDUP ((size_t) (x), roundup_size) |
| 2624 | /* Round up X to nearest mult-of-ROUNDUP_SIZE --- use at runtime. */ | 2624 | /* Round up X to nearest mult-of-ROUNDUP_SIZE --- use at runtime. */ |
| 2625 | #define vroundup(x) (assume ((x) >= 0), vroundup_ct (x)) | 2625 | #define vroundup(x) (eassume ((x) >= 0), vroundup_ct (x)) |
| 2626 | 2626 | ||
| 2627 | /* Rounding helps to maintain alignment constraints if USE_LSB_TAG. */ | 2627 | /* Rounding helps to maintain alignment constraints if USE_LSB_TAG. */ |
| 2628 | 2628 | ||
| @@ -2820,7 +2820,7 @@ vector_nbytes (struct Lisp_Vector *v) | |||
| 2820 | ptrdiff_t payload_bytes = | 2820 | ptrdiff_t payload_bytes = |
| 2821 | bool_vector_payload_bytes (bv->size, NULL); | 2821 | bool_vector_payload_bytes (bv->size, NULL); |
| 2822 | 2822 | ||
| 2823 | eassert (payload_bytes >= 0); | 2823 | eassume (payload_bytes >= 0); |
| 2824 | size = bool_header_size + ROUNDUP (payload_bytes, word_size); | 2824 | size = bool_header_size + ROUNDUP (payload_bytes, word_size); |
| 2825 | } | 2825 | } |
| 2826 | else | 2826 | else |