1. 22 Jul, 2012 4 commits
  2. 21 Jul, 2012 7 commits
  3. 20 Jul, 2012 5 commits
    • Dmitry Antipov's avatar
      Add indirection counting to speed up Fkill_buffer. · 9928463d
      Dmitry Antipov authored
      * buffer.h (struct buffer): New member.
      * buffer.c (Fget_buffer_create): Set indirection counter to 0.
      (Fmake_indirect_buffer): Set indirection counter to -1, increment
      base buffer indirection counter.
      (compact_buffer): If ENABLE_CHECKING, verify indirection counters.
      (Fkill_buffer): Adjust indirection counters as needed, don't walk
      through buffer list if indirection counter is 0.
    • Dmitry Antipov's avatar
      Extend the value returned by Fgarbage_collect with heap statistics. · f8643a6b
      Dmitry Antipov authored
      * alloc.c (Qheap): New symbol.
      (syms_of_alloc): DEFSYM it.
      (Fgarbage_collect): If DOUG_LEA_MALLOC, add mallinfo data.
      (Fmemory_free): Remove.
      (syms_of_alloc): Don't defsubr it.
      * buffer.c (Fcompact_buffer): Remove.
      (syms_of_buffer): Don't defsubr it.
    • Dmitry Antipov's avatar
      Make maybe_gc inline. · dac616ff
      Dmitry Antipov authored
      Verify that inlining is always possible (GCC 4.7.1, -O3 -Winline).
      * lisp.h (consing_since_gc, gc_relative_threshold)
      (memory_full_cons_threshold): Revert declaration.
      (maybe_gc): Remove prototype, define as inline.
      * alloc.c: Remove old commented-out code.
      (consing_since_gc, gc_relative_threshold)
      (memory_full_cons_threshold): Revert to global.
      (maybe_gc): Remove.
    • Dmitry Antipov's avatar
      Simple wrapper for make_unibyte_string, adjust font_open_by_name. · d7ea76b4
      Dmitry Antipov authored
      * src/lisp.h (build_unibyte_string): New function.
      * src/dosfns.c, src/fileio.c, src/fns.c, src/ftfont.c, src/process.c:
      * src/sysdep.c, src/w32fns.c, src/xfns.c: Use it.
      * src/font.c (font_open_by_name): Change 2nd and 3rd args to the only arg
      of type Lisp_Object to avoid redundant calls to make_unibyte_string.
      Adjust users accordingly.
      * src/font.h (font_open_by_name): Adjust prototype.
      * admin/coccinelle/unibyte_string.cocci: Semantic patch to convert from
      make_unibyte_string to build_unibyte_string where appropriate.
    • Dmitry Antipov's avatar
      Cleanup calls to Fgarbage_collect. · 765e61e3
      Dmitry Antipov authored
      * lisp.h (maybe_gc): New prototype.
      (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
      Remove declarations.
      * alloc.c (maybe_gc): New function.
      (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
      Make them static.
      * bytecode.c (MAYBE_GC): Use maybe_gc.
      * eval.c (eval_sub, Ffuncall): Likewise.
      * keyboard.c (read_char): Likewise.  Adjust call to maybe_gc
      to avoid dependency from auto-save feature.
  4. 19 Jul, 2012 6 commits
    • Paul Eggert's avatar
      * buffer.h (FOR_EACH_BUFFER): Rename from 'for_each_buffer'. · 52b852c7
      Paul Eggert authored
      (FOR_EACH_PER_BUFFER_OBJECT_AT): Rename from
      All uses changed.  It's better to use upper-case for macros that
      cannot be implemented as functions, to give the reader a clue
      that they're special.
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/chart.el: Use lexical-binding. · 5db81e33
      Stefan Monnier authored
      (chart-emacs-storage): Don't hardcode the list of entries.
      * src/alloc.c (Fgarbage_collect): Tweak docstring.
    • Dmitry Antipov's avatar
      Tweak the value returned from Fgarbage_collect again. · 5b835e1d
      Dmitry Antipov authored
      * src/alloc.c (Fgarbage_collect): New return value, as confirmed in
      Adjust documentation.
      (total_vector_bytes): Rename to total_vector_slots, adjust
      (total_free_vector_bytes): Rename to total_free_vector_slots,
      adjust accounting.
      (Qstring_bytes, Qvector_slots): New symbols.
      (syms_of_alloc): DEFSYM them.
      * lisp/emacs-lisp/chart.el (chart-emacs-storage): Adjust again.
    • Dmitry Antipov's avatar
      Compact buffers when idle. · 9cd47b72
      Dmitry Antipov authored
      * lisp/compact.el: New file.
      * src/buffer.c (compact_buffer, Fcompact_buffer): New function.
      (syms_of_buffer): Register Fcompact_buffer.
      * src/alloc.c (Fgarbage_collect): Use compact_buffer.
      * src/buffer.h (compact_buffer): New prototype.
      (struct buffer_text): New member.
    • Dmitry Antipov's avatar
      New macro to iterate over all buffers, miscellaneous cleanups. · d17337e5
      Dmitry Antipov authored
      * lisp.h (all_buffers): Remove declaration.
      * buffer.h (all_buffers): Add declaration, with comment.
      (for_each_buffer): New macro.
      * alloc.c (Fgarbage_collect, mark_object): Use it.
      * buffer.c (Fkill_buffer, Fbuffer_swap_text, Fset_buffer_multibyte)
      (init_buffer): Likewise.
      * data.c (Fset_default): Likewise.
      * coding.c (code_conversion_restore): Remove redundant check
      for dead buffer.
      * buffer.c (Fkill_buffer): Likewise.  Remove obsolete comment.
    • Chong Yidong's avatar
      Avoid two crashes involving windows on dead frames. · 23dc7744
      Chong Yidong authored
      * window.c (Fwindow_absolute_pixel_edges)
      (Fdelete_other_windows_internal): Signal an error if the window is
      on a dead frame.
      Fixes: debbugs:11984
  5. 18 Jul, 2012 9 commits
  6. 17 Jul, 2012 9 commits