Mercurial > hg > xemacs-beta
comparison 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 |
comparison
equal
deleted
inserted
replaced
1122:7abc2b15a990 | 1123:37bdd24225ef |
---|---|
6562 assert (!f->size_slipped); | 6562 assert (!f->size_slipped); |
6563 } | 6563 } |
6564 | 6564 |
6565 /* The menubar, toolbar, and icon updates must be done before | 6565 /* The menubar, toolbar, and icon updates must be done before |
6566 enter_redisplay_critical_section is called and we are officially | 6566 enter_redisplay_critical_section is called and we are officially |
6567 'in_display'. They may eval lisp code which may call Fsignal. | 6567 'in_display'. They may eval lisp code which may call QUIT. |
6568 If in_display is set Fsignal will abort. */ | 6568 If in_display is set, QUIT will abort (unless the code is wrapped |
6569 to protect against errors). */ | |
6569 | 6570 |
6570 #ifdef HAVE_MENUBARS | 6571 #ifdef HAVE_MENUBARS |
6571 /* Update the menubar. It is done first since it could change | 6572 /* Update the menubar. It is done first since it could change |
6572 the menubar's visibility. This way we avoid having flashing | 6573 the menubar's visibility. This way we avoid having flashing |
6573 caused by an Expose event generated by the visibility change | 6574 caused by an Expose event generated by the visibility change |
6612 /* ----------------- BEGIN CRITICAL REDISPLAY SECTION ---------------- */ | 6613 /* ----------------- BEGIN CRITICAL REDISPLAY SECTION ---------------- */ |
6613 /* Within this section, we are defenseless and assume that the | 6614 /* Within this section, we are defenseless and assume that the |
6614 following cannot happen: | 6615 following cannot happen: |
6615 | 6616 |
6616 1) garbage collection | 6617 1) garbage collection |
6617 2) Lisp code evaluation | 6618 2) QUIT |
6618 3) frame size changes | 6619 3) Any non-local exits |
6619 | 6620 4) frame size changes |
6620 We ensure (3) by calling enter_redisplay_critical_section(), which | 6621 |
6622 We ensure (4) by calling enter_redisplay_critical_section(), which | |
6621 will cause any pending frame size changes to get put on hold | 6623 will cause any pending frame size changes to get put on hold |
6622 till after the end of the critical section. (1) follows | 6624 till after the end of the critical section. (2) is required because |
6623 automatically if (2) is met. #### Unfortunately, there are | 6625 of the possibility of (3). (2) and (3) mean that any place that |
6624 some places where Lisp code can be called within this section. | 6626 can execute QUIT (e.g. internal_equal()), and especially any place |
6625 We need to remove them. | 6627 that executes Lisp code, need to be properly wrapped to protect |
6626 | 6628 against these possibilities. This wrapping happens using |
6627 If Fsignal() is called during this critical section, we | 6629 call_trapping_problems(..., INHIBIT_GC), or related functions. |
6628 will abort(). | 6630 |
6629 | 6631 To help debug potential problems, we arrange (when |
6630 If garbage collection is called during this critical section, | 6632 ERROR_CHECK_TRAPPING_PROBLEMS is set) to crash automatically every |
6631 we simply return. #### We should abort instead. | 6633 time we execute QUIT or check to see whether garbage collection is |
6634 necessary, inside of an unprotected critical section, as well as | |
6635 further checks when we actually Fsignal(), Fthrow(), | |
6636 garbage_collect_1(). | |
6632 | 6637 |
6633 #### If a frame-size change does occur we should probably | 6638 #### If a frame-size change does occur we should probably |
6634 actually be preempting redisplay. */ | 6639 actually be preempting redisplay. */ |
6635 | 6640 |
6636 MAYBE_DEVMETH (d, frame_output_begin, (f)); | 6641 MAYBE_DEVMETH (d, frame_output_begin, (f)); |