Mercurial > hg > xemacs-beta
comparison src/lisp.h @ 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 | 184461bc8de4 |
children | e22b0213b713 |
comparison
equal
deleted
inserted
replaced
1122:7abc2b15a990 | 1123:37bdd24225ef |
---|---|
2841 | 2841 |
2842 /************************************************************************/ | 2842 /************************************************************************/ |
2843 /* Checking for QUIT */ | 2843 /* Checking for QUIT */ |
2844 /************************************************************************/ | 2844 /************************************************************************/ |
2845 | 2845 |
2846 /* NOTE NOTE NOTE: Invoking QUIT can cause random Lisp code to be executed! | |
2847 This can happen in numerous ways. For example, on many platforms, QUIT | |
2848 needs to drain the event queue to see whether there's a C-g in the works. | |
2849 A side effect of this is that, if there's a menu-press event, menu filters | |
2850 (i.e. Lisp code) will be invoked. Lisp code could also happen if there's | |
2851 an asynchronous timeout, or if the debugger is invoked as a result of | |
2852 debug-on-quit and the user returns by hitting `r', etc. etc. | |
2853 | |
2854 However, GC CANNOT HAPPEN. It is forbidden everywhere within the QUIT- | |
2855 processing code, because most callers cannot tolerate GC during QUIT | |
2856 since it's just too prevalent. */ | |
2857 | |
2846 /* The exact workings of this mechanism are described in detail in signal.c. */ | 2858 /* The exact workings of this mechanism are described in detail in signal.c. */ |
2847 | 2859 |
2848 /* Asynchronous events set something_happened, and then are processed | 2860 /* Asynchronous events set something_happened, and then are processed |
2849 within the QUIT macro. At this point, we are guaranteed to not be in | 2861 within the QUIT macro. At this point, we are guaranteed to not be in |
2850 any sensitive code. */ | 2862 any sensitive code. */ |
2895 timers. (#### It seems that, to be slightly more accurate, we | 2907 timers. (#### It seems that, to be slightly more accurate, we |
2896 should also process poll-for-quit timers in the above version. | 2908 should also process poll-for-quit timers in the above version. |
2897 However, this mechanism is inherently approximate, so it really | 2909 However, this mechanism is inherently approximate, so it really |
2898 doesn't matter much.) In the future, it might also include doing a | 2910 doesn't matter much.) In the future, it might also include doing a |
2899 thread context switch. Callers of QUITP generally don't except | 2911 thread context switch. Callers of QUITP generally don't except |
2900 random side effects to happen, so we have this different | 2912 random side effects to happen (#### unfortunately, random side effects |
2901 version. */ | 2913 can happen anyway, e.g. through menu filters -- see comment above), |
2914 so we have this different version. */ | |
2902 #define INTERNAL_QUITP \ | 2915 #define INTERNAL_QUITP \ |
2903 ((something_happened ? check_what_happened () : (void) 0), \ | 2916 ((something_happened ? check_what_happened () : (void) 0), \ |
2904 QUIT_FLAG_SAYS_SHOULD_QUIT) | 2917 QUIT_FLAG_SAYS_SHOULD_QUIT) |
2905 | 2918 |
2906 /* Check quit-flag and quit if it is non-nil. Also do any other things | 2919 /* Check quit-flag and quit if it is non-nil. Also do any other things |
3002 GCPROn() macros. However, if you need to have nested gcpro's, | 3015 GCPROn() macros. However, if you need to have nested gcpro's, |
3003 declare ngcpro1, ngcpro2, ... and use NGCPROn(). If you need | 3016 declare ngcpro1, ngcpro2, ... and use NGCPROn(). If you need |
3004 to nest another level, use nngcpro1, nngcpro2, ... and use | 3017 to nest another level, use nngcpro1, nngcpro2, ... and use |
3005 NNGCPROn(). If you need to nest yet another level, create | 3018 NNGCPROn(). If you need to nest yet another level, create |
3006 the appropriate macros. */ | 3019 the appropriate macros. */ |
3020 | |
3021 /* NOTE: About comments like "This function does not GC": These are there to | |
3022 try to track whether GCPROing is necessary. Strictly speaking, some | |
3023 functions that say this might actually GC, but only when it is never | |
3024 possible to return (more specifically, in the process of signalling an | |
3025 error, the debugger may be invoked, and could GC). For GCPRO purposes, | |
3026 you only have to worry about functions that can GC and then return. | |
3027 The QUIT macro cannot GC any more, although this wasn't true at some point, | |
3028 and so some "This function can GC" comments may be inaccurate. | |
3029 */ | |
3007 | 3030 |
3008 #ifdef DEBUG_GCPRO | 3031 #ifdef DEBUG_GCPRO |
3009 | 3032 |
3010 void debug_gcpro1 (char *, int, struct gcpro *, Lisp_Object *); | 3033 void debug_gcpro1 (char *, int, struct gcpro *, Lisp_Object *); |
3011 void debug_gcpro2 (char *, int, struct gcpro *, struct gcpro *, | 3034 void debug_gcpro2 (char *, int, struct gcpro *, struct gcpro *, |
3682 Lisp_Object save_current_buffer_restore (Lisp_Object); | 3705 Lisp_Object save_current_buffer_restore (Lisp_Object); |
3683 | 3706 |
3684 /* Defined in emacs.c */ | 3707 /* Defined in emacs.c */ |
3685 EXFUN (Fkill_emacs, 1); | 3708 EXFUN (Fkill_emacs, 1); |
3686 EXFUN (Frunning_temacs_p, 0); | 3709 EXFUN (Frunning_temacs_p, 0); |
3710 EXFUN (Fforce_debugging_signal, 1); | |
3687 | 3711 |
3688 SIGTYPE fatal_error_signal (int); | 3712 SIGTYPE fatal_error_signal (int); |
3689 Lisp_Object make_arg_list (int, Extbyte **); | 3713 Lisp_Object make_arg_list (int, Extbyte **); |
3690 void make_argc_argv (Lisp_Object, int *, Extbyte ***); | 3714 void make_argc_argv (Lisp_Object, int *, Extbyte ***); |
3691 void free_argc_argv (Extbyte **); | 3715 void free_argc_argv (Extbyte **); |