Add a few safety checks when ENABLE_CHECKING
This was motivated by the recent addition of module code, which added some ENABLE_CHECKING-enabled checks that are useful elsewhere too. * src/alloc.c (compact_font_cache_entry): * src/fns.c (sweep_weak_table): * src/lread.c (oblookup): Use gc_asize rather than doing it by hand. * src/emacs-module.c (module_make_global_ref) (module_free_global_ref, module_vec_size): Omit assertions that lisp.h now checks. * src/lisp.h (XFASTINT, ASIZE): In functional implementations, check that the result is nonnegative. Use eassume, as this info can help a bit when optimizing production code. (XSYMBOL) [!USE_LSB_TAG]: Assert that argument is a symbol, to be consistent with the USE_LSB_TAG case. (gc_asize): New function, when ASIZE is needed in the gc. (gc_aset): Use it. (HASH_TABLE_P): Move definition up, so that it can be used ... (XHASH_TABLE): ... here, to assert that the arg is a hash table.
Showing with 30 additions and 30 deletions