summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Speed up (nthcdr N L) when L is circularPaul Eggert2018-08-201-6/+52
| | | | | | | | | | | | | Also, fix bug when N is a positive bignum, a problem reported by Eli Zaretskii and Pip Cet in: https://lists.gnu.org/r/emacs-devel/2018-08/msg00690.html * src/fns.c (Fnthcdr): If a cycle is found, reduce the count modulo the cycle length before continuing. This reduces the worst-case cost of (nthcdr N L) from N to min(N, C) where C is the number of distinct cdrs of L. Reducing modulo the cycle length also allows us to do arithmetic with machine words instead of with GMP. * test/src/fns-tests.el (test-nthcdr-circular): New test.
* Define get_proc_addr in Cygwin-w32 buildAndy Moreton2018-08-2010-33/+38
| | | | | | | | | | | | | * src/w32common.h (get_proc_addr, DEF_DLL_FN, LOAD_DLL_FN): Move definitions here from src/w32.h. * src/decompress.c [WINDOWSNT]: * src/gnutls.c [WINDOWSNT]: * src/image.c [WINDOWSNT]: * src/json.c [WINDOWSNT]: * src/lcms.c [WINDOWSNT]: * src/w32font.c [WINDOWSNT]: * src/w32uniscribe.c: * src/xml.c [WINDOWSNT]: Include w32common.h.
* nthcdr now works with bignumsPaul Eggert2018-08-201-2/+13
| | | | | | Problem reported by Karl Fogel in: https://lists.gnu.org/r/emacs-devel/2018-08/msg00671.html * src/fns.c (Fnthcdr): Support bignum counts.
* Fix expt signedness bug --without-wide-intPaul Eggert2018-08-191-1/+1
| | | | | | | | Problem reported by Federico in: https://lists.gnu.org/r/emacs-devel/2018-08/msg00619.html * src/floatfns.c (Fexpt): Use TYPE_RANGED_FIXNUMP, not RANGED_FIXNUMP, to fix bug with unsigned comparison on platforms built --without-wide-int.
* Add bignum support to exptPaul Eggert2018-08-191-20/+27
| | | | | | | | | | Problem and initial solution reported by Andy Moreton in: https://lists.gnu.org/r/emacs-devel/2018-08/msg00503.html * doc/lispref/numbers.texi (Math Functions): expt integer overflow no longer causes truncation; it now signals an error since bignum overflow is a big deal. * src/floatfns.c (Fexpt): Support bignum arguments. * test/src/floatfns-tests.el (bignum-expt): New test.
* Fix bug with ‘mod’ and float+bignumPaul Eggert2018-08-181-4/+2
| | | | | | | Problem reported by Andy Moreton in: https://lists.gnu.org/r/emacs-devel/2018-08/msg00442.html * src/floatfns.c (fmod_float): Work even if an arg is a bignum. * test/src/floatfns-tests.el (bignum-mod): New test.
* Tweak integer divisionPaul Eggert2018-08-181-8/+5
| | | | | | * src/data.c (arith_driver): Reorder to remove unnecessary FIXNUMP. Tighten test for whether to convert the divisor from fixnum to mpz_t. Simplify.
* Simplify float_arith_driverPaul Eggert2018-08-181-16/+4
| | | | | * src/data.c (float_arith_driver): Simplify, as we needn’t worry about that 30-year-old compiler bug any more.
* Minor fixups for intmax_t→mpz_t conversionPaul Eggert2018-08-183-15/+22
| | | | | | | | | | * src/alloc.c (mpz_set_intmax_slow): Tighten assertion. Work even in the unlikely case where libgmp uses nails. * src/data.c (FIXNUMS_FIT_IN_LONG): New constant. (arith_driver): Use it to tighten compile-time checks. * src/lisp.h (mpz_set_intmax): Do not assume that converting an out-of-range value to ‘long’ is harmless, as it might raise a signal. Use simpler expression; compiler can optimize.
* Improve --with-wide-int mpz_t→fixnum conversionPaul Eggert2018-08-181-12/+7
| | | | | | | | | | | | | | | | | | | | | These tuneups and minor simplifications should affect only platforms with EMACS_INT wider than ‘long’. * src/alloc.c (make_number): If the number fits in long but not in fixnum, do not attempt to convert to fixnum again. Tighten the compile-time check for whether the second attempt is worth trying, from sizeof (long) < sizeof (EMACS_INT) to LONG_WIDTH < FIXNUM_BITS. Do not bother computing the sign of the value to tighten the bounds for whether to try the second attempt, as it’s not worth the effort. Do not call mpz_size, which is unnecessary since the number of bits is already known and the loop can iterate over a shift count instead. Avoid unnecessary casts. Use + instead of | where either will do, as + is typically better for optimization. Improve mpz_t to fixnum when --with-wide-int * src/alloc.c (make_number): Avoid undefined behavior when shifting an EMACS_UINT by more than EMACS_UINT_WIDTH bits. Check for integer overflow when shifting.
* Improve bignum comparison (Bug#32463#50)Paul Eggert2018-08-181-125/+43
| | | | | | | | | | | | * src/data.c (isnan): Remove, as we can assume C99. (bignumcompare): Remove, folding its functionality into arithcompare. (arithcompare): Compare bignums directly here. Fix bugs when comparing NaNs to bignums. When comparing a bignum to a fixnum, just look at the bignum’s sign, as that’s all that is needed. Decrease scope of locals when this is easy. * test/src/data-tests.el (data-tests-bignum): Test bignum vs NaN.
* Document that ‘random’ is limited to fixnumsPaul Eggert2018-08-181-6/+3
| | | | | | Problem reported by Pip Cet (Bug#32463#20). * doc/lispref/numbers.texi (Random Numbers): * src/fns.c (Frandom): Adjust doc.
* Restore traditional lsh behavior on fixnumsPaul Eggert2018-08-181-36/+24
| | | | | | | | | | | | | | | | | | | | | * doc/lispref/numbers.texi (Bitwise Operations): Document that the traditional (lsh A B) behavior is for fixnums, and that it is an error if A and B are both negative and A is a bignum. See Bug#32463. * lisp/subr.el (lsh): New function, moved here from src/data.c. * src/data.c (ash_lsh_impl): Remove, moving body into Fash since it’s the only caller now. (Fash): Check for out-of-range counts. If COUNT is zero, return first argument instead of going through libgmp. Omit lsh code since lsh is now done in Lisp. Add code for shifting fixnums right, to avoid a round trip through libgmp. (Flsh): Remove; moved to lisp/subr.el. * test/lisp/international/ccl-tests.el (shift): Test for traditional lsh behavior, instead of assuming lsh is like ash when bignums are present. * test/src/data-tests.el (data-tests-logand) (data-tests-logior, data-tests-logxor, data-tests-ash-lsh): New tests.
* Avoid compilation warning in w32fns.cEli Zaretskii2018-08-181-5/+2
| | | | | | * src/w32fns.c (Fw32_read_registry): Avoid compiler warning regarding possible use of 'rootkey' without initializing it first. Reported by Andy Moreton <andrewjmoreton@gmail.com>.
* Improve ‘abs’ performancePaul Eggert2018-08-171-17/+30
| | | | | | * src/floatfns.c (Fabs): Improve performance by not copying the argument if it would eql the result. As a minor detail, don't assume fixnums are two’s complement.
* Pacify -Wcast-function-type warnings in GCC 8.1Andy Moreton2018-08-1710-161/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/image.c: Move attributes into DEF_DLL_FN call. * src/dynlib.c (dynlib_addr): Use get_proc_addr. * src/w32.h: (get_proc_addr): New function. (LOAD_DLL_FN): Use it. (DEF_DLL_FN): Allow function attributes after argument list. Add function pointer type used by LOAD_DLL_FN. * src/w32.c (open_process_token, get_token_information) (lookup_account_sid, get_sid_sub_authority) (get_sid_sub_authority_count, get_security_info) (get_file_security, set_file_security) (set_named_security_info) (get_security_descriptor_owner, get_security_descriptor_group) (get_security_descriptor_dacl, is_valid_sid, equal_sid) (get_length_sid, copy_sid, get_native_system_info) (get_system_times, create_symbolic_link) (is_valid_security_descriptor, convert_sd_to_sddl) (convert_sddl_to_sd, get_adapters_info, reg_open_key_ex_w) (reg_query_value_ex_w, expand_environment_strings_w) (init_environment, create_toolhelp32_snapshot) (process32_first, process32_next, open_thread_token) (impersonate_self, revert_to_self, get_process_memory_info) (get_process_working_set_size, global_memory_status) (global_memory_status_ex, init_winsock) (maybe_load_unicows_dll, globals_of_w32): Use get_proc_addr. * src/w32fns.c (setup_w32_kbdhook, Ffile_system_info) (get_dll_version, w32_reset_stack_overflow_guard) (w32_backtrace, globals_of_w32fns): Use get_proc_addr. * src/w32font.c (get_outline_metrics_w, get_text_metrics_w) (get_glyph_outline_w, get_char_width_32_w): Use get_proc_addr. * src/w32heap.c (init_heap): Use get_proc_addr. * src/w32menu.c (globals_of_w32menu): Use get_proc_addr. * src/w32proc.c (init_timers, sys_kill, w32_compare_strings): Use get_proc_addr. * src/w32uniscribe.c (syms_of_w32uniscribe): Use get_proc_addr.
* Fix problems with logxor etc. and fixnumsPaul Eggert2018-08-173-33/+9
| | | | | | | | | | | | | | These operations incorrectly treated negative fixnums as bignums greater than most-positive-fixnum. * src/alloc.c (mpz_set_intmax_slow): Avoid undefined behavior if signed unary negation overflows, while we’re in the neighborhood. (mpz_set_uintmax_slow): Remove. All uses removed. * src/data.c (arith_driver): Treat fixnums as signed, not unsigned, even for logical operations. * src/lisp.h (mpz_set_uintmax): Remove. All uses removed. * test/src/data-tests.el (data-tests-logand) (data-tests-logior, data-tests-logxor): New tests.
* Reject outlandishly-wide bignumsPaul Eggert2018-08-161-3/+21
| | | | | | | | | Do not allow bignums that are so wide that their log base 2 might not fit into a fixnum, as this will cause problems elsewhere. We already have a similar limitation for bool-vectors. * src/emacs.c (check_bignum_size, xmalloc_for_gmp): New function. (xrealloc_for_gmp): Check for too-large bignum. (main): Use xmalloc_for_gmp.
* Speed up logcount on bignumsPaul Eggert2018-08-161-2/+1
| | | | | * src/data.c (Flogcount): Speed up by using the mpz equivalent of ~X instead of -X-1.
* Pacify GCC with -Wunused-but-set-variableKen Brown2018-08-161-3/+3
| | | | | | | * src/unexcw.c (read_exe_header): (fixup_executable): (unexec): Specify the "unused" attribute for variables that are used only in assertions.
* Remove more traces of misc (Bug#32405)Paul Eggert2018-08-141-9/+1
| | | | | | | | | | | Remove misc-objects-consed and the misc component of memory-use-count, since misc objects no longer exist. * doc/lispref/internals.texi, etc/NEWS: Mention this, and adjust better to recent removal of misc objects. * src/alloc.c (MEM_TYPE_MISC): Remove; no longer used. (Fmemory_use_counts): Omit misc count, since miscs no longer exist. (misc-objects-consed): Remove.
* Merge from origin/emacs-26Glenn Morris2018-08-141-4/+0
|\ | | | | | | | | | | | | | | 614cc65 ; * lisp/simple.el (line-move-visual): Fix typo. d2ad4ba Do not consider external packages to be removable (Bug#27822) ec0995c * src/alloc.c: Remove obsolete comments. ec6f588 Better support utf-8-with-signature and utf-8-hfs in HTML eb026a8 Don't use -Wabi compiler option
| * * src/alloc.c: Remove obsolete comments.Paul Eggert2018-08-111-4/+0
| |
* | Port recent changes to older GCCPaul Eggert2018-08-141-1/+2
| | | | | | | | | | | | | | Problem reported by Glenn Morris in: https://lists.gnu.org/r/emacs-devel/2018-08/msg00446.html * src/lisp.h (make_pointer_integer_unsafe): Port to older GCC.
* | Update doc strings for fixnum constantsPaul Eggert2018-08-131-2/+2
| | | | | | | | | | * src/data.c (most-positive-fixnum, most-negative-fixnum): Update doc strings in the light of fixnums.
* | Fix check for unsafe watch descriptorPaul Eggert2018-08-132-5/+10
| | | | | | | | | | | | | | | | * src/lisp.h (make_pointer_integer_unsafe): New function. (make_pointer_integer): Use it. * src/gfilenotify.c (dir_monitor_callback): Omit redundant eassert. (Fgfile_add_watch): Signal an error instead of failing an assertion if the pointer does not work.
* | Pacify gcc -Og -WuninitializedPaul Eggert2018-08-128-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This addresses the -Og uninitialized variable warnings I ran into on Fedora 28, which uses 8.1.1 20180712 (Red Hat 8.1.1-5). It also changes some explicit initializations to UNINIT when the variable does not actually need to be initialized. * src/process.c (connect_network_socket): * src/sysdep.c (system_process_attributes): * src/xfns.c (x_real_pos_and_offsets): * src/xterm.c (get_current_wm_state) [USE_XCB]: Add UNINIT. * src/editfns.c (tzlookup): * src/fns.c (Fnconc): * src/font.c (font_parse_fcname): * src/frame.c (x_set_frame_parameters): Prefer UNINIT to explicit initialization.
* | Port better to x86 -fexcess-precision=fastPaul Eggert2018-08-121-14/+29
| | | | | | | | | | | | | | | | | | | | | | Problem reported by Eli Zaretskii in: https://lists.gnu.org/r/emacs-devel/2018-08/msg00380.html * src/data.c (arithcompare): Work around incompatibility between gcc -fexcess-precision=fast and the C standard on x86, by capturing the results of floating-point comparisons before the excess precision spontaneously decays. Although this fix might not work in general, it does work here and is probably good enough for the platforms we care about.
* | Adjust .gdbinit to removal of misc objectsPaul Eggert2018-08-121-37/+9
| | | | | | | | | | * src/.gdbinit (xtype, xpr): Adjust. (xmisctype, xmiscfree): Remove.
* | Make mini-gmp safe for --enable-gcc-warningsPaul Eggert2018-08-122-2/+41
| | | | | | | | | | | | | | | | | | | | * configure.ac (GMP_OBJ): When building mini-gmp, compile mini-gmp-emacs.c, not mini-gmp.c. * lib-src/etags.c (NDEBUG): Don't attempt to redefine, in case the builder compiles with -DNDEBUG. * src/conf_post.h (NDEBUG) [!ENABLE_CHECKING && !NDEBUG]: Define. This avoids bloat in mini-gmp-emacs.o. * src/mini-gmp-emacs.c: New file, which pacifies --enable-gcc-warnings.
* | ; Avoid compilation warnings under -OgEli Zaretskii2018-08-125-5/+5
| | | | | | | | | | | | | | | | | | * src/w32.c (w32_read_registry): * src/font.c (font_parse_fcname): * src/fns.c (Fnconc): * src/editfns.c (tzlookup): * src/frame.c (x_set_frame_parameters): Avoid compiler warnings about maybe-uninitialized variables.
* | Ensure no padding after union vectorlike_headerAndreas Schwab2018-08-121-5/+6
| | | | | | | | | | | | | | | | | | | | Instead of increasing GCALIGNMENT align union vectorlike_header by adding a Lisp_Object member. * src/lisp.h (GCALIGNMENT): Revert last change. (union vectorlike_header): Add align member. (header_size): Verify the same as sizeof (union vectorlike_header)
* | Avoid padding after union vectorlike_headerAndreas Schwab2018-08-121-3/+5
| | | | | | | | | | | | | | | | The PSEUDOVECTORSIZE macro requires that the first member after union vectorlike_header has the same offset in all pseudo vector structures. * src/lisp.h (GCALIGNMENT) [!USE_LSB_TAG]: Use alignment of Lisp_Object.
* | Simplify mark_object for pseudovectorsPaul Eggert2018-08-112-19/+5
| | | | | | | | | | | | | | | | | | Suggested by Pip Cet (Bug#32405#14). * src/alloc.c (mark_object): Remove unnecessary special cases for PVEC_MARKER, PVEC_BOOL_VECTOR, PVEC_MISC_PTR, PVEC_USER_PTR, and PVEC_FINALIZER. change is to free up an enum Lisp_Type tag value, a scarce
* | Turn misc objects into pseudovectorsPaul Eggert2018-08-119-806/+395
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eliminate the category of miscellaneous objects, and turn all such objects into pseudovectors. The immediate motivation for this change is to free up an enum Lisp_Type tag value, a scarce resource that can be better used elsewhere. However, this change is worthwhile in its own right, as it improves performance slightly on my platform, 0.3% faster for 'make compile-always' on Fedora 28, and it simplifies the garbage collector and interpreter (Bug#32405). * doc/lispref/internals.texi (Garbage Collection): * etc/NEWS: Document change to garbage-collect return value. * src/alloc.c (total_markers, total_free_markers): (union aligned_Lisp_Misc, MARKER_BLOCK_SIZE) (struct marker_block, marker_block, marker_block_index) (misc_free_list, allocate_misc, live_misc_holding) (live_misc_p, sweep_misc): * src/lisp.h (lisp_h_MARKERP, lisp_h_MISCP, MARKERP, MISCP) (Lisp_Misc, enum Lisp_Misc_Type, Lisp_Misc_Free) (Lisp_Misc_Marker, Lisp_Misc_Overlay, Lisp_Misc_Finalizer) (Lisp_Misc_Ptr, Lisp_Misc_User_Ptr, Lisp_Misc_Limit) (Lisp_Misc_Bignum) (XSETMISC, struct Lisp_Misc_Any, XMISCANY, XMISCTYPE) (struct Lisp_Free, union Lisp_Misc, XMISC): Remove. All uses removed. (cleanup_vector): Clean up objects that were formerly misc and are now pseudovectors. (make_misc_ptr, build_overlay, Fmake_marker, build_marker) (make_bignum_str, make_number, make_pure_bignum) (make_user_ptr, Fmake_finalizer): Build as pseudovectors, not as misc objects. (mark_finalizer_list, queue_doomed_finalizers) (compact_undo_list, mark_overlay, mark_object) (unchain_dead_markers): Mark as vector-like objects, not as misc objects. (mark_maybe_object, mark_maybe_pointer, valid_lisp_object_p) (total_bytes_of_live_objects, survives_gc_p): * src/fns.c (sxhash): No need to worry about misc objects. (garbage_collect_1): Do not generate a 'misc' component. (syms_of_alloc): No need for 'misc' symbol. * src/buffer.c (overlays_at, overlays_in, overlay_touches_p) (overlay_strings, recenter_overlay_lists) (fix_start_end_in_overlays, fix_overlays_before) (Foverlay_lists, report_overlay_modification) (evaporate_overlays): * src/editfns.c (overlays_around): * src/data.c (Ftype_of): * src/fns.c (internal_equal): * src/lisp.h (mint_ptrp, xmint_pointer, FINALIZERP) (XFINALIZER, MARKERP, XMARKER, OVERLAYP, XOVERLAY, USER_PTRP) (XUSER_PTR, BIGNUMP, XBIGNUM): * src/print.c (print_vectorlike, print_object): * src/undo.c (record_marker_adjustments): * src/xdisp.c (load_overlay_strings): Formerly misc objects are now pseudovectors. * src/lisp.h (PVEC_MARKER, PVEC_OVERLAY, PVEC_FINALIZER) (PVEC_BIGNUM, PVEC_MISC_PTR, PVEC_USER_PTR): New constants, replacing their misc versions. All uses changed. (struct Lisp_Marker, struct Lisp_Overlay, struct Lisp_Misc_Ptr) (struct Lisp_Bignum, struct Lisp_User_Ptr, struct Lisp_Finalizer): Make usable as a pseudovector by using a pseudovector header, replacing any DIY components, and putting Lisp_Object members first. All uses changed.
* | Pacify Oracle Studio 12.6Paul Eggert2018-08-112-11/+4
| | | | | | | | | | * src/xfns.c (Fx_frame_restack): * src/xterm.c (x_io_error_quitter): Omit unreachable code.
* | Merge branch 'feature/bignum'Tom Tromey2018-08-11116-4825/+10354
|\ \
| * | Fix up for bignums after merge from trunkTom Tromey2018-08-093-4/+4
| | | | | | | | | | | | | | | | | | * src/character.c (char_width): Use XFIXNUM. * src/editfns.c (styled_format): Use XFIXNUM, XUFIXNUM. * src/fns.c (Fproper_list_p): Use make_fixnum.
| * | Merge remote-tracking branch 'origin/master' into feature/bignumTom Tromey2018-08-0948-3112/+1316
| |\ \
| * | | Use mpz_sgn rather than comparisons against 0Tom Tromey2018-08-092-3/+3
| | | | | | | | | | | | | | | | | | | | * src/data.c (Fmod): Use mpz_sgn. * src/lisp.h (NATNUMP): Use mpz_sgn.
| * | | Do not use GMP_NUMB_BITSAndy Moreton2018-08-091-1/+1
| | | | | | | | | | | | | | | | * src/alloc.c (make_number): Use mp_bits_per_limb, not GMP_NUMB_BITS.
| * | | Update src/{ns,mac}*.m to use bignum-compatible macrosCharles A. Roelli2018-08-097-158/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/nsterm.m: * src/nsselect.m: * src/nsmenu.m: * src/nsimage.m: * src/nsfont.m: * src/nsfns.m: * src/macfont.m: Replace "make_number" -> "make_fixnum", "XINT" -> "XFIXNUM", "XFASTINT" -> "XFIXNAT", "TYPE_RANGED_INTEGERP" -> "TYPE_RANGED_FIXNUMP", "RANGED_INTEGERP" -> "RANGED_FIXNUMP", "CHECK_NATNUM" -> "CHECK_FIXNAT", "CHECK_NUMBER" -> "CHECK_FIXNUM", "INTEGERP" -> "FIXNUMP", "NUMBERP" -> "FIXED_OR_FLOATP", as done in the following changes: 2018-07-06 Rename integerp->fixnum, etc, in preparation for bignums (42fe787b) 2018-08-07 More macro renamings for bignum (d1ec3a0a)
| * | | Handle leading "+" when converting string to bignumTom Tromey2018-08-081-10/+5
| | | | | | | | | | | | | | | | | | | | * src/lread.c (string_to_number): Skip leading "+" when calling make_bignum_str.
| * | | Use mpz_import in mpz_set_uintmax_slowTom Tromey2018-08-081-5/+5
| | | | | | | | | | | | | | | | * src/alloc.c (mpz_set_uintmax_slow): Use mpz_import.
| * | | Make purecopy work for bignumsTom Tromey2018-08-081-0/+30
| | | | | | | | | | | | | | | | | | | | * src/alloc.c (make_pure_bignum): New function. (purecopy): Use it.
| * | | More macro renamings for bignumTom Tromey2018-08-0798-1972/+1972
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/alloc.c, src/bidi.c, src/buffer.c, src/buffer.h, src/bytecode.c, src/callint.c, src/callproc.c, src/casefiddle.c, src/casetab.c, src/category.c, src/ccl.c, src/character.c, src/character.h, src/charset.c, src/charset.h, src/chartab.c, src/cmds.c, src/coding.c, src/composite.c, src/composite.h, src/data.c, src/dbusbind.c, src/decompress.c, src/dired.c, src/dispextern.h, src/dispnew.c, src/disptab.h, src/doc.c, src/dosfns.c, src/editfns.c, src/emacs-module.c, src/emacs.c, src/eval.c, src/fileio.c, src/floatfns.c, src/fns.c, src/font.c, src/font.h, src/fontset.c, src/frame.c, src/frame.h, src/fringe.c, src/ftcrfont.c, src/ftfont.c, src/gfilenotify.c, src/gnutls.c, src/gtkutil.c, src/image.c, src/indent.c, src/insdel.c, src/intervals.c, src/json.c, src/keyboard.c, src/keymap.c, src/kqueue.c, src/lcms.c, src/lisp.h, src/lread.c, src/macros.c, src/marker.c, src/menu.c, src/minibuf.c, src/msdos.c, src/print.c, src/process.c, src/profiler.c, src/search.c, src/sound.c, src/syntax.c, src/syntax.h, src/sysdep.c, src/term.c, src/termhooks.h, src/textprop.c, src/undo.c, src/w32.c, src/w32console.c, src/w32fns.c, src/w32font.c, src/w32inevt.c, src/w32proc.c, src/w32select.c, src/w32term.c, src/w32term.h, src/w32uniscribe.c, src/window.c, src/xdisp.c, src/xfaces.c, src/xfns.c, src/xfont.c, src/xftfont.c, src/xmenu.c, src/xml.c, src/xrdb.c, src/xselect.c, src/xsettings.c, src/xterm.c, src/xwidget.c Rename XINT->XFIXNUM, XFASTINT->XFIXNAT, XUINT->XUFIXNUM.
| * | | Fix hash functions for bignumsTom Tromey2018-08-041-4/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/fns.c (cmpfn_eql, hashfn_eql): Handle bignums. (sxhash_bignum): New function. (sxhash): Use it. * test/src/fns-tests.el (test-bignum-hash): New test.
| * | | Fix bignum comparisons with NaNTom Tromey2018-08-041-6/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/data.c (isnan): Move earlier. (bignumcompare): Explicitly handle NaN. * test/src/data-tests.el (data-tests-min): Add NaN tests for bignum. (data-check-sign): Fix for previous patch. * test/src/fns-tests.el (test-bignum-eql): Add NaN test.
| * | | Make bignums work better when EMACS_INT is larger than longAndy Moreton2018-08-043-19/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/international/ccl.el (ccl-fixnum): New function. (ccl-embed-data, ccl-embed-current-address, ccl-dump): Use it. * src/alloc.c (make_number): Handle case where EMACS_INT is larger than long. * src/data.c (bignumcompare): Handle case where EMACS_INT is larger than long. (arith_driver): Likewise. Coerce markers. (float_arith_driver): Coerce markers. (Flogcount): Use mpz_sgn. (ash_lsh_impl): Fix bugs. (Fsub1): Fix underflow check. * src/lisp.h (NUMBERP): Don't check BIGNUMP. (CHECK_FIXNUM_OR_FLOAT_COERCE_MARKER): Fix indentation. * test/lisp/international/ccl-tests.el: New file.
| * | | Fix bignum creation when EMACS_INT is wider than longTom Tromey2018-07-195-15/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/alloc.c (mpz_set_intmax_slow, mpz_set_uintmax_slow): New functions. * src/data.c (arith_driver, Frem, Fmod, ash_lsh_impl, Fadd1) (Fsub1): Use mpz_set_intmax, mpz_set_uintmax. * src/emacs-module.c (module_make_integer): Use mpz_set_intmax. * src/floatfns.c (Fabs): Use mpz_set_intmax. * src/lisp.h (mpz_set_intmax, mpz_set_uintmax): New inline functions. (mpz_set_uintmax_slow, mpz_set_intmax_slow): Declare.