YAMAMOTO Mitsuharu
2aff7c5306
Make string pointer args point to const as in other string allocation functions.
...
* lisp.h (make_pure_string): String pointer arg now points to const.
* alloc.c (find_string_data_in_pure, make_pure_string): String pointer
args now point to const.
2010-01-22 18:10:04 +09:00
Glenn Morris
114f9c9679
Add 2010 to copyright years.
2010-01-13 00:35:10 -08:00
Stefan Monnier
8f11f7ecce
(mark_object): Don't reprocess marked strings.
...
Check vector's markbit earlier. Adjust calls to mark_vectorlike.
(mark_vectorlike, mark_char_table): Assume the object is unmarked.
2009-11-13 15:26:28 +00:00
Dan Nicolaescu
f4265f6c27
* frame.c (make_initial_frame):
...
* buffer.c (init_buffer_once): Use make_pure_c_string instead of
build_string.
* alloc.c (syms_of_alloc): Build Vmemory_signal_data in pure memory.
2009-11-11 19:25:24 +00:00
Stefan Monnier
2de9f71c22
Let integers use up 2 tags to give them one extra bit and double their range.
...
* lisp.h (USE_2_TAGS_FOR_INTS): New macro.
(LISP_INT_TAG, case_Lisp_Int, LISP_STRING_TAG, LISP_INT_TAG_P): New macros.
(enum Lisp_Type): Use them. Give explicit values.
(Lisp_Type_Limit): Remove.
(XINT, XUINT, make_number) [!USE_LISP_UNION_TYPE]:
(MOST_NEGATIVE_FIXNUM, MOST_POSITIVE_FIXNUM, INTMASK):
Pay attention to USE_2_TAGS_FOR_INTS.
(INTEGERP): Use LISP_INT_TAG_P.
* fns.c (internal_equal): Simplify the default case.
(sxhash): Use case_Lisp_Int.
* data.c (wrong_type_argument): Don't check against Lisp_Type_Limit any more.
(Ftype_of): Use case_Lisp_Int.
(store_symval_forwarding): Take into account the fact that Ints can
now have more than one tag.
* buffer.c (syms_of_buffer): Use LISP_INT_TAG.
buffer_slot_type_mismatch):
* xfaces.c (face_attr_equal_p):
* print.c (print_object):
* alloc.c (mark_maybe_object, mark_object, survives_gc_p): Use case_Lisp_Int.
2009-11-06 18:47:48 +00:00
Eli Zaretskii
323637a270
(make_pure_c_string): Fix last change to avoid compiler warning.
2009-11-06 10:55:11 +00:00
Dan Nicolaescu
d67b4f80db
* xterm.c (syms_of_xterm):
...
* xselect.c (syms_of_xselect):
* xmenu.c (syms_of_xmenu):
* xfns.c (syms_of_xfns):
* xfaces.c (syms_of_xfaces):
* xdisp.c (syms_of_xdisp):
* window.c (syms_of_window):
* w32fns.c (syms_of_w32fns):
* undo.c (syms_of_undo):
* textprop.c (syms_of_textprop):
* terminal.c (syms_of_terminal):
* syntax.c (syms_of_syntax):
* sound.c (syms_of_sound):
* search.c (syms_of_search):
* print.c (syms_of_print):
* minibuf.c (syms_of_minibuf):
* macros.c (syms_of_macros):
* keymap.c (syms_of_keymap, initial_define_key)
(initial_define_lispy_key):
* keyboard.c (syms_of_keyboard):
* insdel.c (syms_of_insdel):
* image.c (syms_of_image):
* fringe.c (syms_of_fringe):
* frame.c (syms_of_frame):
* fontset.c (syms_of_fontset):
* fns.c (syms_of_fns):
* fns.c (syms_of_fns):
* fileio.c (syms_of_fileio):
* fileio.c (syms_of_fileio):
* eval.c (syms_of_eval):
* doc.c (syms_of_doc):
* dispnew.c (syms_of_display):
* dired.c (syms_of_dired):
* dbusbind.c (syms_of_dbusbind):
* data.c (syms_of_data):
* composite.c (syms_of_composite):
* coding.c (syms_of_coding):
* cmds.c (syms_of_cmds):
* charset.c (define_charset_internal, syms_of_character):
* ccl.c (syms_of_ccl):
* category.c (syms_of_category, init_category_once):
* casetab.c (syms_of_casetab):
* casefiddle.c (syms_of_casefiddle):
* callint.c (syms_of_callint):
* bytecode.c (syms_of_bytecode):
* buffer.c (keys_of_buffer, syms_of_buffer):
* alloc.c (syms_of_alloc):
* process.c (syms_of_process, init_process):
* lread.c (syms_of_lread, init_obarray):
* font.c (build_style_table):
* emacs.c (syms_of_emacs, main): Replace calls to intern with
intern_c_string, calls to make_pure_string with
make_pure_c_string. Use pure_cons instead of Fcons.
* process.c (socket_options): Make it const.
(set_socket_option, init_process): Use a const pointer.
* lread.c (intern_c_string): New function.
(defvar_kboard, defvar_lisp, defvar_lisp_nopro, defvar_bool)
(defvar_int): Uset it. Make the name const char*.
* font.c (struct table_entry): Remove unused member. Make NAMES
constant.
(weight_table, slant_table, width_table): Make constant.
* emacs.c (struct standard_args): Make name and longname constant.
2009-11-06 06:50:52 +00:00
Dan Nicolaescu
a56eaaef7c
* alloc.c (make_pure_c_string): New function.
...
* eval.c (Fautoload): Purecopy all arguments.
2009-11-06 05:24:28 +00:00
Dan Nicolaescu
d7306fe6b1
* alloc.c: Do not define struct catchtag.
...
* eval.c: Move struct catchtag definition ...
* lisp.h: ... here.
* image.c: Move png.h #include earlier to avoid warnings.
* xterm.c:
* xsmfns.c:
* xselect.c:
* xrdb.c:
* xmenu.c:
* xftfont.c:
* xfont.c:
* xfns.c:
* xfaces.c:
* xdisp.c:
* window.c:
* widget.c:
* w32xfns.c:
* w32uniscribe.c:
* w32term.c:
* w32select.c:
* w32reg.c:
* w32proc.c:
* w32menu.c:
* w32inevt.c:
* w32heap.c:
* w32font.c:
* w32fns.c:
* w32console.c:
* w32.c:
* w16select.c:
* vm-limit.c:
* unexsol.c:
* unexec.c:
* unexcw.c:
* unexaix.c:
* undo.c:
* tparam.c:
* textprop.c:
* terminfo.c:
* terminal.c:
* termcap.c:
* term.c:
* syntax.c:
* sound.c:
* sheap.c:
* search.c:
* scroll.c:
* region-cache.c:
* regex.c:
* ralloc.c:
* process.c:
* print.c:
* msdos.c:
* minibuf.c:
* menu.c:
* marker.c:
* macros.c:
* keymap.c:
* keyboard.c:
* intervals.c:
* insdel.c:
* indent.c:
* gtkutil.c:
* ftxfont.c:
* ftfont.c:
* fringe.c:
* frame.c:
* fontset.c:
* font.c:
* fns.c:
* floatfns.c:
* filelock.c:
* fileio.c:
* emacs.c:
* editfns.c:
* dosfns.c:
* doprnt.c:
* doc.c:
* dispnew.c:
* dired.c:
* dbusbind.c:
* data.c:
* composite.c:
* coding.c:
* cmds.c:
* cm.c:
* chartab.c:
* charset.c:
* character.c:
* ccl.c:
* category.c:
* casetab.c:
* casefiddle.c:
* callproc.c:
* callint.c:
* bytecode.c:
* buffer.c:
* atimer.c: Include setjmp.h. (Bug#4643)
* xlwmenu.c:
* lwlib.c:
* lwlib-utils.c:
* lwlib-Xm.c:
* lwlib-Xlw.c:
* lwlib-Xaw.c: Include setjmp.h.
2009-10-19 04:27:09 +00:00
Kenichi Handa
5802634797
(mark_char_table): New function.
...
(mark_object): Use mark_char_table for a char-table.
2009-08-25 06:03:09 +00:00
Ken Raeburn
f601cdf35d
* lisp.h (XFLOAT_DATA): Produce an rvalue by adding 0 to the value.
...
(XFLOAT_INIT): New macro for storing a float value.
* alloc.c (make_float, make_pure_float): Use XFLOAT_INIT.
* fns.c (sxhash): Copy out the value of a float in order to examine its bytes.
* dbusbind.c (xd_append_arg): Likewise.
2009-08-17 01:25:54 +00:00
Dan Nicolaescu
4d18a7a28e
(mark_stack): Properly conditionalize previous change.
2009-01-30 23:43:20 +00:00
Chong Yidong
4c1616bee4
(mark_stack): Use "flushw" instead of "ta 3" assembly call for
...
Sparc64.
2009-01-23 04:38:18 +00:00
Glenn Morris
76b6f70759
Add 2009 to copyright years.
2009-01-08 03:15:17 +00:00
Eli Zaretskii
0078170f72
(NSTATICS): Bump to 0x640.
2008-08-02 16:41:36 +00:00
Dan Nicolaescu
6e5cb96f3d
* lisp.h:
...
* w32heap.c:
* emacs.c:
* alloc.c: Replace all references of NO_UNION_TYPE with
USE_LISP_UNION_TYPE.
* m/xtensa.h (NO_UNION_TYPE):
* m/vax.h (NO_UNION_TYPE):
* m/template.h (NO_UNION_TYPE):
* m/sparc.h (NO_UNION_TYPE):
* m/mips.h (NO_UNION_TYPE):
* m/macppc.h (NO_UNION_TYPE):
* m/m68k.h (NO_UNION_TYPE):
* m/iris4d.h (NO_UNION_TYPE):
* m/intel386.h (NO_UNION_TYPE):
* m/ibms390x.h (NO_UNION_TYPE):
* m/ibms390.h (NO_UNION_TYPE):
* m/ibmrs6000.h (NO_UNION_TYPE):
* m/ia64.h (NO_UNION_TYPE):
* m/hp800.h (NO_UNION_TYPE):
* m/arm.h (NO_UNION_TYPE):
* m/amdx86-64.h (NO_UNION_TYPE):
* m/alpha.h (NO_UNION_TYPE): Remove definition, all platform were
defining it the same.
2008-07-11 02:30:26 +00:00
Glenn Morris
4a00783e8e
Use __sparc__ rather than sparc. (Bug#507.)
2008-07-08 07:03:07 +00:00
Jim Meyering
70fdbb46cd
Make "xfree (NULL)" a no-op; remove useless if-before-xfree.
...
* src/alloc.c (xfree): Return right away for a NULL arg.
* src/lread.c (nosuffix): Remove now-useless if-before-xfree tests.
* src/gtkutil.c (xg_gtk_scroll_destroy): Likewise.
* src/mac.c (create_apple_event_from_event_ref): Likewise.
(create_apple_event_from_drag_ref, cfstring_create_normalized): Likewise.
* src/doprnt.c (doprnt1): Likewise.
* src/frame.c (frame): Likewise.
* src/keyboard.c (wipe_kboard): Likewise.
* src/macterm.c (x_free_frame_resources, xlfdpat_destroy, XFreePixmap):
(init_font_name_table, mac_unload_font, x_delete_display): Likewise.
* src/term.c (tty_default_color_capabilities, maybe_fatal)
(delete_tty): Likewise.
* src/w16select.c (string): Likewise.
* src/w32.c (w32_get_resource, SET_ENV_BUF_SIZE): Likewise.
* src/w32bdf.c (w32_free_bdf_font): Likewise.
* src/w32fns.c (w32_unload_font): Likewise.
* src/w32font.c (w32font_close): Likewise.
* src/window.c (size_window): Likewise.
* src/xselect.c (receive_incremental_selection): Likewise.
* src/xterm.c (x_free_frame_resources, x_delete_display): Likewise.
* src/mactoolbox.c (create_apple_event_from_drag_ref): Likewise.
* src/w32.c (stat): Likewise.
2008-06-02 06:09:17 +00:00
Chong Yidong
5ac58e4c93
(init_alloc_once): Call init_weak_hash_tables.
2008-05-15 02:46:04 +00:00
Glenn Morris
9ec0b715e2
Switch to recommended form of GPLv3 permissions notice.
2008-05-14 07:50:26 +00:00
Miles Bader
a113b3ca32
Merge from emacs--rel--22
...
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1121
2008-04-23 05:55:42 +00:00
YAMAMOTO Mitsuharu
a1b41389e4
[!SYSTEM_MALLOC && !SYNC_INPUT] (uninterrupt_malloc)
...
[HAVE_GTK_AND_PTHREAD && !DOUG_LEA_MALLOC]: Don't use recursive mutex.
2008-04-12 01:59:22 +00:00
Stefan Monnier
354884c46e
Consolidate the image_cache to the terminal struct.
...
* termhooks.h (P_): Remove redundant def.
(struct terminal): New field `image_cache'.
* frame.h (FRAME_IMAGE_CACHE): New macro. Use it everywhere in place
of FRAME_X_IMAGE_CACHE.
* xterm.h (struct x_display_info): Remove image_cache field.
(FRAME_X_IMAGE_CACHE): Remove. Use FRAME_IMAGE_CACHE instead.
* w32term.h (struct w32_display_info): Remove image_cache field.
(FRAME_X_IMAGE_CACHE): Remove. Use FRAME_IMAGE_CACHE instead.
* macterm.h (struct mac_display_info): Remove image_cache field.
(FRAME_X_IMAGE_CACHE): Remove. Use FRAME_IMAGE_CACHE instead.
* xterm.c (x_term_init):
* w32term.c (w32_term_init):
* macterm.c (mac_term_init): Set the image_cache in the terminal.
* dispextern.h (clear_image_cache, forall_images_in_image_cache):
Remove declarations.
(clear_image_caches, mark_image_cache): New declarations.
* xfaces.c (clear_face_cache):
* xdisp.c (redisplay_internal): Use clear_image_caches.
* image.c (clear_image_cache): Don't check that a frame is on
a window-system before checking if it shares the same cache.
(clear_image_caches): New function.
(Fclear_image_cache): Use it.
(mark_image): Move from allo.c.
(mark_image_cache): Move from alloc.c and forall_images_in_image_cache.
* alloc.c (mark_image, mark_image_cache): Move to image.c.
(mark_object): Don't call mark_image_cache for frames.
(mark_terminals): Call mark_image_cache.
2008-02-22 17:42:09 +00:00
Stefan Monnier
9ce376f9de
(mark_buffer): Comment fix to clarify the status of Lisp fields.
2008-02-11 17:54:46 +00:00
Miles Bader
d235ca2ff8
Merge from emacs--devo--0
...
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-324
2008-01-30 07:57:28 +00:00
Dan Nicolaescu
e39a993cce
* movemail.c:
...
* make-docfile.c: Remove reference to symbols defined by systems
not supported anymore: MAC_OS8, XENIX and STRIDE.
* (src/m/mips.h):
* (src/m/intel386.h):
* callproc.c:
* config.in:
* ecrt0.c:
* emacs.c:
* fileio.c:
* frame.c:
* getpagesize.h:
* keyboard.c:
* lread.c:
* process.c:
* puresize.h:
* sysdep.c:
* systty.h:
* syswait.h:
* unexec.c:
* xdisp.c:
* alloc.c: Remove code containing references to symbols defined by
unsupported systems.
2008-01-13 00:43:55 +00:00
Miles Bader
430d2ee291
Merge from emacs--devo--0
...
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-312
2008-01-09 01:21:15 +00:00
Miles Bader
59ce725a3b
Merge from emacs--rel--22
...
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-987
2008-01-08 20:46:54 +00:00
Glenn Morris
8cabe764e9
Add 2008 to copyright years.
2008-01-08 04:37:27 +00:00
Miles Bader
0bd5084171
Merge from emacs--devo--0
...
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-294
2007-12-06 09:51:45 +00:00
Stefan Monnier
6d3f2bb282
* alloc.c (allocate_other_vector):
...
* lisp.h (allocate_other_vector): Remove.
2007-11-16 21:24:59 +00:00
Stefan Monnier
30f95089ed
* alloc.c (ALLOCATE_PSEUDOVECTOR): Move to lisp.h.
...
(allocate_pseudovector): Make non-static.
* lisp.h (enum pvec_type): New tag PVEC_OTHER.
(allocate_pseudovector): Declare.
(ALLOCATE_PSEUDOVECTOR): Move from alloc.c
2007-11-16 20:36:34 +00:00
Jason Rumney
1ccaa71a47
(NSTATICS): Revert spurious change made in last merge.
2007-10-29 23:31:22 +00:00
Miles Bader
18cd1f1a08
Merge from emacs--devo--0
...
Patches applied:
* emacs--devo--0 (patch 902-908)
- Update from CVS
- Merge from emacs--rel--22
* emacs--rel--22 (patch 131-137)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 261-262)
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-278
2007-10-27 09:12:07 +00:00
Juanma Barranquero
d3d472627a
(spare_memory, stack_copy, stack_copy_size, ignore_warnings, Vdead,
...
dont_register_blocks, staticvec, staticidx, interval_block, n_interval_blocks,
init_strings, check_string_bytes, check_sblock, init_float, free_float,
n_cons_blocks, init_cons, all_vectors, n_vectors, symbol_block,
symbol_block_index, symbol_free_list, n_symbol_blocks, init_symbol,
marker_block, marker_free_list, n_marker_blocks, init_marker, valid_pointer_p,
make_pure_float, last_marked, mark_object_loop_halt): Make static.
2007-10-26 13:42:39 +00:00
Miles Bader
9c8020a8df
Merge from emacs--devo--0
...
Patches applied:
* emacs--devo--0 (patch 890-898)
- Update from CVS
- Merge from emacs--rel--22
* emacs--rel--22 (patch 122-128)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 257-258)
- Merge from emacs--rel--22
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-270
2007-10-19 00:00:21 +00:00
Stefan Monnier
d314756ea8
(free_misc): Use XMISCTYPE.
...
(live_misc_p, gc_sweep): Use Lisp_Misc_Any.
2007-10-17 02:10:38 +00:00
Stefan Monnier
d3f41ff555
(Fpurecopy): Set the pvec tag on pseudo vectors.
2007-10-16 15:49:43 +00:00
Stefan Monnier
67ee9f6e91
* lisp.h (enum Lisp_Misc_Type): Del Lisp_Misc_Some_Buffer_Local_Value.
...
(XMISCANY): New macro.
(XMISCTYPE): Use it.
(struct Lisp_Misc_Any): New type.
(union Lisp_Misc): Use it.
(struct Lisp_Buffer_Local_Value): Add `local_if_set' bit.
* data.c (Fboundp, store_symval_forwarding, swap_in_global_binding)
(find_symbol_value, set_internal, default_value, Fset_default)
(Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local, Flocal_variable_p)
(Flocal_variable_if_set_p, Fvariable_binding_locus):
The SOME_BUFFER_LOCAL_VALUEP distinction is replaced by local_if_set.
* alloc.c (allocate_buffer): Set the size and tag.
(allocate_misc, mark_maybe_object, mark_object, survives_gc_p):
Use XMISCANY.
(die): Follow the GNU convention for error messages.
* print.c (print_object): SOME_BUFFER_LOCAL_VALUEP -> local_if_set.
* buffer.c (Fget_buffer_create, Fmake_indirect_buffer): Don't set the
tag any more.
(set_buffer_internal_1):
* frame.c (store_frame_param):
* eval.c (specbind):
* xdisp.c (select_frame_for_redisplay): Drop SOME_BUFFER_LOCAL_VALUEP.
2007-10-16 15:42:58 +00:00
Miles Bader
985773c903
Fix up multi-tty merge
...
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-261
Creator: Stefan Monnier <monnier@iro.umontreal.ca>
2007-10-12 21:06:27 +00:00
Miles Bader
c73bd236f7
Merge from emacs--devo--0
...
Patches applied:
* emacs--devo--0 (patch 866-879)
- Merge multi-tty branch
- Update from CVS
- Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-257
2007-10-11 16:24:58 +00:00
Stefan Monnier
e330de4483
(mark_terminals): Typo.
2007-10-02 22:07:41 +00:00
Stefan Monnier
d0fdb6daae
* window.h (struct window):
...
* window.c (struct save_window_data, struct saved_window):
* termhooks.h (struct terminal):
* process.h (struct Lisp_Process):
* frame.h (struct frame):
* buffer.h (struct buffer):
* lisp.h (struct Lisp_Vector, struct Lisp_Char_Table)
(struct Lisp_Bool_Vector, struct Lisp_Subr, struct Lisp_Hash_Table):
The size field of (pseudo)vectors is now unsigned.
(ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG): Simplify accordingly.
2007-10-02 21:55:27 +00:00
Stefan Monnier
878f97ffed
* lisp.h (struct Lisp_Hash_Table): Move non-traced elements at the end.
...
Turn `count' into an integer.
* fns.c (make_hash_table, hash_put, hash_remove, hash_clear)
(sweep_weak_table, sweep_weak_hash_tables, Fhash_table_count):
* print.c (print_object) <HASH_TABLE_P>: `count' is an int.
* alloc.c (allocate_hash_table): Use ALLOCATE_PSEUDOVECTOR.
(mark_object) <HASH_TABLE_P>: Use mark_vectorlike.
2007-10-02 21:24:47 +00:00
Stefan Monnier
5b2f56dfa6
(mark_object): Fix typo.
2007-10-02 21:19:17 +00:00
Stefan Monnier
d2029e5b81
(allocate_pseudovector): New fun.
...
(ALLOCATE_PSEUDOVECTOR): New macro.
(allocate_window, allocate_terminal, allocate_frame)
(allocate_process): Use it.
(mark_vectorlike): New function.
(mark_object) <FRAMEP, WINDOWP, BOOL_VECTOR_P, VECTORP>: Use it.
(mark_terminals): Use it.
(Fmake_bool_vector, Fmake_char_table, make_sub_char_table)
(Fmake_byte_code): Use XSETPVECTYPE.
2007-10-02 21:16:53 +00:00
Stefan Monnier
9c545a5534
(enum mem_type): Replace all vector subtypes -> MEM_TYPE_VECTORLIKE.
...
(allocate_vectorlike): Remove type argument. Adjust callers.
(live_vector_p, mark_maybe_pointer, valid_lisp_object_p):
Only handle the one remaining MEM_TYPE_VECTORLIKE.
(mark_terminal): Remove left-over declaration.
2007-09-29 20:19:41 +00:00
Stefan Monnier
dafc79fa1b
(MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT): New macros
...
to avoid unnecessary BLOCK_INPUTs when SYNC_INPUT is used.
(xmalloc, xrealloc, xfree, lisp_malloc, lisp_free, lisp_align_malloc)
(lisp_align_free, make_interval, allocate_vectorlike, allocate_string_data)
(make_float, Fcons, allocate_string, Fmake_symbol, allocate_misc): Use them.
2007-09-29 20:10:22 +00:00
Stefan Monnier
13559ee0bb
(allocate_terminal): Set the vector size to only count the Lisp fields.
...
Initialize those to nil.
(mark_object): Don't treat terminals specially.
(mark_terminal): Remove.
(mark_terminals): Use mark_object instead.
2007-09-27 19:51:39 +00:00
Richard M. Stallman
3ae2e3a37f
(gc_sweep): Check cons cell mark bits word by word
...
and optimize the case where they are all 1.
2007-09-23 15:39:16 +00:00