1. 22 Jun, 2017 14 commits
    • Paul Eggert's avatar
      Use unlocked stdio more systematically · f6ef15cf
      Paul Eggert authored
      This can improve performance significantly on stdio-bottlenecked code.
      E.g., make-docfile is 3x faster on my Fedora 25 x86-64 desktop.
      * admin/merge-gnulib (GNULIB_MODULES): Add unlocked-io.
      * lib-src/ebrowse.c, lib-src/emacsclient.c, lib-src/etags.c:
      * lib-src/hexl.c, lib-src/make-docfile.c, lib-src/movemail.c:
      * lib-src/profile.c, lib-src/update-game-score.c:
      Include unlocked-io.h instead of stdio.h, since these programs are
      single-threaded.
      * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
      * lib/unlocked-io.h, m4/unlocked-io.m4: New files, copied from Gnulib.
      * src/charset.c, src/cm.c, src/emacs.c, src/image.c, src/keyboard.c:
      * src/lread.c, src/term.c:
      Include sysstdio.h, possibly instead of stdio.h, to define
      the unlocked functions if the system does not provide them.
      * src/charset.c, src/lread.c (getc_unlocked):
      Remove, since sysstdio.h now defines it if needed.
      * src/cm.c (cmputc, cmcheckmagic):
      * src/dispnew.c (update_frame, update_frame_with_menu)
      (update_frame_1, Fsend_string_to_terminal, Fding, bitch_at_user):
      * src/emacs.c (main, Fdump_emacs):
      * src/fileio.c (Fdo_auto_save, Fset_binary_mode):
      * src/image.c (slurp_file, png_read_from_file, png_load_body)
      (our_stdio_fill_input_buffer):
      * src/keyboard.c (record_char, kbd_buffer_get_event, handle_interrupt):
      * src/lread.c (readbyte_from_file):
      * src/minibuf.c (read_minibuf_noninteractive):
      * src/print.c (printchar_to_stream, strout)
      (Fredirect_debugging_output):
      * src/sysdep.c (reset_sys_modes, procfs_ttyname)
      (procfs_get_total_memory):
      * src/term.c (tty_ring_bell, tty_send_additional_strings)
      (tty_set_terminal_modes, tty_reset_terminal_modes)
      (tty_update_end, tty_clear_end_of_line, tty_write_glyphs)
      (tty_write_glyphs_with_face, tty_insert_glyphs)
      (tty_menu_activate):
      * src/xfaces.c (Fx_load_color_file):
      Use unlocked stdio when it should be safe.
      * src/sysstdio.h (clearerr_unlocked, feof_unlocked, ferror_unlocked)
      (fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked)
      (fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked)
      (putc_unlocked, putchar_unloced): Provide substitutes if not declared.
      f6ef15cf
    • Glenn Morris's avatar
    • Michal Nazarewicz's avatar
      unidata: don’t check special casing in unidata-check (bug#26656) · 21132e26
      Michal Nazarewicz authored
      * admin/unidata/unidata-gen.el (unidata-check): Do not test special
      casing mapping of characters since that mapping is not constructed from
      the unidata.txt file.
      Also, check for integer decoder and cons char earlier so that less
      unnecessary processing is performed.
      21132e26
    • Stefan Monnier's avatar
      * lisp/descr-text.el (describe-char): Avoid string-*-multibyte · 0ee2e853
      Stefan Monnier authored
      Avoid string-to-multibyte and string-as-unibyte.
      Don't make *Help* unibyte just because the char was in a unibyte buffer.
      0ee2e853
    • Martin Rudalics's avatar
      Fix make_hash_table calls in lread.c · 386a3da9
      Martin Rudalics authored
      * src/lread.c (readevalloop, read_internal_start): Fix
      make_hash_table calls to make build succeed.
      386a3da9
    • Ken Raeburn's avatar
      Merge several Lisp reader speedups. · 85f6aa33
      Ken Raeburn authored
      85f6aa33
    • Ken Raeburn's avatar
      Create less garbage to collect while reading symbols. · 59f3c866
      Ken Raeburn authored
      * src/lread.c (read1): When interning a symbol, only create a new
      string object for the name if we're going to use it for a new symbol
      object.
      59f3c866
    • Ken Raeburn's avatar
      Replace read_objects assoc list with two hash tables. · b9145563
      Ken Raeburn authored
      For larger input files with lots of shared data structures, an
      association list is too slow.
      
      * src/lread.c (read_objects_map, read_objects_completed): New
      variables, replacing read_objects.
      (readevalloop): Initialize them with hash tables before starting a
      top-level read, if they're not already empty hash tables, and reset
      them to Qnil afterwards if something was added to the hash tables.
      (read_internal_start): Likewise.
      (read1): Store first the placeholder and later the newly read object
      into read_objects_map under the specified object number.  If the new
      object can contain a reference to itself, store it in
      read_objects_completed.
      (substitute_objects_recurse): Check read_objects_completed instead of
      read_objects for the known possibly-recursive objects.
      (syms_of_lread): Update initializations.
      b9145563
    • Ken Raeburn's avatar
      Use getc_unlocked. · efe200c1
      Ken Raeburn authored
      * configure.ac: Check for getc_unlocked.
      * src/charset.c (read_hex, load_charset_map_from_file): Use
      getc_unlocked instead of getc.
      (getc_unlocked) [!HAVE_GETC_UNLOCKED]: Fall back to getc.
      * src/lread.c (readbyte_from_file, Fget_file_char, read1,
      getc_unlocked): Likewise.
      efe200c1
    • Stefan Monnier's avatar
      Reduce lread substitutions. · 6af67b4a
      Stefan Monnier authored
      * src/lread.c (read1): After reading an object using the "#n=" syntax,
      if the read object is a cons cell, instead of recursively substituting
      the placeholder with the new object, mutate the placeholder cons cell
      itself to have the correct car and cdr values.
      6af67b4a
    • Ken Raeburn's avatar
      Short-circuit substitutions for some simple types. · 0b3a0f30
      Ken Raeburn authored
      Values that don't contain other values cannot be circular, so checking
      for circular objects is a waste of cycles.
      
      * src/lread.c (substitute_object_recurse): If the subtree being
      examined is a symbol, number, or property-less string, just return
      it.
      0b3a0f30
    • Paul Eggert's avatar
      Limit style_format to MAX_ALLOCA · 87a44b93
      Paul Eggert authored
      * src/editfns.c (styled_format): Subtract initial buffer size
      from sa_avail, since it is nontrivial.
      87a44b93
    • Paul Eggert's avatar
      Limit bidi_find_bracket_pairs to MAX_ALLOCA · 35caaf71
      Paul Eggert authored
      * src/bidi.c (MAX_BPA_STACK): Now a constant, not a macro.
      Shrink it to allow for the two struct bidi_it objects in
      the same frame.
      (PUSH_BPA_STACK): Avoid integer overflow with enormous bidi cache.
      (bidi_find_bracket_pairs): Use compile-time check instead of runtime.
      35caaf71
    • Paul Eggert's avatar
      Limit insert-file-contents to MAX_ALLOCA · 07a3386f
      Paul Eggert authored
      * src/fileio.c (READ_BUF_SIZE): Don’t allocate more than
      MAX_ALLOCA bytes in a single stack array.
      07a3386f
  2. 21 Jun, 2017 6 commits
    • Paul Eggert's avatar
      Remove malloc_find_address relic · b7dfd39c
      Paul Eggert authored
      * src/gmalloc.c (register_heapinfo, _malloc_internal_nolock):
      Omit unnecessary initialization.
      b7dfd39c
    • Paul Eggert's avatar
      Fix temacs hybrid_malloc core dump · ac1ceadc
      Paul Eggert authored
      Without this patch, ./temacs would dump core sometimes on Fedora
      25 x86-64.  The problem was that the hybrid allocator assumed that
      all pointers into bss_sbrk_buffer are allocated via gmalloc.  This
      assumption is not true on Fedora, because the standard memory
      allocator calls gdefault_morecore, which means its blocks are
      interleaved with our blocks.  Usually the code happened to work,
      because our data structures agreed with the glibc data structures,
      but this was merely luck due to a shared pedigree, and as glibc
      mutates our luck has run out.
      * src/gmalloc.c (ALLOCATED_BEFORE_DUMPING) [HYBRID_MALLOC]:
      Remove; no longer needed.
      (BLOCK): Use unsigned division, as that does the right thing near zero.
      (register_heapinfo, __malloc_internal_nolock, __free_internal_nolock)
      (_realloc_internal_nolock):
      Big blocks now have type -1, not 0, as 0 now means the block is
      not ours.
      (morecore_nolock): Omit now-unnecessary casts to size_t.
      (allocated_via_gmalloc) [HYBRID_MALLOC]: New function.
      (hybrid_free, hybrid_realloc) [HYBRID_MALLOC]: Use it, to
      avoid calling the wrong free or realloc function in some cases.
      ac1ceadc
    • Katsumi Yamaoka's avatar
      Make gnus-article-date-user work · 1de9e298
      Katsumi Yamaoka authored
      * lisp/gnus/gnus-art.el (article-date-ut):
      Work for unfolded multi-line Date header.
      (article-transform-date):
      Refactor; add header name if it is missing in user-defined date line.
      (article-date-user): Fix name of date type.
      1de9e298
    • Noam Postavsky's avatar
      Keep order of completion candidates (Bug#25995, Bug#24676) · 1ed2086a
      Noam Postavsky authored
      * lisp/minibuffer.el (completion-pcm--filename-try-filter)
      (completion-pcm--all-completions): Use nreverse to undo the reversing
      caused by using push in the loop.
      1ed2086a
    • Glenn Morris's avatar
      d2ea4aee
    • Alex Gramiak's avatar
      Mark prolog indent variables as safe (bug#27369) · 67192113
      Alex Gramiak authored
      * lisp/progmodes/prolog.el (prolog-indent-width)
      (prolog-left-indent-regexp, prolog-paren-indent-p)
      (prolog-paren-indent): Add :safe property.
      67192113
  3. 20 Jun, 2017 10 commits
  4. 19 Jun, 2017 5 commits
  5. 18 Jun, 2017 2 commits
  6. 17 Jun, 2017 3 commits