1. 08 Aug, 2018 1 commit
    • Tom Tromey's avatar
      More macro renamings for bignum · d1ec3a0a
      Tom Tromey authored
      * 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.
      d1ec3a0a
  2. 05 Aug, 2018 1 commit
    • Andy Moreton's avatar
      Fix test and comment in CCL change · 68ebff23
      Andy Moreton authored
      * lisp/international/ccl.el (ccl-fixnum): Update comment.
      * test/lisp/international/ccl-tests.el (prog-midi-dump): Add
      trailing space to expected result.
      68ebff23
  3. 04 Aug, 2018 3 commits
    • Tom Tromey's avatar
      Fix hash functions for bignums · 1303f8a4
      Tom Tromey authored
      * 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.
      1303f8a4
    • Tom Tromey's avatar
      Fix bignum comparisons with NaN · 91d505d8
      Tom Tromey authored
      * 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.
      91d505d8
    • Andy Moreton's avatar
      Make bignums work better when EMACS_INT is larger than long · bc8ff54e
      Andy Moreton authored
      * 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.
      bc8ff54e
  4. 19 Jul, 2018 2 commits
    • Tom Tromey's avatar
      Fix bignum creation when EMACS_INT is wider than long · 76715f89
      Tom Tromey authored
      * 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.
      76715f89
    • Tom Tromey's avatar
      Add missing @end defun · 678881e4
      Tom Tromey authored
      * doc/lispref/numbers.texi (Bitwise Operations): Add missing @end defun.
      678881e4
  5. 13 Jul, 2018 27 commits
    • Robert Pluim's avatar
      Add GMP to emacs_config_features · 155ec509
      Robert Pluim authored
      * configure.ac : Add GMP to emacs_config_features.  This allows us
      to determine whether the built-in gmp-mini is being used or not.
      155ec509
    • Tom Tromey's avatar
      Document bignums · cc3d7580
      Tom Tromey authored
      * doc/lispref/numbers.texi (Numbers, Integer Basics)
      (Predicates on Numbers, Comparison of Numbers)
      (Arithmetic Operations, Bitwise Operations): Update for bignums.
      * doc/lispref/objects.texi (Integer Type, Type Predicates):
      Update for bignums.
      * etc/NEWS: Update for bigums.
      cc3d7580
    • Tom Tromey's avatar
      Bignum fixes for byte-compiler and bytecode interpreter · e2a78b0d
      Tom Tromey authored
      * lisp/emacs-lisp/byte-opt.el: Mark bignump and fixnump as
      side-effect-and-error-free-fns.
      * src/bytecode.c (exec_byte_code): Handle bignums.
      e2a78b0d
    • Tom Tromey's avatar
      Use fixnump rather than integerp in some spots · 45eb3b35
      Tom Tromey authored
      * src/buffer.c (syms_of_buffer): Use Qfixnump, not Qintegerp.
      * src/data.c (syms_of_data): Define fixnump symbol.
      * src/lisp.h (lisp_h_CHECK_FIXNUM): Use Qfixnump.
      (struct Lisp_Buffer_Objfwd): Update comment.
      45eb3b35
    • Tom Tromey's avatar
      Make ash and lsh handle bignums · 27980e36
      Tom Tromey authored
      * src/data.c (ash_lsh_impl): Handle bignums.
      * test/src/data-tests.el (data-tests-ash-lsh): New test.
      27980e36
    • Tom Tromey's avatar
      Make logb handle bignums · cca0e79e
      Tom Tromey authored
      * src/floatfns.c (Flogb): Handle bignums.
      * test/src/floatfns-tests.el (bignum-logb): New test.
      cca0e79e
    • Tom Tromey's avatar
      Make % and mod handle bignums · 3dea8f8f
      Tom Tromey authored
      * src/data.c (Frem, Fmod): Handle bignums.
      * src/lisp.h (CHECK_INTEGER_COERCE_MARKER): New macro.
      * test/src/data-tests.el (data-tests-check-sign)
      (data-tests-%-mod): New tests.
      3dea8f8f
    • Tom Tromey's avatar
      Let C modules access bignum values · d0fac17a
      Tom Tromey authored
      * src/emacs-module.c (module_extract_integer, module_make_integer):
      Handle bignums.
      d0fac17a
    • Tom Tromey's avatar
      Make min and max handle bignums · 8fb995b9
      Tom Tromey authored
      * src/data.c (minmax_driver): Handle bignums.
      * test/src/data-tests.el (data-tests-minmax): New test.
      8fb995b9
    • Tom Tromey's avatar
      Make logcount handle bignums · a770fb44
      Tom Tromey authored
      * src/data.c (Flogcount): Handle bignums.
      * test/src/data-tests.el (data-tests-logcount): New test.
      a770fb44
    • Tom Tromey's avatar
      Make lognot handle bignums · c7e393bc
      Tom Tromey authored
      * src/data.c (Flognot): Handle bignums.
      c7e393bc
    • Tom Tromey's avatar
      Make 1+ and 1- handle bignums · 0d868917
      Tom Tromey authored
      * src/data.c (Fadd1, Fsub1): Handle bignums.
      * test/src/data-tests.el (data-tests-1+, data-tests-1-): New tests.
      0d868917
    • Tom Tromey's avatar
      Make abs handle bignums · 025adce2
      Tom Tromey authored
      * src/floatfns.c (Fabs): Handle bignums.
      * test/src/floatfns-tests.el (bignum-abs): New test.
      025adce2
    • Tom Tromey's avatar
      Allow conversion of bignums to floats · 872faabb
      Tom Tromey authored
      * src/floatfns.c (extract_float, Ffloat): Handle bignums.
      * src/lisp.h (XFLOATINT): Handle bignums.
      * test/src/floatfns-tests.el (bignum-to-float): New test.
      872faabb
    • Tom Tromey's avatar
      Make format handle bignums · d14808cd
      Tom Tromey authored
      * src/editfns.c (styled_format): Handle bignums.
      * test/src/editfns-tests.el (read-large-integer): Update.
      (format-bignum): New test.
      d14808cd
    • Tom Tromey's avatar
      Make number-to-string work for bignums · 23eab9a6
      Tom Tromey authored
      * src/data.c (Fnumber_to_string): Handle bignum.
      * test/src/data-tests.el (data-tests-number-to-string): New test.
      23eab9a6
    • Tom Tromey's avatar
      Add some bignum tests · 6d4bf2ce
      Tom Tromey authored
      * test/src/data-tests.el (data-tests-bignum, data-tests-+)
      (data-tests-/, data-tests-number-predicates): New tests.
      * test/src/fns-tests (test-bignum-eql): New test.
      * test/src/lread-tests (lread-long-hex-integer): Expect bignum.
      * test/src/print-tests (print-bignum): New test.
      6d4bf2ce
    • Tom Tromey's avatar
      Make arithmetic work with bignums · 5875fbaa
      Tom Tromey authored
      * src/data.c (free_mpz_value): New function.
      (arith_driver): Rewrite.
      (float_arith_driver): Handle bignums.
      5875fbaa
    • Tom Tromey's avatar
      Make comparison operators handle bignums · eefa65e9
      Tom Tromey authored
      * sc/data.c (bignumcompare): New function.
      (arithcompare): Handle bignums.
      eefa65e9
    • Tom Tromey's avatar
      Make the reader accept bignums · 1e8ae6ca
      Tom Tromey authored
      * src/data.c (Fstring_to_number): Update.
      * src/lisp.h (S2N_OVERFLOW_TO_FLOAT): Remove.
      * src/lread.c (free_contents): New function.
      (read_integer): Handle bignums.
      (read1): Update.
      (string_to_number): Handle bignums.
      (syms_of_lread): Remove read-integer-overflow-as-float.
      * src/process.c (Fsignal_process): Update.
      1e8ae6ca
    • Tom Tromey's avatar
      Make eql work for bignums · 580d173b
      Tom Tromey authored
      * src/fns.c (Feql, internal_equal): Handle bignums.
      580d173b
    • Tom Tromey's avatar
      Provide new functions to create bignums · b2f3f4ee
      Tom Tromey authored
      * src/alloc.c (make_bignum_str, make_number): New functions.
      * src/lisp.h (make_bignum_str, make_number): Declare.
      b2f3f4ee
    • Tom Tromey's avatar
      Introduce the bignum type · a0f2adbf
      Tom Tromey authored
      * src/alloc.c (mark_object): Handle Lisp_Misc_Bignum.
      (sweep_misc): Call mpz_clear for Lisp_Misc_Bignum.
      * src/data.c (Ftype_of): Handle Lisp_Misc_Bignum.
      (Fintegerp, Finteger_or_marker_p, Fnatnump, Fnumberp)
      (Fnumber_or_marker_p): Update for bignum.
      (Ffixnump, Fbignump): New defuns.
      (syms_of_data): Update.
      * src/emacs.c (xrealloc_for_gmp, xfree_for_gmp): New functions.
      (main): Call mp_set_memory_functions.
      * src/lisp.h (enum Lisp_Misc_Type) <Lisp_Misc_Bignum>: New constant.
      (struct Lisp_Bignum): New.
      (union Lisp_Misc): Add u_bignum.
      (BIGNUMP, XBIGNUM, INTEGERP, NATNUMP, NUMBERP, CHECK_NUMBER)
      (CHECK_INTEGER, CHECK_NUMBER_COERCE_MARKER): New functions.
      * src/print.c (print_object): Handle Lisp_Misc_Bignum.
      a0f2adbf
    • Tom Tromey's avatar
      Add configury for GMP library · 7cb45cd2
      Tom Tromey authored
      * configure.ac (GMP_LIB, GMP_OBJ): New substs.
      * src/Makefile.in (GMP_OBJ, GMP_OBJ): New variables.
      (base_obj): Add GMP_OBJ.
      (LIBES): Add GMP_LIB.
      * src/mini-gmp.h: New file.
      * src/mini-gmp.c: New file.
      7cb45cd2
    • Tom Tromey's avatar
      Rename integerp->fixnum, etc, in preparation for bignums · 42fe787b
      Tom Tromey authored
      * src/json.c, src/keyboard.c, src/keyboard.h, 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/sysdep.c, src/term.c, src/terminal.c,
      src/textprop.c, src/undo.c, src/w16select.c, src/w32.c,
      src/w32console.c, src/w32cygwinx.c, src/w32fns.c, src/w32font.c,
      src/w32inevt.c, src/w32proc.c, src/w32select.c, src/w32term.c,
      src/w32uniscribe.c, src/widget.c, src/window.c, src/xdisp.c,
      src/xfaces.c, src/xfns.c, src/xfont.c, src/xftfont.c, src/xmenu.c,
      src/xrdb.c, src/xselect.c, src/xterm.c, src/xwidget.c: Rename
      INTEGERP->FIXNUM, make_number->make_fixnum, CHECK_NUMBER->CHECK_FIXNUM,
      make_natnum->make_fixed_natum, NUMBERP->FIXED_OR_FLOATP,
      NATNUMP->FIXNATP, CHECK_NATNUM->CHECK_FIXNAT.
      42fe787b
    • Noam Postavsky's avatar
      Speed up smerge-refine-regions by avoiding fsync · 01dbf2a3
      Noam Postavsky authored
      * lisp/vc/smerge-mode.el (smerge-refine-regions): Bind
      write-region-inhibit-fsync to t.  This was reported in
      https://github.com/magit/magit/pull/2834 to give a noticable speedup.
      01dbf2a3
    • Noam Postavsky's avatar
      Don't skip epg-tests even with gpg 2.0 (Bug#23561) · 1222ff52
      Noam Postavsky authored
      * test/lisp/epg-tests.el (epg-tests--config-program-alist): New
      constant, which allows gpg2 version 2.0+.
      (epg-tests-find-usable-gpg-configuration): Pass it to
      epg-find-configuration.
      1222ff52
  6. 12 Jul, 2018 1 commit
  7. 11 Jul, 2018 5 commits