BT Templeton [Sat, 17 Aug 2013 02:33:44 +0000 (22:33 -0400)]
* admin/coccinelle/symbol_accessors.cocci: New file.
BT Templeton [Thu, 8 Aug 2013 04:26:57 +0000 (00:26 -0400)]
use guile obarrays
* src/alloc.c (initialize_symbol): New function, extracted from
`Fmake_symbol'.
(Fmake_symbol): Use `scm_make_symbol'.
* src/emacs.c (main2): Define a symbol module.
* src/lisp.h (SYMBOLP, XSYMBOL): Update.
(set_symbol_next): Remove. All callers changed.
* src/lread.c (obhash): New function.
(Fintern, Fintern_soft, Funintern, oblookup, map_obarray): Use Guile
obarrays.
(init_obarray): Initialize a hash table of obarrays.
* src/lread.c (Ffind_symbol): New function.
BT Templeton [Fri, 16 Aug 2013 01:43:51 +0000 (21:43 -0400)]
multiple values
* src/eval.c (values_to_list, Fmultiple_value_call, Fvalues)
(eval_sub_1, Ffuncall1): New functions.
(eval_sub, Ffuncall): Return only the first value.
BT Templeton [Thu, 15 Aug 2013 00:23:59 +0000 (20:23 -0400)]
Lisp completion functions
* src/minibuf.c (minibuf_conform_representation, Ftry_completion)
(Fall_completions, Ftest_completion, Finternal_complete_buffer):
Rewrite in Lisp and move...
* lisp/minibuffer.el (minibuf-conform-representation, try-completion)
(all-completions, test-completion, internal-complete-buffer):
...here.
Robin Templeton [Sat, 18 Apr 2015 22:49:58 +0000 (18:49 -0400)]
[TMP] enable load_prefer_newer
BT Templeton [Tue, 13 Aug 2013 01:46:27 +0000 (21:46 -0400)]
use scm_boot_guile
* src/emacs.c (main2): Renamed from `main'.
(main): Use `scm_boot_guile'.
BT Templeton [Fri, 2 Aug 2013 00:02:48 +0000 (20:02 -0400)]
fix lwlib makefile
* lwlib/Makefile.in: Update for Guile.
Patch provided by Mark H. Weaver <mhw@netris.org>.
BT Templeton [Sat, 20 Jul 2013 21:35:16 +0000 (17:35 -0400)]
eval-scheme command
* src/fns.c (Feval_scheme): New function.
Robin Templeton [Wed, 2 Apr 2014 08:14:49 +0000 (04:14 -0400)]
handle guile exceptions
* src/keyboard.c (command_loop_2_body, command_loop_2_handler)
(command_loop_2_inner): New functions.
(top_level_2): Rename to 'top_level_2_body'.
(command_loop_2, top_level_2): Use the above functions to catch
Guile exceptions during initialization and in the command loop.
BT Templeton [Sat, 20 Jul 2013 21:34:40 +0000 (17:34 -0400)]
printing support for Guile objects
* src/print.c (print_object): Use `scm_display' to print Scheme
objects.
BT Templeton [Sat, 20 Jul 2013 21:34:02 +0000 (17:34 -0400)]
add Lisp_Other type
* src/lisp.h (Lisp_Other): New `Lisp_Type'.
(XTYPE): Return `Lisp_Other' for objects of an unknown type.
BT Templeton [Fri, 19 Jul 2013 20:57:48 +0000 (16:57 -0400)]
use libguile dynamic wind + c pseudo-closures
* src/eval.c (specpdl_arg): Remove.
(set_catchlist, set_handlerlist, restore_catchtag): New functions.
(internal_catch, internal_lisp_condition_case)
(internal_condition_case, internal_condition_case_1)
(internal_condition_case_2, internal_condition_case_n): Use
`call_with_prompt'.
(unwind_to_catch): Use `abort_to_prompt'.
(set_lisp_eval_depth): New function.
(record_in_backtrace): Set an unwind handler to remove the backtrace
entry.
(eval_sub, Ffuncall, specbind, record_unwind_protect_ptr_1): Use
Guile unwind handlers.
(call_void): New function.
(record_unwind_protect_1, record_unwind_protect_int_1)
(record_unwind_protect_void_1): Use `record_unwind_protect_ptr_1'.
(unbind_once): Now static. Remove support for `SPECPDL_UNWIND',
`SPECPDL_UNWIND_PTR', `SPECPDL_UNWIND_INT' and `SPECPDL_UNWIND_VOID'
specpdl entries.
(dynwind_begin): Use `scm_dynwind_begin'.
(dynwind_end): Use `scm_dynwind_end'.
(unbind_to_1, unbind_to): Remove.
(backtrace_eval_unrewind): Remove support for `SPECPDL_UNWIND',
`SPECPDL_UNWIND_PTR', `SPECPDL_UNWIND_INT' and `SPECPDL_UNWIND_VOID'
specpdl entries.
(abort_to_prompt, call_with_prompt, make_prompt_tag): New functions.
(struct handler, struct catchtag): Moved from "lisp.h".
src/keyboard.c (save_getcjmp, restore_getcjmp): Remove.
(read_event_from_main_queue, read_decoded_event_from_main_queue)
(read_char, read_char_1, quit_throw_to_read_char): Use delimited
continuations instead of `setjmp' and `longjmp'.
* src/lisp.h (SPECPDL_FRAME, SPECPDL_UNWIND, SPECPDL_UNWIND_PTR)
(SPECPDL_UNWIND_INT, SPECPDL_UNWIND_VOID): Remove. All references
changed.
(struct handler, struct catchtag): Move to "eval.c".
--------------------------------------------------
* src/emacs.c (main2): Call `init_guile'.
* src/eval.c (icc_thunk, icc_handler, icc_handler_n)
(icc_lisp_handler): New functions.
(internal_catch, internal_lisp_condition_case)
(internal_condition_case, internal_condition_case_1)
(internal_condition_case_2, internal_condition_case_n): Use
`make_c_closure' and the above functions.
* src/guile.c: New file.
(make_c_closure, apply_c_closure, init_guile): New functions.
* src/keyboard.c (read_char_thunk, read_char_handle_quit): New
functions.
(read_char): Use `make_c_closure' and the above functions.
Robin Templeton [Wed, 9 Jul 2014 09:45:58 +0000 (05:45 -0400)]
rm specpdl check in bytecode interpreter
Robin Templeton [Wed, 9 Jul 2014 09:45:38 +0000 (05:45 -0400)]
dynwind fixes
Robin Templeton [Wed, 9 Jul 2014 09:43:12 +0000 (05:43 -0400)]
disable new catch/condition-case instructions
BT Templeton [Mon, 16 Sep 2013 21:02:53 +0000 (17:02 -0400)]
use dynwind_begin and dynwind_end
This patch was generated using Coccinelle.
BT Templeton [Sat, 20 Jul 2013 18:59:45 +0000 (14:59 -0400)]
coccinelle scripts for dynwind
* admin/coccinelle/double_unbind.cocci:
* admin/coccinelle/dynwind.cocci:
* admin/coccinelle/int_specpdl.cocci:
* admin/coccinelle/macros.h: New files.
BT Templeton [Thu, 18 Jul 2013 03:01:42 +0000 (23:01 -0400)]
coccinelle skip comments
* src/bytecode.c (exec_byte_code):
* src/keyboard.c (read_char, read_char_1):
* src/print.c (PRINTDECLARE, PRINTPREPARE, PRINTFINISH, PRINTCHAR):
Skip these functions and macros in Coccinelle.
BT Templeton [Sun, 21 Jul 2013 20:48:22 +0000 (16:48 -0400)]
use dynwind_begin and dynwind_end
This commit only changes uses of `SPECPDL_INDEX' and `unbind_to' that
could not be easily converted using Coccinelle.
BT Templeton [Tue, 16 Jul 2013 06:06:16 +0000 (02:06 -0400)]
simplify cpp usage in wait_reading_process_output
BT Templeton [Tue, 16 Jul 2013 02:36:42 +0000 (22:36 -0400)]
use ptrdiff_t for specpdl counts
* src/cygw32.c:
* src/w32fns.c: Use `ptrdiff_t' for storing specpdl indices.
BT Templeton [Wed, 10 Jul 2013 05:17:23 +0000 (01:17 -0400)]
remove redundant assignments
* src/dired.c:
* src/fns.c:
* src/keyboard.c:
* src/process.c:
* src/xdisp.c: Remove redundant assignments after `unbind_to'.
BT Templeton [Wed, 10 Jul 2013 04:38:40 +0000 (00:38 -0400)]
record_unwind_protect error handling
BT Templeton [Mon, 8 Jul 2013 02:40:31 +0000 (22:40 -0400)]
SPECPDL_FRAME
* src/eval.c (unbind_once): New function.
(unbind_to): Use unbind_once.
* src/lisp.h (SPECPDL_FRAME): New specbind_tag type.
(dynwind_begin, dynwind_end): Add prototypes.
BT Templeton [Sat, 6 Jul 2013 05:01:28 +0000 (01:01 -0400)]
SAFE_ALLOCA updated
* src/alloc.c (record_xmalloc): Remove. All uses changed.
* src/lisp.h (SAFE_ALLOCA, SAFE_NALLOCA, SAFE_ALLOCA_LISP): Use normal
allocation functions and don't explicitly free memory. Remove all
references to variables defined by these macros.
(USE_SAFE_ALLOCA, SAFE_FREE): Now no-ops.
BT Templeton [Fri, 5 Jul 2013 02:12:09 +0000 (22:12 -0400)]
restructure read_char quit handling
Move initialization and quit handling to a separate function to simplify
the conversion to Guile control flow facilities.
* src/keyboard.c (struct read_char_state): New data type.
(read_char): Move most of this function to `read_char_1'. Initialize a
state structure and a `longjmp' point for quits, then call
`read_char_1'.
(read_char_1): New function.
(save_getcjmp, restore_getcjmp): Take a pointer to a `jmp_buf' as an
argument. All callers changed.
BT Templeton [Fri, 12 Apr 2013 00:34:01 +0000 (20:34 -0400)]
use guile hash functions
* src/fns.c (hashfn_eq): Use `scm_ihashq'.
(hashfn_eql): Use `scm_ihashv'.
(hashfn_equal, sxhash): Use `scm_ihash'.
(SXHASH_MAX_DEPTH, SXHASH_MAX_LEN, sxhash_string, sxhash_float)
(sxhash_list, sxhash_vector, sxhash_bool_vector): Remove.
BT Templeton [Fri, 5 Apr 2013 01:11:45 +0000 (21:11 -0400)]
use type predicates in substitute_object_recurse
* src/lread.c (substitute_object_recurse): Use type predicates instead
of `XTYPE'.
BT Templeton [Fri, 5 Apr 2013 01:01:02 +0000 (21:01 -0400)]
* src/data.c (Ftype_of): Return `Qt' by default.
BT Templeton [Fri, 5 Apr 2013 00:52:25 +0000 (20:52 -0400)]
use an enum to select concat target type
* src/fns.c (concat): Use an enum to select the target type. All callers
changed.
BT Templeton [Fri, 5 Apr 2013 00:27:10 +0000 (20:27 -0400)]
use STRINGP, SYMBOLP in ns_lisp_to_cursor_type
* src/nsfns.m (ns_lisp_to_cursor_type): Use `STRINGP' and `SYMBOLP'
instead of `XTYPE'.
BT Templeton [Fri, 5 Apr 2013 00:25:30 +0000 (20:25 -0400)]
use Fequal for face attribute comparisons
* src/xfaces.c (face_attr_equal_p): Call `Fequal' directly instead of
optimizing comparison for certain types.
BT Templeton [Thu, 4 Apr 2013 23:41:47 +0000 (19:41 -0400)]
smob equality predicates
* emacs.c (main): Call `init_fns_once'.
* fns.c (internal_equal): Remove. All callers changed.
(compare_text_properties): New variable.
(misc_equal_p, vectorlike_equal_p, string_equal_p): New functions.
(init_fns_once): New function. Set smob equality predicates.
BT Templeton [Tue, 2 Apr 2013 00:30:28 +0000 (20:30 -0400)]
don't set current-load-list in loadup.el
Fixes <http://debbugs.gnu.org/14120>, reported by Taylan Ulrich Bayırlı.
* lisp/loadup.el: Don't set `current-load-list' to nil.
BT Templeton [Fri, 3 Aug 2012 06:12:23 +0000 (02:12 -0400)]
use guile-snarf for subr definition
* src/Makefile.in: Run guile-snarf on files that previously contained
`defsubr' calls.
* src/alloc.c (syms_of_alloc):
* src/buffer.c (syms_of_buffer):
* src/bytecode.c (syms_of_bytecode):
* src/callint.c (syms_of_callint):
* src/callproc.c (syms_of_callproc):
* src/casefiddle.c (syms_of_casefiddle):
* src/casetab.c (syms_of_casetab):
* src/category.c (syms_of_category):
* src/ccl.c (syms_of_ccl):
* src/character.c (syms_of_character):
* src/charset.c (syms_of_charset):
* src/chartab.c (syms_of_chartab):
* src/cmds.c (syms_of_cmds):
* src/coding.c (syms_of_coding):
* src/composite.c (syms_of_composite):
* src/data.c (syms_of_data):
* src/dbusbind.c (syms_of_dbusbind):
* src/dired.c (syms_of_dired):
* src/dispnew.c (syms_of_display):
* src/doc.c (syms_of_doc):
* src/dosfns.c (syms_of_dosfns):
* src/editfns.c (syms_of_editfns):
* src/emacs.c (syms_of_emacs):
* src/eval.c (syms_of_eval):
* src/fileio.c (syms_of_fileio):
* src/filelock.c (syms_of_filelock):
* src/floatfns.c (syms_of_floatfns):
* src/fns.c (syms_of_fns):
* src/font.c (syms_of_font):
* src/fontset.c (syms_of_fontset):
* src/frame.c (syms_of_frame):
* src/fringe.c (syms_of_fringe):
* src/gnutls.c (syms_of_gnutls):
* src/image.c (syms_of_image):
* src/indent.c (syms_of_indent):
* src/insdel.c (syms_of_insdel):
* src/keyboard.c (syms_of_keyboard):
* src/keymap.c (syms_of_keymap):
* src/lread.c (syms_of_lread):
* src/macros.c (syms_of_macros):
* src/marker.c (syms_of_marker):
* src/menu.c (syms_of_menu):
* src/minibuf.c (syms_of_minibuf):
* src/msdos.c (syms_of_msdos):
* src/nsfns.m (syms_of_nsfns):
* src/nsmenu.m (syms_of_nsmenu):
* src/nsselect.m (syms_of_nsselect):
* src/print.c (syms_of_print):
* src/process.c (syms_of_process):
* src/search.c (syms_of_search):
* src/sound.c (syms_of_sound):
* src/syntax.c (syms_of_syntax):
* src/term.c (syms_of_term):
* src/terminal.c (syms_of_terminal):
* src/textprop.c (syms_of_textprop):
* src/undo.c (syms_of_undo):
* src/w16select.c (syms_of_win16select):
* src/w32console.c (syms_of_ntterm):
* src/w32fns.c (syms_of_w32fns):
* src/w32font.c (syms_of_w32font):
* src/w32menu.c (syms_of_w32menu):
* src/w32proc.c (syms_of_ntproc):
* src/w32select.c (syms_of_w32select):
* src/window.c (syms_of_window):
* src/xdisp.c (syms_of_xdisp):
* src/xfaces.c (syms_of_xfaces):
* src/xfns.c (syms_of_xfns):
* src/xmenu.c (syms_of_xmenu):
* src/xml.c (syms_of_xml):
* src/xselect.c (syms_of_xselect):
* src/xsettings.c (syms_of_xsettings):
* src/xsmfns.c (syms_of_xsmfns): Include guile-snarf files for subr
definition.
BT Templeton [Fri, 3 Aug 2012 04:43:03 +0000 (00:43 -0400)]
defsubr snarfing
* src/lisp.h (DEFUN): Use `SCM_SNARF_INIT' to generate a defsubr call.
BT Templeton [Fri, 3 Aug 2012 04:41:43 +0000 (00:41 -0400)]
guile-snarf configuration
* configure.ac: Check for guile-snarf.
* src/Makefile.in: Add suffix rules for guile-snarf.
Robin Templeton [Wed, 18 Jun 2014 02:39:03 +0000 (22:39 -0400)]
remove snarf marker from lread.c
BT Templeton [Mon, 16 Jul 2012 20:23:10 +0000 (16:23 -0400)]
* src/fns.c (Feql): Use `scm_eqv_p'.
BT Templeton [Wed, 11 Jul 2012 22:38:35 +0000 (18:38 -0400)]
use guile conses
* src/alloc.c (Fcons): Use `scm_cons'.
* src/lisp.h (lisp_cons_tag, XCONS, XSETCONS, struct Lisp_Cons)
(XCAR_AS_LVALUE, XCDR_AS_LVALUE): Remove.
(XCAR): Use `scm_car'.
(XCDR): Use` scm_cdr'.
(XSETCAR): Use `scm_set_car_x'.
(XSETCDR): Use `scm_set_cdr_x'.
(CONSP): Use `scm_is_pair'.
* src/undo.c (truncate_undo_list): Use `sizeof (scm_t_cell)' as the size
of a cons cell for estimating memory usage.
BT Templeton [Wed, 11 Jul 2012 21:44:03 +0000 (17:44 -0400)]
remove unused variable in `read_vector'
* src/lread.c (read_vector): Remove unused variable.
BT Templeton [Wed, 11 Jul 2012 20:58:12 +0000 (16:58 -0400)]
use inexact real SCM numbers for lisp floats
* src/alloc.c (make_float): Use `scm_from_double'.n
* src/lisp.h (XFLOAT): Use `scm_to_double'.
(lisp_float_tag, XSETFLOAT, XFLOAT_INIT): Remove.
(FLOATP): Use `SCM_INEXACTP'.
BT Templeton [Wed, 11 Jul 2012 06:44:58 +0000 (02:44 -0400)]
store lisp structures in SCM objects
* src/alloc.c (allocate_string, make_float, Fcons, init_vectors)
(allocate_vectorlike, allocate_buffer, Fmake_symbol, allocate_misc):
Store a smob in the internal structure's self field. Adapted from
Ken Raeburn's Guile-Emacs branch.
(valid_lisp_object_p): Use `SCM_IMP' and `SCM2PTR'.
(init_alloc_once): Initialize smob types.
(lsb_bits): Remove.
* src/emacs.c (gdb_use_lsb, gdb_use_struct, gdb_gctypebits)
(gdb_data_seg_bits): Remove.
* src/font.h (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT):
* src/frame.h (XFRAME): Use `SCM_SMOB_DATA'.
* src/lisp.h (EMACS_INT, EMACS_UINT, EMACS_INT_MAX, FIXNUM_BITS)
(INTMASK, Lisp_Object, XHASH, XINT, XUINT, make_number, SXHASH)
(MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM, XTYPE, INTEGERP):
Redefine in terms of libguile's SCM type.
(XCONS, XVECTOR, XSTRING, XSYMBOL, XFLOAT, XMISC, XPROCESS, XWINDOW)
(XTERMINAL, XSUBR, XBUFFER, XCHAR_TABLE, XSUB_CHAR_TABLE)
(XBOOL_VECTOR, XSETPSEUDOVECTOR, XHASH_TABLE, TYPED_PSEUDOVECTORP):
Use `SCM_SMOB_DATA'.
(XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL, XSETFLOAT, XSETMISC):
Use the SCM object from the structure's `self' field.
(XSETSUBR): Use `SCM_NEWSMOB'.
(struct Lisp_Cons, struct Lisp_String, struct vectorlike_header)
(struct Lisp_Subr, struct Lisp_Symbol, struct Lisp_Misc_Any)
(struct Lisp_Marker, struct Lisp_Overlay, struct Lisp_Save_Value)
(struct Lisp_Float): Add a `self' field.
(DEFUN): Initialize the `self' field to `NULL'.
(SYMBOLP, MISCP, VECTORLIKEP, STRINGP, CONSP, FLOATP): Use
`SCM_SMOB_PREDICATE'.
(enum Lisp_Type): Simplify.
(Lisp_Int): New enum value.
(Lisp_Int0, Lisp_Int1): Remove.
(LISP_INT_TAG, case_Lisp_Int): Simplify.
(XTYPE): Use type predicates instead of returning the tag bits.
(pI): Redefine.
(lisp_symbol_tag, lisp_misc_tag, lisp_string_tag, lisp_vectorlike_tag)
(lisp_cons_tag, lisp_float_tag): New variables.
(VALBITS, VALMAX, USE_LSB_TAG, INTTYPEBITS, LISP_INT1_TAG)
(LISP_STRING_TAG, LISP_INT_TAG_P, XLI, XIL, TYPEMASK, XSET, XPNTR)
(XUNTAG, VALMASK): Remove.
* src/vm-limit.c (exceeds_lisp_ptr): Always return false.
* src/w32heap.c (allocate_heap, init_heap): Remove MSB tagging
support, leaving only code that would have been used with
(`USE_LSB_TAG' in effect.
BT Templeton [Wed, 7 Aug 2013 17:21:35 +0000 (13:21 -0400)]
disable inlining
BT Templeton [Wed, 11 Jul 2012 04:44:31 +0000 (00:44 -0400)]
remove pure-space-related Fautoload hack
* src/eval.c (Fautoload): Allow null docstrings to be passed to Ffset
regardless of the value of `Vpurify_flag'.
BT Templeton [Wed, 11 Jul 2012 00:53:23 +0000 (20:53 -0400)]
remove `chain' field from Lisp_Cons
* src/lisp.h (struct Lisp_Cons): Remove `u.chain' field. All uses
changed.
BT Templeton [Thu, 5 Jul 2012 00:53:46 +0000 (20:53 -0400)]
don't create a hash table for pure space
* lisp/loadup.el: Leave purify-flag as `t' instead of allocating a hash
table for hash-consing.
BT Templeton [Thu, 5 Jul 2012 00:38:52 +0000 (20:38 -0400)]
remove ARRAY_MARK_FLAG
* src/lisp.h (ARRAY_MARK_FLAG):
* src/emacs.c (gdb_array_mark_flag): Remove variables not used with the
new GC. All uses changed.
* src/.gdbinit: Update.
BT Templeton [Wed, 4 Jul 2012 08:51:40 +0000 (04:51 -0400)]
replace XTYPE calls in nextstep files
* src/nsfns.m (XParseGeometry):
* src/nsmenu.m (ns_popup_dialog, process_dialog): Use specific type
predicates instead of `XTYPE'.
BT Templeton [Tue, 3 Jul 2012 21:53:22 +0000 (17:53 -0400)]
initialize guile
* src/emacs.c (main): Call `scm_init_guile'.
BT Templeton [Mon, 2 Jul 2012 21:32:35 +0000 (17:32 -0400)]
remove stack_bottom
* src/emacs.c (stack_bottom): Remove. All uses changed.
BT Templeton [Mon, 2 Jul 2012 19:43:48 +0000 (15:43 -0400)]
libguile configuration
* configure.in (GUILE_CFLAGS, GUILE_LIBS): New variables.
(BDW_GC_CFLAGS, BDW_GC_LIBS): Remove.
* src/Makefile.in (ALL_CFLAGS): Replace BDW_GC_CFLAGS with GUILE_CFLAGS.
(LIBES): Replace BDW_GC_LIBS with GUILE_LIBS.
BT Templeton [Tue, 10 Jul 2012 23:06:33 +0000 (19:06 -0400)]
remove unused `defalias' function
* src/lread.c [NOTDEF] (defalias): Remove unused function.
Robin Templeton [Mon, 30 Jun 2014 08:29:47 +0000 (04:29 -0400)]
remove gcmarkbit fields
* src/lisp.h (struct Lisp_Symbol, struct Lisp_Misc_Any)
(struct Lisp_Marker, struct Lisp_Overlay, struct Lisp_Save_Value):
* src/intervals.h (struct interval): Remove `gcmarkbit' fields. All uses
changed.
Conflicts:
src/alloc.c
src/intervals.h
src/lisp.h
Robin Templeton [Mon, 30 Jun 2014 08:27:15 +0000 (04:27 -0400)]
remove Lisp_Free struct type
* src/lisp.h (struct Lisp_Free): Remove. All uses changed.
Conflicts:
src/lisp.h
Robin Templeton [Mon, 30 Jun 2014 08:26:49 +0000 (04:26 -0400)]
use xmalloc_atomic for many pointerless objects
* src/alloc.c (make_float, memory_full, refill_memory_reserve):
* src/buffer.c (alloc_buffer_text):
* src/ccl.c (Fccl_execute_on_string):
* src/charset.c (Fdefine_charset_internal):
* src/coding.c (encode_coding_object):
* src/composite.c (get_composition_id):
* src/dispnew.c (adjust_frame_message_buffer):
* src/doc.c (Fsubstitute_command_keys):
* src/doprnt.c (doprnt):
* src/editfns.c (Fmessage, Fformat):
* src/emacs.c (sort_args):
* src/filelock.c (current_lock_owner):
* src/fns.c (Fstring_as_unibyte, Fstring_to_unibyte):
* src/ftfont.c (ftfont_get_open_type_spec):
* src/gtkutil.c (get_utf8_string):
* src/image.c (x_create_bitmap_from_file, x_create_bitmap_from_file)
(x_create_x_image_and_pixmap, slurp_file, xbm_read_bitmap_data)
(xpm_load, colors_in_color_table, pbm_read_file, png_load, tiff_load):
* src/keyboard.c (parse_tool_bar_item):
* src/lread.c (read1, init_obarray):
* src/minibuf.c (read_minibuf_noninteractive):
* src/print.c (PRINTPREPARE):
* src/search.c (Freplace_match, syms_of_search):
* src/sysdep.c (system_process_attributes):
* src/term.c (init_tty):
* src/termcap.c (tgetst1, tgetent)
* src/tparam.c (tparam1):
* src/widget.c (set_frame_size):
* src/xdisp.c (init_xdisp):
* src/xfns.c (x_encode_text, xic_create_fontsetname, x_window)
(Fx_change_window_property):
* src/xrdb.c (x_get_customization_string, magic_file_p, gethomedir)
(get_user_db):
* src/xselect.c (x_get_window_property, receive_incremental_selection):
* src/xsmfns.c (smc_save_yourself_CB, x_session_initialize):
* src/xterm.c (xim_initialize, x_term_init): Use xmalloc_atomic and
related functions for allocating pointerless objects.
Conflicts:
src/alloc.c
src/editfns.c
src/fns.c
src/xterm.c
Robin Templeton [Mon, 30 Jun 2014 08:21:37 +0000 (04:21 -0400)]
atomic allocation functions
* src/alloc.c (xmalloc_atomic, xzalloc_atomic, xmalloc_atomic_unsafe)
(xnmalloc_atomic): New functions.
Conflicts:
src/alloc.c
src/lisp.h
BT Templeton [Fri, 29 Jun 2012 20:08:48 +0000 (16:08 -0400)]
remove chain field from Lisp_Float struct
* src/lisp.h (struct Lisp_Float): Remove `chain' field.
(XFLOAT_DATA, XFLOAT_INIT): Update.
BT Templeton [Fri, 29 Jun 2012 17:54:58 +0000 (13:54 -0400)]
duplicate current dir name in smc_save_yourself_CB
* src/xsmfns.c (smc_save_yourself_CB): Duplicate and free the string
returned by `get_current_dir_name'.
BT Templeton [Sat, 30 Jun 2012 00:46:45 +0000 (20:46 -0400)]
use g_strdup in update_frame_tool_bar
* src/gtkutil.c (update_frame_tool_bar): Use `g_strdup' and `g_free' for
widget data.
BT Templeton [Thu, 28 Jun 2012 03:24:19 +0000 (23:24 -0400)]
use xmalloc_uncollectable in make_cl_data
* src/gtkutil.c (make_cl_data): Allocate the callback data with
`xmalloc_uncollectable'.
BT Templeton [Thu, 28 Jun 2012 03:24:01 +0000 (23:24 -0400)]
new function xmalloc_uncollectable
* src/alloc.c (xmalloc_uncollectable): New function.
BT Templeton [Thu, 28 Jun 2012 03:22:07 +0000 (23:22 -0400)]
use xstrdup in xg_get_file_name_from_chooser
* src/gtkutil.c (xg_get_file_name_from_chooser): Return a copy of the
filename allocated with `xstrdup'.
BT Templeton [Thu, 28 Jun 2012 03:17:59 +0000 (23:17 -0400)]
use xmalloc in w32 opendir
* src/w32.c (opendir): Use `xmalloc'.
BT Templeton [Thu, 28 Jun 2012 03:17:47 +0000 (23:17 -0400)]
use xmalloc_unsafe in current_minor_maps
* src/keymap.c (current_minor_maps): Use `xmalloc_unsafe'.
BT Templeton [Thu, 28 Jun 2012 03:16:35 +0000 (23:16 -0400)]
use xfree in ftxfont_end_for_frame
* src/ftxfont.c (ftxfont_end_for_frame): Use `xfree'.
BT Templeton [Thu, 28 Jun 2012 03:15:40 +0000 (23:15 -0400)]
use xmalloc_unsafe in ftxfont_get_gcs
* src/ftxfont.c (ftxfont_get_gcs): Use `xmalloc_unsafe'.
BT Templeton [Thu, 28 Jun 2012 01:23:53 +0000 (21:23 -0400)]
use xmalloc_unsafe in ftfont_get_open_type_spec
* src/alloc.c (ftfont_get_open_type_spec): Use `xmalloc_unsafe'.
BT Templeton [Thu, 28 Jun 2012 01:23:22 +0000 (21:23 -0400)]
use xmalloc_unsafe in refill_memory_reserve
* src/alloc.c (refill_memory_reserve): Use `xmalloc_unsafe'.
BT Templeton [Thu, 28 Jun 2012 01:22:59 +0000 (21:22 -0400)]
use xmalloc_unsafe in memory_full
* src/alloc.c (memory_full): Use `xmalloc_unsafe'.
Robin Templeton [Mon, 30 Jun 2014 08:04:22 +0000 (04:04 -0400)]
new function `xmalloc_unsafe'
* src/alloc.c (xmalloc_unsafe): New function.
Conflicts:
src/alloc.c
src/lisp.h
BT Templeton [Tue, 26 Jun 2012 01:48:36 +0000 (21:48 -0400)]
make staticpro a no-op
* src/alloc.c (staticpro): Make this a no-op.
(NSTATICS, staticvec, staticidx): Remove.
Robin Templeton [Mon, 30 Jun 2014 08:00:02 +0000 (04:00 -0400)]
remove pure storage support
* src/alloc.c (pure, PUREBEG, purebeg, pure_size)
(pure_bytes_used_before_overflow, PURE_POINTER_P)
(pure_bytes_used_lisp, pure_bytes_used_non_lisp, ALIGN, pure_alloc)
(find_string_data_in_pure, make_pure_float, make_pure_vector): Remove.
All references changed.
(make_pure_string, make_pure_c_string, pure_cons, make_pure_float):
Call the corresponding normal allocation function.
(Fpurecopy): Return the argument.
(check_pure_size): Make this a no-op.
(make_empty_string): New function.
(init_strings): Use `make_empty_string'.
(valid_lisp_object_p): Simplify.
* src/data.c (pure_write_error): Remove.
* src/puresize.h (CHECK_IMPURE): Make this a no-op.
(PURE_P): Return false.
(SYSTEM_PURESIZE_EXTRA, SITELOAD_PURESIZE_EXTRA, BASE_PURESIZE)
(PURESIZE_RATIO, PURESIZE_CHECKING_RATIO, PURESIZE): Remove.
* configure.in (SYSTEM_PURESIZE_EXTRA): Remove.
Conflicts:
src/alloc.c
src/puresize.h
Robin Templeton [Mon, 30 Jun 2014 07:41:57 +0000 (03:41 -0400)]
remove suspicious object checking
Robin Templeton [Mon, 30 Jun 2014 07:25:39 +0000 (03:25 -0400)]
use BDW-GC
* alloc.c (xmalloc, xrealloc): Use BDW-GC allocation functions.
(memory_full, refill_memory_reserve): Likewise.
(xfree): Make this function a no-op.
(Fgarbage_collect): Use `GC_gcollect'. Return true.
(Fcons, Fmake_symbol, allocate_buffer, allocate_misc)
(allocate_pseudovector, allocate_string, allocate_string_data)
(allocate_vectorlike, make_float, make_interval): Simplify.
(which_symbols): Return nil. Comment out original implementation.
(ABLOCKS_BASE, ABLOCKS_BUSY, ABLOCKS_BYTES, ABLOCKS_SIZE)
(ABLOCK_ABASE, ADVANCE, BLOCK_ALIGN, BLOCK_BYTES, BLOCK_PADDING)
(COMMON_MULTIPLE, CONS_BLOCK, CONS_BLOCK_SIZE, CONS_INDEX, CONS_MARK)
(CONS_MARKED_P, CONS_UNMARK, DEADP, FLOAT_BLOCK, FLOAT_BLOCK_SIZE)
(FLOAT_INDEX, FLOAT_MARK, FLOAT_MARKED_P, FLOAT_UNMARK, Fgc_status)
(Fmemory_limit, Fmemory_use_counts, GC_POINTER_ALIGNMENT)
(GC_STRING_BYTES, GETMARKBIT, INTERVAL_BLOCK_SIZE, LARGE_STRING_BYTES)
(LAST_MARKED_SIZE, MARKER_BLOCK_SIZE, MARK_INTERVAL_TREE, MARK_STRING)
(MAX_SAVE_STACK, MAX_ZOMBIES, MEM_NIL, MEM_TYPE_BUFFER, MEM_TYPE_CONS)
(MEM_TYPE_FLOAT, MEM_TYPE_MISC, MEM_TYPE_NON_LISP, MEM_TYPE_STRING)
(MEM_TYPE_SYMBOL, MEM_TYPE_VECTORLIKE, MEM_TYPE_VECTOR_BLOCK)
(MMAP_MAX_AREAS, NEXT_FREE_LISP_STRING)
(POINTERS_MIGHT_HIDE_IN_OBJECTS, SBLOCK_SIZE, SDATA_DATA)
(SDATA_DATA_OFFSET, SDATA_NBYTES, SDATA_OF_STRING, SDATA_SELECTOR)
(SDATA_SIZE, SETJMP_WILL_LIKELY_WORK, SETJMP_WILL_NOT_WORK)
(SETMARKBIT, SETUP_ON_FREE_LIST, STRING_BLOCK_SIZE, STRING_BYTES_MAX)
(STRING_MARKED_P, SYMBOL_BLOCK_SIZE, UNMARK_BALANCE_INTERVALS)
(UNMARK_STRING, UNSETMARKBIT, USE_POSIX_MEMALIGN, VBLOCK_BYTES_MAX)
(VBLOCK_BYTES_MIN, VECTOR_BLOCK_BYTES, VECTOR_BLOCK_SIZE)
(VECTOR_FREE_LIST_FLAG, VECTOR_IN_BLOCK, VECTOR_MARK, VECTOR_MARKED_P)
(VECTOR_MAX_FREE_LIST_INDEX, VECTOR_SIZE, VECTOR_UNMARK, VINDEX)
(Vdead, abort_on_gc, allocate_vector_block)
(allocate_vector_from_block, allocated_mem_type, avg_live)
(avg_zombies, check_gcpros, compact_small_strings, cons_block)
(cons_block_index, cons_free_list, consing_since_gc, current_sblock)
(dump_zombies, enum mem_type, float_block, float_block_index)
(float_free_list, free_ablock, free_cons, free_large_strings)
(free_marker, free_misc, gc_in_progress, gc_relative_threshold)
(gc_sweep, ignore_warnings, inhibit_garbage_collection, init_cons)
(init_float, init_intervals, init_marker, init_symbol, interval_block)
(interval_block_index, interval_free_list, large_sblocks)
(large_vectors, last_marked, last_marked_index, lisp_align_free)
(lisp_align_malloc, lisp_free, lisp_malloc, lisp_malloc_loser)
(live_buffer_p, live_cons_p, live_float_p, live_misc_p, live_string_p)
(live_symbol_p, live_vector_p, longjmps_done, mark_buffer)
(mark_char_table, mark_face_cache, mark_glyph_matrix, mark_interval)
(mark_interval_tree, mark_maybe_object, mark_maybe_pointer)
(mark_memory, mark_object, mark_object_loop_halt, mark_stack)
(mark_terminals, mark_vectorlike, marker_block, marker_block_index)
(marker_free_list, max_heap_address, max_live, max_zombies)
(mem_delete, mem_delete_fixup, mem_find, mem_init, mem_insert)
(mem_insert_fixup, mem_root, mem_rotate_left, mem_rotate_right, mem_z)
(memory_full_cons_threshold, min_heap_address, ngcs, nzombies)
(oldest_sblock, setjmp_tested_p, stack_base, stack_copy)
(stack_copy_size, string_blocks, string_free_list, struct ablock)
(struct ablocks, struct cons_block, struct float_block)
(struct interval_block, struct marker_block, struct mem_node)
(struct sblock, struct sdata, struct string_block)
(struct symbol_block, struct vector_block, survives_gc_p)
(sweep_strings, sweep_vectors, symbol_block, symbol_block_index)
(symbol_free_list, test_setjmp, total_conses, total_floats)
(total_free_conses, total_free_floats, total_free_intervals)
(total_free_markers, total_free_strings, total_free_symbols)
(total_intervals, total_markers, total_string_size, total_strings)
(total_symbols, total_vector_size, union aligned_Lisp_Misc)
(union aligned_Lisp_Symbol, vector_blocks, vector_free_lists)
(vroundup, zombies): Remove. All references changed.
* bytecode.c (BYTE_MAINTAIN_TOP): Remove. All references changed.
(mark_byte_stack, unmark_byte_stack): Remove.
(MAYBE_GC): Make this a no-op.
(byte_stack_list): Remove. All references changed.
* eval.c (eval_sub, Ffuncall): Remove calls to `Fgarbage_collect'.
(mark_backtrace): Remove.
* fns.c (make_hash_table, copy_hash_table): Ignore hash table weakness.
(weak_hash_tables, init_weak_hash_tables, sweep_weak_table)
(sweep_weak_hash_tables): Remove.
* fringe.c (mark_fringe_data): Remove.
* gtkutil.c (xg_mark_data): Remove.
* image.c (mark_image, mark_image_cache): Remove.
* keyboard.c (read_char): Call `GC_collect_a_little' when idle.
(mark_kboards): Remove.
* s/aix4-2.h (GC_MARK_STACK):
* s/gnu-linux.h (GC_SETJMP_WORKS, GC_MARK_SECONDARY_STACK)
(GC_MARK_STACK):
* s/hpux10-20.h (GC_MARK_STACK):
* s/unixware.h (GC_MARK_STACK): Remove.
* sysdep.c (init_signals): Do not set a handler for SIGXCPU, since
BDW-GC uses it internally.
* term.c (mark_ttys): Remove.
* alloc.c (Qautomatic_gc): Move declaration and DEFSYM call...
* profiler.c (Qautomatic_gc): ...here.
* lisp.h (Qautomatic_gc): Remove declaration.
Conflicts:
src/alloc.c
src/emacs.c
src/eval.c
src/fns.c
src/lisp.h
src/bytecode.c
src/eval.c
BT Templeton [Wed, 30 May 2012 05:46:42 +0000 (01:46 -0400)]
remove allocation checks
* configure.in (GC_CHECK_CONS_LIST, GC_CHECK_STRING_BYTES)
(GC_CHECK_STRING_FREE_LIST, GC_CHECK_STRING_OVERRUN)
(XMALLOC_OVERRUN_CHECK): Remove allocation-related run-time checking
options. All references changed.
Conflicts:
src/alloc.c
BT Templeton [Sat, 16 Jun 2012 15:26:57 +0000 (11:26 -0400)]
* src/lisp.h: Always enable USE_LSB_TAG.
BT Templeton [Fri, 15 Jun 2012 06:33:33 +0000 (02:33 -0400)]
disable dumping
* configure.in: Unconditionally define CANNOT_DUMP. Permit dynamic
linking of libgc.
BT Templeton [Thu, 28 Jun 2012 04:01:20 +0000 (00:01 -0400)]
use xmalloc in x_get_window_property
* src/alloc.c (x_get_window_property): Use `xmalloc'.
BT Templeton [Wed, 13 Jun 2012 22:03:34 +0000 (18:03 -0400)]
simplify spare memory management
* src/alloc.c (spare_memory): Make this a single block of memory,
rather than an array. All references changed.
(memory_full_cons_threshold): Change default value.
BT Templeton [Thu, 31 May 2012 05:54:25 +0000 (01:54 -0400)]
libgc configuration
* configure.in (BDW_GC_CFLAGS, BDW_GC_LIBS): New variables.
* src/Makefile.in (CFLAGS): Add BDW_GC_CFLAGS.
(LIBES): Add BDW_GC_LIBS.
BT Templeton [Wed, 30 May 2012 16:22:35 +0000 (12:22 -0400)]
remove asynchronous input processing
* configure.in (SYNC_INPUT): Remove this macro definition and its
associated configure option. All references changed to assume that
SYNC_INPUT is enabled.
* src/alloc.c (_bytes_used, __malloc_extra_blocks, _malloc_internal)
(_free_internal, malloc_hysteresis): Remove variables which aren't
used when SYNC_INPUT is enabled.
Conflicts:
src/alloc.c
Michael Albinus [Sun, 29 Jun 2014 18:32:35 +0000 (20:32 +0200)]
* automated/tramp-tests.el (tramp--instrument-test-case):
Print debug buffer in any case.
Dmitry Antipov [Sun, 29 Jun 2014 16:12:08 +0000 (20:12 +0400)]
* xfns.c (Qsuppress_icon): Remove; no real users.
(syms_of_xfns): Don't DEFSYM it. Remove ancient comments.
* w32fns.c (Qsuppress_icon): Remove, for the same reason.
(syms_of_w32fns): Don't DEFSYM it.
Alan Mackenzie [Sun, 29 Jun 2014 11:26:47 +0000 (11:26 +0000)]
Don't call c-parse-state when c++-template-syntax-table is active.
* progmodes/cc-engine.el (c-guess-continued-construct CASE G)
(c-guess-basic-syntax CASE 5D.3): Rearrange so that
c-syntactic-skip-backwards isn't called with the pertinent syntax
table.
Glenn Morris [Sun, 29 Jun 2014 01:33:32 +0000 (18:33 -0700)]
* admin/update_autogen: Remove need to cd into/out of lisp/.
Glenn Morris [Sun, 29 Jun 2014 00:49:59 +0000 (17:49 -0700)]
* src/Makefile.in (ns-app): Mark as PHONY.
Glenn Morris [Sun, 29 Jun 2014 00:46:40 +0000 (17:46 -0700)]
* admin/grammars/Makefile.in (bootstrap-clean): Don't delete Makefile,
for sake of top-level maintainer-clean rule.
Glenn Morris [Sat, 28 Jun 2014 23:35:17 +0000 (16:35 -0700)]
* src/Makefile.in ($(lwlibdir)/liblw.a, $(oldXMenudir)/libXMenu11.a):
Fully revert earlier dumbness.
Glenn Morris [Sat, 28 Jun 2014 23:29:06 +0000 (16:29 -0700)]
* src/Makefile.in: Fix thinko in previous.
Glenn Morris [Sat, 28 Jun 2014 23:19:04 +0000 (16:19 -0700)]
Small cleanup for src/Makefile liblw.a, libXMenu11.a rules
* src/Makefile.in ($(lwlibdir)/liblw.a, $(oldXMenudir)/libXMenu11.a):
Remove prerequisites, sub-makes will figure it out.
(FORCE): Remove.
(mostlyclean): There are no libXMenu11.a, liblw.a in this directory.
* oldXMenu/deps.mk (${OBJS}): Depend on ../src/config.h.
Glenn Morris [Sat, 28 Jun 2014 22:57:23 +0000 (15:57 -0700)]
Use gcc auto-dependency information for lwlib and oldXMenu
* configure.ac (lwlib_deps_frag, oldxmenu_deps_frag): New output files.
* make-dist (lwlib, oldXMenu): Distribute *.mk.
* lwlib/Makefile.in: Move old dependency information to new file deps.mk.
(MKDIR_P, DEPFLAGS, MKDEPDIR, lwlib_deps_frag):
New, set by configure.
(DEPDIR): New variable.
(ALL_CFLAGS): Add DEPFLAGS.
(.c.o): Add MKDEPDIR.
(clean, mostlyclean): Delete DEPDIR.
* lwlib/deps.mk, lwlib/autodeps.mk: New files.
* oldXMenu/Makefile.in: Move old dependency information to new file deps.mk.
(MKDIR_P, DEPFLAGS, MKDEPDIR, oldxmenu_deps_frag):
New, set by configure.
(DEPDIR): New variable.
(ALL_CFLAGS): Add DEPFLAGS.
(.c.o): Add MKDEPDIR.
(clean, mostlyclean): Delete DEPDIR.
* oldXMenu/deps.mk, oldXMenu/autodeps.mk: New files.
* src/deps.mk: Comment update.
* .bzrignore: Ignore lwlib/deps, oldXMenu/deps.
Glenn Morris [Sat, 28 Jun 2014 17:27:29 +0000 (10:27 -0700)]
Merge from emacs-24; up to 2014-06-12T14:55:48Z!monnier@iro.umontreal.ca
Glenn Morris [Sat, 28 Jun 2014 17:18:05 +0000 (10:18 -0700)]
* test/automated/Makefile.in (GDB): New variable.
(emacs): Use $GDB.
Fixes: debbugs:15991
Glenn Morris [Sat, 28 Jun 2014 17:05:00 +0000 (10:05 -0700)]
Disable logging in the short form of the test Makefile rules
* test/automated/Makefile.in (WRITE_LOG): New variable.
(%.log): Use WRITE_LOG.
(test_template): Disable logging.
Kenichi Handa [Sat, 28 Jun 2014 13:41:19 +0000 (22:41 +0900)]
merge trunk
Kenichi Handa [Sat, 28 Jun 2014 13:38:36 +0000 (22:38 +0900)]
* coding.c (MAX_CHARBUF_SIZE): Renamed from CHARBUF_SIZE.
(MIN_CHARBUF_SIZE): New macro.
(ALLOC_CONVERSION_WORK_AREA): New arg SIZE. Callers changed.
Andreas Schwab [Sat, 28 Jun 2014 07:24:01 +0000 (09:24 +0200)]
Fixes: debbugs:17865
* coding.c (encode_coding_utf_8): Correctly count produced_chars
also in unibyte case.
Glenn Morris [Sat, 28 Jun 2014 03:11:24 +0000 (20:11 -0700)]
* calc-test.el: Set copyright to FSF; standardize permissions notice
Leo Liu [Sat, 28 Jun 2014 02:15:13 +0000 (10:15 +0800)]
* test/automated/calc-tests.el: New file and add tests for math-bignum.
Fixes: debbugs:17556