Commit graph

84 commits

Author SHA1 Message Date
Richard M. Stallman
155ffe9c93 (DONT_COPY_FLAG): New bit flag.
(mark_object, gc_sweep, compact_strings): Use it.
1995-01-11 01:19:09 +00:00
Karl Heuer
6b552283ca (mark_object, mark_buffer): Don't mark buffer twice. 1995-01-04 22:43:47 +00:00
Karl Heuer
04ff97564e (mark_object): Make `else' visible outside MULTI_FRAME. 1995-01-03 01:20:47 +00:00
Richard M. Stallman
30e3190aac (mark_buffer, gc_sweep): Use BUF_INTERVALS.
(mark_buffer): In indirect buffer, mark the base buffer.

(mark_object): Make buffer case a branch of the Lisp_Vectorlike case.
1995-01-02 09:15:25 +00:00
Richard M. Stallman
169ee24357 (mark_object): Don't use Lisp_Process, Lisp_Window.
Handle frames, compileds and subrs as branch of Lisp_Vectorlike case.
(Fmake_byte_code): Use XSETCOMPILED.
1994-12-30 01:52:37 +00:00
Richard M. Stallman
d17f2a43fa (mark_object): In a frame, mark the buffer_predicate.
Don't mark the height and width fields.
1994-12-21 22:23:49 +00:00
Karl Heuer
7643763103 (Fpurecopy): Use type test macros.
(mark_object): Use the new pseudovector convention.
1994-11-18 06:49:09 +00:00
Karl Heuer
d6dd74bbae (Fpurecopy): Use type test macros. 1994-11-18 02:31:20 +00:00
Karl Heuer
1825c68d0c (Fmake_vector): Call allocate_vectorlike.
(allocate_vectorlike): New function, extracted from Fmake_vector.
1994-11-16 04:48:37 +00:00
Karl Heuer
c9dad5edec (Fmake_list, Fmake_vector, Fmake_string): Use CHECK_NATNUM instead of its
expansion.
1994-11-16 00:30:25 +00:00
Karl Heuer
8548150755 (free_float): Don't assume XFASTINT accesses the raw bits.
(make_float, free_cons, Fcons, Fmake_symbol, gc_sweep): Likewise.
1994-11-15 21:44:10 +00:00
Karl Heuer
e202fa3405 (mark_object, gc_sweep): Use new overlay substructure. 1994-11-15 02:04:40 +00:00
Karl Heuer
465edf35eb (mark_object): New code to handle buffer-local substructure.
(gc_sweep): Generalize marker code to handle other substructures.
1994-11-11 07:34:14 +00:00
Karl Heuer
c86160562a (mark_object): Use the new substructure. 1994-10-12 05:14:11 +00:00
Karl Heuer
a0a38eb79f (MARKER_BLOCK_SIZE, marker_block, marker_free_list): Now refers to the
superset type, not just markers.
(allocate_misc): New function, extracted from Fmake_marker.
(Fpurecopy): Check the substructure.
(clear_marks, mark_object, gc_sweep): Likewise.
1994-10-11 07:46:01 +00:00
Karl Heuer
9eb879911f (mark_object): Delete case Lisp_Void. 1994-10-06 22:59:55 +00:00
Karl Heuer
9852abf34d (mark_object): Delete case Lisp_Internal_Stream. 1994-10-06 21:47:12 +00:00
Karl Heuer
67ba9986a3 (free_float, make_float, free_cons, Flist, Fvector, Fmake_byte_code,
make_pure_float, mark_object, gc_sweep): Don't use XFASTINT as an lvalue.
1994-10-04 15:31:18 +00:00
Karl Heuer
45d12a8970 (VALIDATE_LISP_STORAGE, make_float, Fcons, Fmake_vector, Fmake_symbol,
Fmake_marker, make_uninit_string, make_pure_string, pure_cons,
make_pure_float, make_pure_vector, mark_buffer, gc_sweep, compact_strings,
Fmemory_limit): Use new accessor macros instead of calling XSET directly.
1994-10-04 11:47:46 +00:00
Karl Heuer
e687453f6e (Fmake_list, Fmake_vector, Fmake_string, make_event_array): Use type test
macros.
1994-09-27 03:16:02 +00:00
Karl Heuer
beded970ac (make_float, make_pure_float): Fix Lisp_Object vs. int problems. 1994-09-20 04:47:17 +00:00
Richard M. Stallman
426076815f (pure, pure_size): Use EMACS_INT.
(free_float, free_cons, PAD, STRING_FULLSIZE, struct string_block)
(make_pure_string, make_pure_vector, Fgarbage_collect, mark_object)
(gc_sweep, compact_strings, Fmemory_limit): Use EMACS_INT.
1994-09-17 00:25:35 +00:00
Karl Heuer
3a22ee3595 Update copyright. 1994-05-04 02:41:09 +00:00
Richard M. Stallman
8db3b57351 (mark_object, case frame): Mark menu_bar_vector field. 1994-04-26 09:29:18 +00:00
Karl Heuer
c13ccad2a6 (make_event_array): Use assignment, not initialization. 1994-03-23 22:25:25 +00:00
Richard M. Stallman
fd80e3bbba (mark_object): Add no-op cast. 1994-03-06 22:07:19 +00:00
Richard M. Stallman
3f872b675a (ARRAY_MARK_FLAG): Definition moved to lisp.h. 1994-03-05 20:39:07 +00:00
Richard M. Stallman
cf3540e492 (memory_signal_data): No longer static.
(syms_of_alloc): Stick Qerror onto memory_signal_data.
1994-03-02 03:47:51 +00:00
Karl Heuer
bcb61d60fc (memory_full): Use new variable memory_signal_data with precomputed value
instead of trying to build it after memory is already exhausted.
1994-02-28 20:20:22 +00:00
Karl Heuer
51056d11c5 (Fgarbage_collect): Save echo_area_glyphs_length. 1994-02-10 00:35:15 +00:00
Karl Heuer
9149e74322 (mark_object): Fetch obj from *objptr at loop, not at the gotos. 1994-02-09 22:04:55 +00:00
Richard M. Stallman
31ce1c9154 (Fmemory_limit): No longer interactive. 1993-12-25 08:12:08 +00:00
Richard M. Stallman
06c5fe0034 (make_pure_string): If we USE_TEXT_PROPERTIES, set the
interval of the pure string to NULL_INTERVAL.
1993-11-10 19:55:18 +00:00
Roland McGrath
18160b98ce Include <config.h> instead of "config.h". 1993-09-10 06:15:46 +00:00
Richard M. Stallman
41f54422a4 (mark_object): Declare ptr volatile, or don't use it
after a recursive call.  Delete the aborts if ptr is clobbered.
1993-08-08 23:19:24 +00:00
Richard M. Stallman
5f60ed47d9 (compact_strings): Add USE_TEXT_PROPERTIES conditional. 1993-07-21 22:29:26 +00:00
Jim Blandy
e872064401 Consistently use the mark bit of the root interval's parent field
to say whether or not the interval tree has been visited (and skip
	it when revisited), and the mark bit of the plist field to say
	whether or not that interval has been visited (and abort if
	revisited); don't try to use the plist mark bit for both
	meanings.
	* alloc.c (mark_interval_tree): Don't test if the interval tree
	has already been visited here; let the MARK_INTERVAL_TREE macro do
	that; avoid function call overhead.  Mark the interval tree as
	having been visited by setting TREE->parent's mark bit.
	(MARK_INTERVAL_TREE): If the tree has been visited (according to
	I->parent's mark bit), don't call mark_interval_tree.
	(gc_sweep): Rebalance the interval trees of those large strings
	which are still alive.  This also clears the mark bits of those
	trees' root intervals' parent fields.
	(compact_strings): Rebalance the interval tree of each small
	strings which is still alive.  This also clears the mark bits of
	that tree's root interval's parent field.  Since the string has
	moved, update the root interval's parent pointer to contain the
	new address.
	* lisp.h (struct interval): Doc fix; explain the roles of the mark
	bits of the parent and plist members.
1993-07-18 06:26:10 +00:00
Richard M. Stallman
12ae29ebfb (mark_object) [DEBUG_MOLE]: Add abort at beginning. 1993-07-14 16:36:25 +00:00
Richard M. Stallman
5d7aa25b52 (mark_object): Add aborts in Lisp_Symbol case. 1993-06-29 21:08:31 +00:00
Jim Blandy
7d385b0569 * alloc.c (Fgarbage_collect): If the minibuffer is active, don't
display the "...done" message; allow the minibuffer to show again.
1993-06-21 00:25:57 +00:00
Jim Blandy
eb8c3be94e Apply typo patches from Paul Eggert. 1993-06-09 11:59:12 +00:00
Jim Blandy
2756d8ee8d * alloc.c (emacs_blocked_malloc, emacs_blocked_realloc): Cast the
return values of malloc and realloc, to placate compilers.
1993-06-09 03:55:55 +00:00
Richard M. Stallman
c9ca4659ed (make_event_array): Ignore bits above CHAR_META. 1993-06-07 05:30:07 +00:00
Richard M. Stallman
6b5fd105ce (mark_object): Add debugging code to check for ptr clobbered. 1993-05-27 23:48:18 +00:00
Jim Blandy
cf026b25cc * syssignal.h: Don't #include <signal.h>
* alloc.c: #include <signal.h>, but before "config.h".
1993-05-24 02:32:33 +00:00
Jim Blandy
c6c5df7f76 Updated copyright years. 1993-05-22 21:34:42 +00:00
Jim Blandy
6c523803b3 * lisp.h (Lisp_Overlay): New tag.
(OVERLAYP): New predicate.
	(CHECK_OVERLAY): New type-checker.
	(Qoverlayp): New extern declaration.
	* buffer.c (Foverlayp): New function.
	(Qoverlayp): New atom.
	(overlays_at, recenter_overlay_lists): Abort if we encounter an
	invalid overlay.
	(syms_of_buffer): defsubr Soverlayp; initialize Qoverlayp.
	(Fdelete_overlay): Set the overlay's markers to point nowhere.
	Use CHECK_OVERLAY instead of signalling a special error.
	(Fmove_overlay, Foverlay_put): Use CHECK_OVERLAY instead of
	signalling a special error.
	(Foverlay_get): Use CHECK_OVERLAY.
	* fns.c (internal_equal): Define this for overlays.
	* buffer.h (OVERLAY_VALID): Define in terms of OVERLAYP.
	* print.c (print): Give overlays their own print syntax.
	* alloc.c (mark_object): Treat overlays like conses.
1993-05-14 14:43:00 +00:00
Jim Blandy
b0846f520d * alloc.c (__malloc_hook, __realloc_hook, __free_hook): Declare
these extern, not static.  (!)

	* alloc.c (__malloc_hook, old_malloc_hook, __realloc_hook,
	old_realloc_hook): Declare that the functions these point to return
	void *, not void.
1993-04-10 07:57:21 +00:00
Jim Blandy
9ac0d9e041 Put interrupt input blocking in a separate file from xterm.h.
This isn't specific to X, and it allows us to avoid #including
	xterm.h in files that don't really have anything to do with X.
	* blockinput.h: New file.
	* xterm.h (BLOCK_INPUT, UNBLOCK_INPUT, TOTALLY_UNBLOCK_INPUT,
	UNBLOCK_INPUT_RESIGNAL): These are now in blockinput.h.
	(x_input_blocked, x_pending_input): Deleted; there are analogs
	in blockinput.h called interrupt_input_blocked and
	interrupt_input_pending.
	* keyboard.c (interrupt_input_blocked, interrupt_input_pending):
	New variables, used by the macros in blockinput.h.
	* xterm.c: #include blockinput.h.
	(x_input_blocked, x_pending_input): Deleted.
	(XTread_socket): Test and set interrupt_input_blocked and
	interrupt_input_pending instead of the old variables.
	* alloc.c, xfaces.c, xfns.c, xmenu.c, xselect.c, keymap.c:
	#include blockinput.h.
	* eval.c: #include blockinput.h instead of xterm.h.
	* keyboard.c: #include blockinput.h.
	(input_poll_signal): Just test
	interrupt_input_blocked, instead of testing HAVE_X_WINDOWS and
	x_input_blocked.

	Block the processing of interrupt input while we're manipulating the
	malloc heap.
	* alloc.c: (xfree): New function, to make it easy to free things
	safely.
	(xmalloc, xrealloc): Block X input while doing the deed.
	(VALIDATE_LISP_STORAGE, gc_sweep, compact_strings): Use xfree
	instead of free.
	(uninterrupt_malloc): New function, to install input-blocking
	hooks into the GNU malloc routines.
	* emacs.c [not SYSTEM_MALLOC] (main): Call uninterrupt_malloc
	on startup.
	* alloc.c: (make_interval, make_float, Fcons, Fmake_vector,
	Fmake_symbol, Fmake_marker, make_uninit_string, Fgarbage_collect):
	Use xmalloc instead of malloc; don't bother to check if out of
	memory here.
	(Fgarbage_collect): Call xrealloc instead of realloc.
	* buffer.c: Use xmalloc and xfree instead of malloc and free;
	don't bother to check if out of memory here.
	(Fget_buffer_create): Put BLOCK_INPUT/UNBLOCK_INPUT pair around
	calls to ralloc routines.
	* insdel.c: Same.
	* lisp.h (xfree): New extern declaration.
	* xfaces.c (xfree): Don't #define this to be free; use the
	definition in alloc.c.
	* dispnew.c, doc.c, doprnt.c, fileio.c, lread.c, term.c, xfns.c,
	xmenu.c, xterm.c: Use xfree instead of free.
	* hftctl.c: Use xfree and xmalloc instead of free and malloc.
	* keymap.c (current_minor_maps): BLOCK_INPUT while calling realloc
	and malloc.
	* search.c: Since the regexp routines can malloc, BLOCK_INPUT
	while runing them.  #include blockinput.h.
	* sysdep.c: #include blockinput.h.  Call xfree and xmalloc instead
	of free and malloc.  BLOCK_INPUT around routines which we know
	will call malloc.

	ymakefile (keyboard.o, keymap.o, search.o, sysdep.o, xfaces.o,
	xfns.o, xmenu.o, xterm.o, xselect.o, alloc.o, eval.o): Note that
	these depend on blockinput.h.
1993-03-31 10:55:33 +00:00
Richard M. Stallman
48dfbc2f80 (mark_object): Mark face_alist of a frame. 1993-03-25 17:44:56 +00:00