1. 27 Jul, 2012 7 commits
    • Eli Zaretskii's avatar
      Fix listn introduced in 2012-07-27T06:04:35Z!dmantipov@yandex.ru. · bcfbc9de
      Eli Zaretskii authored
       src/alloc.c (listn): Fix the order the arguments are consed onto the list.
      bcfbc9de
    • Eli Zaretskii's avatar
      Fix failure to compile on Windows due to 2012-07-27T06:04:35Z!dmantipov@yandex.ru. · 3438fe21
      Eli Zaretskii authored
       src/lisp.h (enum constype): Use CONSTYPE_HEAP and CONSTYPE_PURE for
       enumeration constants, as PURE and HEAP are too general, and clash
       with other headers and sources, such as gmalloc.c and the
       MS-Windows system headers.  All users changed.
      3438fe21
    • Dmitry Antipov's avatar
      Revert last save_excursion_save and save_excursion_restore changes. · eeaea515
      Dmitry Antipov authored
      * alloc.c, editfns.c, marker.c, lisp.h: Revert.
      Lots of crashes reported by Chong Yidong <cyd@gnu.org>.
      eeaea515
    • Dmitry Antipov's avatar
      Fix recently-introduced typos in Windows port. · 073c88c2
      Dmitry Antipov authored
      Reported by Martin Rudalics <rudalics@gmx.at>.
      * w32.c (init_environment): Replace comma with semicolon.
      * w32fns.c (syms_of_w32fns): Likewise.
      073c88c2
    • Paul Eggert's avatar
      Improve GDB symbol export. · 4706125e
      Paul Eggert authored
      * .gdbinit (xgetptr, xgetint, xgettype): Set $bugfix in different
      arms of an 'if', not using conditional expressions; otherwise GDB
      complains about the types in the unevaluated arm when the argument
      is an integer literal.
      (xgetint): Simplify expression.
      * alloc.c (gdb_make_enums_visible): New constant.  This ports to
      GCC 3.4.2 the export of symbols to GDB.  Problem reported by Eli
      Zaretskii in <http://bugs.gnu.org/1995-05-30T23:07:27Z!kwzh@gnu.org#13>.
      * lisp.h (PUBLISH_TO_GDB): Remove.  All uses removed.  No longer
      needed now that we have gdb_make_enums_visible.
      (enum CHECK_LISP_OBJECT_TYPE, enum Lisp_Bits, enum More_Lisp_Bits)
      (enum enum_USE_LSB_TAG):
      New enum types, packaging up enums that need to be exported to GDB.
      4706125e
    • Dmitry Antipov's avatar
      Utility function to make a list from specified amount of objects. · 694b6c97
      Dmitry Antipov authored
      * lisp.h (enum constype): New datatype.
      (listn): New prototype.
      * alloc.c (listn): New function.
      (Fmemory_use_count, syms_of_alloc): Use it.
      * buffer.c (syms_of_buffer): Likewise.
      * callint.c (syms_of_callint): Likewise.
      * charset.c (define_charset_internal): Likewise.
      * coding.c (syms_of_coding): Likewise.
      * keymap.c (syms_of_keymap): Likewise.
      * search.c (syms_of_search): Likewise.
      * syntax.c (syms_of_syntax): Likewise.
      * w32.c (init_environment): Likewise.
      * w32fns.c (Fw32_battery_status, syms_of_w32fns): Likewise.
      * xdisp.c (syms_of_xdisp): Likewise.
      * xfns.c (syms_of_xfns): Likewise.
      694b6c97
    • Dmitry Antipov's avatar
      Fast save_excursion_save and save_excursion_restore. · 6195f384
      Dmitry Antipov authored
      * lisp.h (struct Lisp_Excursion): New data type.
      (PVEC_EXCURSION): New pseudovector type.
      (XEXCURSION, XSETEXCURSION, EXCURSIONP): Convenient macros
      to deal with it.  Adjust comments.
      (init_marker, attach_marker): New prototype.
      (unchain_marker): Adjust prototype.
      * marker.c (attach_marker): Change to global.
      (init_marker): New function.
      * alloc.c (Fmake_marker, build_marker): Use it.
      (build_marker): More easserts.
      (mark_object): Handle struct Lisp_Excursion.
      * editfns.c (save_excursion_save, save_excursion_restore):
      Reimplement to use struct Lisp_Excursion.  Add comments.
      6195f384
  2. 26 Jul, 2012 7 commits
    • Paul Eggert's avatar
      * emacs.c: Do not include <verify.h>; no longer needed. · 562157c8
      Paul Eggert authored
      Fixes: debbugs:12036
      562157c8
    • Paul Eggert's avatar
      Fix export of symbols to GDB. · 5eceb8fb
      Paul Eggert authored
      * alloc.c (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL)
      (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Move these here from
      emacs.c, as this is a more-suitable home.  Had this been done earlier
      the fix for 1995-05-30T23:07:27Z!kwzh@gnu.org would have avoided some of the problems noted in
      <http://bugs.gnu.org/1995-05-30T23:07:27Z!kwzh@gnu.org#13> by Eli Zaretskii, as the scope problems
      would have been more obvious.
      * emacs.c (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS)
      (gdb_GCTYPEBITS, gdb_USE_LSB_TAG)
      (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
      Remove; now done in lisp.h.
      * lisp.h (PUBLISH_TO_GDB): New macro.
      (GCTYPEBITS, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE, enum pvec_type)
      (DATA_SEG_BITS): Use it.
      (GCTYPEBITS, USE_LSB_TAG): Now also an enum, for GDB.
      (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Now just an enum, for GDB.
      * mem-limits.h (EXCEEDS_LISP_PTR): Redo so that DATA_SEG_BITS need
      not be usable in #if.  This simplifies things.
      5eceb8fb
    • Juanma Barranquero's avatar
    • Paul Eggert's avatar
      Add Bug#1995-05-30T23:07:27Z!kwzh@gnu.org to latest ChangeLog entry. · d89518db
      Paul Eggert authored
      (I found this bug report after installing the change.)
      d89518db
    • Paul Eggert's avatar
      Simplify export of symbols to GDB; fix related .gdbinit bugs. · 1781b9e9
      Paul Eggert authored
      * etc/emacs-buffer.gdb ($tagmask, $valmask): Remove.
      (ygetptr): Adjust to recent changes in lisp.h and emacs.c,
      by using VALMASK instead of $valmask, CHECK_LISP_OBJECT_TYPE
      instead of gdb_use_union, and DATA_SEG_BITS instead of
      gdb_data_seg_bits.  Also, use $ptr.i rather than $ptr.u.val.
      * src/.gdbinit (xgetptr, xgetint, xgettype): Don't use "set $bugfix =
      $bugfix.i", as this doesn't work (with GDB 7.4.1, anyway).
      (xgetptr, xgetint, xgettype, xcoding, xcharset, xprintbytestr):
      Adjust to changes in lisp.h and emacs.c, by using
      CHECK_LISP_OBJECT_TYPE rather than gdb_use_struct, VALMASK instead
      of $valmask, DATA_SEG_BITS instead of gdb_data_seg_bits,
      INTTYPEBITS instead of gdb_gctypebits - 1, USE_LSB_TAG instead of
      gdb_use_lsb, (1 << GCTYPEBITS) - 1 instead of $tagmask, VALBITS
      instead of gdb_valbits.
      (xvectype, xvector, xpr, xprintstr, xbacktrace): Similarly, use
      PSEUDOVECTOR_FLAG instead of PVEC_FLAG, and ARRAY_MARK_FLAG
      instead of gdb_array_mark_flag.
      (xboolvector): Get size from $->size, not $->header.size.
      Use BOOL_VECTOR_BITS_PER_CHAR rather than mystery constants.
      (xreload, hook-run, hookpost-run): Remove.
      * src/emacs.c: Include <verify.h>.
      (gdb_use_lsb, gdb_use_struct, gdb_valbits, gdb_gctypebits)
      (gdb_data_seg_bits, PVEC_FLAG, gdb_array_mark_flag, gdb_pvec_type):
      Remove.
      (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS, gdb_GCTYPEBITS)
      (gdb_USE_LSB_TAG): New enum constants.
      (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
      Also define these as enum constants, so they're visible to GDB.
      (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): New macros.
      (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Also define these
      as constants, so they're visible to GDB.
      * src/lisp.h (VALBITS, INTTYPEBITS, FIXNUM_BITS, PSEUDOVECTOR_SIZE_BITS)
      (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK, BOOL_VECTOR_BITS_PER_CHAR):
      Now enum constants, not macros, so they're visible to GDB.
      (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Default to 0, as this is
      more convenient now.  All uses changed.
      (VALMASK) [USE_LSB_TAG]: Also define in this case.
      * src/mem-limits.h (EXCEEDS_LISP_PTR): Adjust to DATA_SEG_BITS change.
      1781b9e9
    • Dmitry Antipov's avatar
      Explicitly free restriction data that are not needed anymore. · 3628596a
      Dmitry Antipov authored
      * editfns.c (save_restriction_restore): Free restriction data.
      3628596a
    • Stefan Monnier's avatar
      Autoload more carefully from Lisp. Follow aliases for function properties. · 7abaf5cc
      Stefan Monnier authored
      * lisp/subr.el (autoloadp): New function.
      (symbol-file): Use it.
      (function-get): New function.
      * lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Use function-get and
      autoload-do-load.
      * lisp/emacs-lisp/lisp-mode.el (lisp-font-lock-syntactic-face-function)
      (lisp-indent-function):
      * lisp/emacs-lisp/gv.el (gv-get):
      * lisp/emacs-lisp/edebug.el (get-edebug-spec, edebug-basic-spec):
      * lisp/emacs-lisp/byte-opt.el (byte-optimize-form):
      * lisp/emacs-lisp/bytecomp.el (byte-compile-arglist-warn):
      * lisp/emacs-lisp/autoload.el (make-autoload, autoload-print-form):
      Use function-get.
      * lisp/emacs-lisp/cl.el: Don't propagate function properties any more.
      
      * src/eval.c (Fautoload_do_load): Rename from do_autoload, export to Lisp,
      add argument, tune behavior, and adjust all callers.
      
      * lisp/speedbar.el (speedbar-add-localized-speedbar-support):
      * lisp/emacs-lisp/disass.el (disassemble-internal):
      * lisp/desktop.el (desktop-load-file):
      * lisp/help-fns.el (help-function-arglist, find-lisp-object-file-name)
      (describe-function-1):
      * lisp/emacs-lisp/find-func.el (find-function-noselect):
      * lisp/emacs-lisp/elp.el (elp-instrument-function):
      * lisp/emacs-lisp/advice.el (ad-has-proper-definition):
      * lisp/apropos.el (apropos-safe-documentation, apropos-macrop):
      * lisp/emacs-lisp/debug.el (debug-on-entry):
      * lisp/emacs-lisp/cl-macs.el (cl-compiler-macroexpand):
      * lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand):
      * lisp/calc/calc.el (name): Use autoloadp & autoload-do-load.
      7abaf5cc
  3. 25 Jul, 2012 4 commits
  4. 24 Jul, 2012 2 commits
  5. 23 Jul, 2012 3 commits
  6. 22 Jul, 2012 4 commits
  7. 21 Jul, 2012 7 commits
  8. 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.
      9928463d
    • 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.
      f8643a6b
    • 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.
      dac616ff
    • 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.
      d7ea76b4
    • 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.
      765e61e3
  9. 19 Jul, 2012 1 commit