Mercurial > hg > xemacs-beta
diff src/redisplay.c @ 1123:37bdd24225ef
[xemacs-hg @ 2002-11-27 07:15:02 by ben]
bug fixes, profiling debugging improvements
configure.in: Check for GCC version and only use -Wpacked in v3.
.cvsignore: Add .idb, .ilk for MS Windows VC++.
cl-macs.el: Document better.
cmdloop.el: Removed.
Remove nonworking breakpoint-on-error now that debug-on-error
works as documented.
help.el: Extract out with-displaying-help-buffer into a more general
mechanism.
lib-complete.el: Support thunks in find-library-source-path.
startup.el: Don't catch errors when noninteractive, because that makes
stack traces from stack-trace-on-error useless.
.cvsignore: Windows shit.
alloc.c: Better redisplay-related assert.
elhash.c: Comment change.
eval.c: Don't generate large warning strings (e.g. backtraces) when they will
be discarded.
Implement debug-on-error as documented -- it will enter the
debugger and crash when an uncaught signal happens noninteractively
and we are --debug.
Better redisplay-related asserts.
frame-msw.c, frame.c, lisp.h, redisplay.c, scrollbar-gtk.c, scrollbar-x.c, signal.c, sysdep.c: Fix up documentation related to QUIT (which CANNOT garbage-collect
under any circumstances), and to redisplay critical sections.
lread.c: Add load-ignore-out-of-date-elc-files,
load-always-display-messages, load-show-full-path-in-messages for
more robust package compilation and debugging.
profile.c: Overhaul profile code. Change format to include call count and be
extensible for further info. Remove call-count-profile-table.
Add set-profiling-info. See related profile.el changes (which
SHOULD ABSOLUTELY be in the core! Get rid of xemacs-devel and
xemacs-base packages *yesterday*!).
author | ben |
---|---|
date | Wed, 27 Nov 2002 07:15:36 +0000 |
parents | c15f25529e61 |
children | e22b0213b713 |
line wrap: on
line diff
--- a/src/redisplay.c Tue Nov 26 22:52:59 2002 +0000 +++ b/src/redisplay.c Wed Nov 27 07:15:36 2002 +0000 @@ -6564,8 +6564,9 @@ /* The menubar, toolbar, and icon updates must be done before enter_redisplay_critical_section is called and we are officially - 'in_display'. They may eval lisp code which may call Fsignal. - If in_display is set Fsignal will abort. */ + 'in_display'. They may eval lisp code which may call QUIT. + If in_display is set, QUIT will abort (unless the code is wrapped + to protect against errors). */ #ifdef HAVE_MENUBARS /* Update the menubar. It is done first since it could change @@ -6614,21 +6615,25 @@ following cannot happen: 1) garbage collection - 2) Lisp code evaluation - 3) frame size changes - - We ensure (3) by calling enter_redisplay_critical_section(), which + 2) QUIT + 3) Any non-local exits + 4) frame size changes + + We ensure (4) by calling enter_redisplay_critical_section(), which will cause any pending frame size changes to get put on hold - till after the end of the critical section. (1) follows - automatically if (2) is met. #### Unfortunately, there are - some places where Lisp code can be called within this section. - We need to remove them. - - If Fsignal() is called during this critical section, we - will abort(). - - If garbage collection is called during this critical section, - we simply return. #### We should abort instead. + till after the end of the critical section. (2) is required because + of the possibility of (3). (2) and (3) mean that any place that + can execute QUIT (e.g. internal_equal()), and especially any place + that executes Lisp code, need to be properly wrapped to protect + against these possibilities. This wrapping happens using + call_trapping_problems(..., INHIBIT_GC), or related functions. + + To help debug potential problems, we arrange (when + ERROR_CHECK_TRAPPING_PROBLEMS is set) to crash automatically every + time we execute QUIT or check to see whether garbage collection is + necessary, inside of an unprotected critical section, as well as + further checks when we actually Fsignal(), Fthrow(), + garbage_collect_1(). #### If a frame-size change does occur we should probably actually be preempting redisplay. */