annotate src/profile.h @ 5366:f00192e1cd49

Examining the result of #'length: `eql', not `=', it's better style & cheaper 2011-03-08 Aidan Kehoe <kehoea@parhasard.net> * buff-menu.el (list-buffers-noselect): * byte-optimize.el (byte-optimize-identity): * byte-optimize.el (byte-optimize-if): * byte-optimize.el (byte-optimize-nth): * byte-optimize.el (byte-optimize-nthcdr): * bytecomp.el (byte-compile-warn-wrong-args): * bytecomp.el (byte-compile-two-args-19->20): * bytecomp.el (byte-compile-list): * bytecomp.el (byte-compile-beginning-of-line): * bytecomp.el (byte-compile-set): * bytecomp.el (byte-compile-set-default): * bytecomp.el (byte-compile-values): * bytecomp.el (byte-compile-values-list): * bytecomp.el (byte-compile-integerp): * bytecomp.el (byte-compile-multiple-value-list-internal): * bytecomp.el (byte-compile-throw): * cl-macs.el (cl-do-arglist): * cl-macs.el (cl-parse-loop-clause): * cl-macs.el (multiple-value-bind): * cl-macs.el (multiple-value-setq): * cl-macs.el (get-setf-method): * cmdloop.el (command-error): * cmdloop.el (y-or-n-p-minibuf): * cmdloop.el (yes-or-no-p-minibuf): * coding.el (unencodable-char-position): * cus-edit.el (custom-face-prompt): * cus-edit.el (custom-buffer-create-internal): * cus-edit.el (widget-face-action): * cus-edit.el (custom-group-value-create): * descr-text.el (describe-char-unicode-data): * dialog-gtk.el (popup-builtin-question-dialog): * dragdrop.el (experimental-dragdrop-drop-log-function): * dragdrop.el (experimental-dragdrop-drop-mime-default): * easymenu.el (easy-menu-add): * easymenu.el (easy-menu-remove): * faces.el (read-face-name): * faces.el (set-face-stipple): * files.el (file-name-non-special): * font.el (font-combine-fonts): * font.el (font-set-face-font): * font.el (font-parse-rgb-components): * font.el (font-rgb-color-p): * font.el (font-color-rgb-components): * gnuserv.el (gnuserv-edit-files): * help.el (key-or-menu-binding): * help.el (function-documentation-1): * help.el (function-documentation): * info.el (info): * isearch-mode.el (isearch-exit): * isearch-mode.el (isearch-edit-string): * isearch-mode.el (isearch-*-char): * isearch-mode.el (isearch-complete1): * ldap.el (ldap-encode-country-string): * ldap.el (ldap-decode-string): * minibuf.el (read-file-name-internal-1): * minibuf.el (read-non-nil-coding-system): * minibuf.el (get-user-response): * mouse.el (drag-window-divider): * mule/ccl.el: * mule/ccl.el (ccl-compile-if): * mule/ccl.el (ccl-compile-break): * mule/ccl.el (ccl-compile-repeat): * mule/ccl.el (ccl-compile-write-repeat): * mule/ccl.el (ccl-compile-call): * mule/ccl.el (ccl-compile-end): * mule/ccl.el (ccl-compile-read-multibyte-character): * mule/ccl.el (ccl-compile-write-multibyte-character): * mule/ccl.el (ccl-compile-translate-character): * mule/ccl.el (ccl-compile-mule-to-unicode): * mule/ccl.el (ccl-compile-unicode-to-mule): * mule/ccl.el (ccl-compile-lookup-integer): * mule/ccl.el (ccl-compile-lookup-character): * mule/ccl.el (ccl-compile-map-multiple): * mule/ccl.el (ccl-compile-map-single): * mule/devan-util.el (devanagari-compose-to-one-glyph): * mule/devan-util.el (devanagari-composition-component): * mule/mule-cmds.el (finish-set-language-environment): * mule/viet-util.el: * mule/viet-util.el (viet-encode-viscii-char): * multicast.el (open-multicast-group): * newcomment.el (comment-quote-nested): * newcomment.el (comment-region): * newcomment.el (comment-dwim): * regexp-opt.el (regexp-opt-group): * replace.el (map-query-replace-regexp): * specifier.el (derive-device-type-from-tag-set): * subr.el (skip-chars-quote): * test-harness.el (test-harness-from-buffer): * test-harness.el (batch-test-emacs): * wid-edit.el (widget-choice-action): * wid-edit.el (widget-symbol-prompt-internal): * wid-edit.el (widget-color-action): * window-xemacs.el (push-window-configuration): * window-xemacs.el (pop-window-configuration): * window.el (quit-window): * x-compose.el (electric-diacritic): It's better style, and cheaper (often one assembler instruction vs. a C funcall in the byte code), to use `eql' instead of `=' when it's clear what numerical type a given result will be. Change much of our code to do this, with the help of a byte-compiler change (not comitted) that looked for calls to #'length (which always returns an integer) in its args.
author Aidan Kehoe <kehoea@parhasard.net>
date Tue, 08 Mar 2011 23:41:52 +0000
parents 8f6a825eb3d3
children 308d34e9f07d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1292
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
1 /* Profiling.
3025
facf3239ba30 [xemacs-hg @ 2005-10-25 11:16:19 by ben]
ben
parents: 2514
diff changeset
2 Copyright (C) 2003, 2005 Ben Wing.
1292
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
3
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
4 This file is part of XEmacs.
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
5
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
6 XEmacs is free software; you can redistribute it and/or modify it
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
7 under the terms of the GNU General Public License as published by the
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
8 Free Software Foundation; either version 2, or (at your option) any
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
9 later version.
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
10
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
11 XEmacs is distributed in the hope that it will be useful, but WITHOUT
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
14 for more details.
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
15
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
17 along with XEmacs; see the file COPYING. If not, write to
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
19 Boston, MA 02111-1307, USA. */
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
20
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
21 /* Synched up with: Not in FSF. */
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
22
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
23 /* Authorship:
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
24
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
25 Ben Wing: Feb 2003.
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
26 */
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
27
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
28 #include "backtrace.h"
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
29
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
30 void mark_profiling_info (void);
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
31 void profile_record_unwind (struct backtrace *);
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
32 void profile_record_about_to_call (struct backtrace *);
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
33 void profile_record_just_called (struct backtrace *);
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
34 void profile_record_consing (EMACS_INT size);
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
35 void profile_record_unconsing (EMACS_INT size);
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
36 extern int profiling_active;
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
37
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
38 /* We call about_to_call() and just_called() depending on the current
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
39 *dynamic* value of profiling_active (which could change as a result of
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
40 calling the function) but if we push a backtrace, we must pop it later,
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
41 so we need to remember the status of this. */
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
42 #define PROFILE_DECLARE() \
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
43 int do_backtrace = profiling_active || backtrace_with_internal_sections; \
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
44 struct backtrace backtrace
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
45
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
46 /* As just mentioned, we rely on the dynamic value of profiling_active.
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
47 This ensures correct behavior (e.g. we never modify the profiling info
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
48 when profiling is not active) because we seed and reap all functions
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
49 currently on the stack when starting and stopping. See
4162
8f6a825eb3d3 [xemacs-hg @ 2007-09-04 21:20:18 by aidan]
aidan
parents: 3282
diff changeset
50 `start-profiling'.
8f6a825eb3d3 [xemacs-hg @ 2007-09-04 21:20:18 by aidan]
aidan
parents: 3282
diff changeset
51
8f6a825eb3d3 [xemacs-hg @ 2007-09-04 21:20:18 by aidan]
aidan
parents: 3282
diff changeset
52 We check do_backtrace to make sure that the backtrace structure is
8f6a825eb3d3 [xemacs-hg @ 2007-09-04 21:20:18 by aidan]
aidan
parents: 3282
diff changeset
53 initialised. If it isn't, we can enter a function with profiling turned
8f6a825eb3d3 [xemacs-hg @ 2007-09-04 21:20:18 by aidan]
aidan
parents: 3282
diff changeset
54 off, and exit it with it turned on, with the consequence that an
8f6a825eb3d3 [xemacs-hg @ 2007-09-04 21:20:18 by aidan]
aidan
parents: 3282
diff changeset
55 unitialised backtrace structure is passed to
8f6a825eb3d3 [xemacs-hg @ 2007-09-04 21:20:18 by aidan]
aidan
parents: 3282
diff changeset
56 profile_record_just_called. Since do_backtrace is function-local (apart
8f6a825eb3d3 [xemacs-hg @ 2007-09-04 21:20:18 by aidan]
aidan
parents: 3282
diff changeset
57 from in the garbage collector) this avoids that. */
1292
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
58 #define PROFILE_ENTER_FUNCTION() \
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
59 do \
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
60 { \
4162
8f6a825eb3d3 [xemacs-hg @ 2007-09-04 21:20:18 by aidan]
aidan
parents: 3282
diff changeset
61 if (profiling_active && do_backtrace) \
1292
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
62 profile_record_about_to_call (&backtrace); \
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
63 } \
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
64 while (0)
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
65
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
66 #define PROFILE_EXIT_FUNCTION() \
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
67 do \
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
68 { \
4162
8f6a825eb3d3 [xemacs-hg @ 2007-09-04 21:20:18 by aidan]
aidan
parents: 3282
diff changeset
69 if (profiling_active && do_backtrace) \
1292
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
70 profile_record_just_called (&backtrace); \
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
71 } \
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
72 while (0)
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
73
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
74 /* We are entering a section that we would like to record profile information
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
75 about. We put this information into the backtrace list, just like
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
76 normal functions do. That is one easy way to make sure that we always
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
77 record info on the innermost section or function, whether section or
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
78 function. (To do this, we always need some sort of collusion between
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
79 profile and eval; this is one way.) */
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
80
3025
facf3239ba30 [xemacs-hg @ 2005-10-25 11:16:19 by ben]
ben
parents: 2514
diff changeset
81 /* Or, we could call xzero() to zero the whole thing, and avoid four
facf3239ba30 [xemacs-hg @ 2005-10-25 11:16:19 by ben]
ben
parents: 2514
diff changeset
82 of the statements below; or we could create a global backtrace object,
facf3239ba30 [xemacs-hg @ 2005-10-25 11:16:19 by ben]
ben
parents: 2514
diff changeset
83 uninitialized (i.e. it will be initialized to all 0), and do structure
facf3239ba30 [xemacs-hg @ 2005-10-25 11:16:19 by ben]
ben
parents: 2514
diff changeset
84 copy to initialize. It's not clear it will make much difference here,
facf3239ba30 [xemacs-hg @ 2005-10-25 11:16:19 by ben]
ben
parents: 2514
diff changeset
85 but someone who really cared about counting cycles could implement it. */
1292
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
86 #define PROFILE_RECORD_ENTERING_SECTION(var) \
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
87 do \
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
88 { \
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
89 if (do_backtrace) \
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
90 { \
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
91 backtrace.function = &var; \
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
92 backtrace.args = NULL; \
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
93 backtrace.nargs = UNEVALLED; \
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
94 backtrace.evalargs = 0; \
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
95 backtrace.pdlcount = specpdl_depth (); \
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
96 backtrace.debug_on_exit = 0; \
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
97 backtrace.function_being_called = 0; \
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
98 PUSH_BACKTRACE (backtrace); \
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
99 } \
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
100 PROFILE_ENTER_FUNCTION (); \
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
101 } while (0)
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
102
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
103 #define PROFILE_RECORD_EXITING_SECTION(var) \
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
104 do \
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
105 { \
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
106 PROFILE_EXIT_FUNCTION (); \
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
107 if (do_backtrace) \
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
108 POP_BACKTRACE (backtrace); \
f3437b56874d [xemacs-hg @ 2003-02-13 09:57:04 by ben]
ben
parents:
diff changeset
109 } while (0)
2514
b49d38bc659d [xemacs-hg @ 2005-01-26 10:09:19 by ben]
ben
parents: 1292
diff changeset
110
b49d38bc659d [xemacs-hg @ 2005-01-26 10:09:19 by ben]
ben
parents: 1292
diff changeset
111 #define RETURN_EXIT_PROFILING(tag, type, expr) \
b49d38bc659d [xemacs-hg @ 2005-01-26 10:09:19 by ben]
ben
parents: 1292
diff changeset
112 do \
b49d38bc659d [xemacs-hg @ 2005-01-26 10:09:19 by ben]
ben
parents: 1292
diff changeset
113 { \
b49d38bc659d [xemacs-hg @ 2005-01-26 10:09:19 by ben]
ben
parents: 1292
diff changeset
114 type _ret_exitpr_ = (expr); \
b49d38bc659d [xemacs-hg @ 2005-01-26 10:09:19 by ben]
ben
parents: 1292
diff changeset
115 PROFILE_RECORD_EXITING_SECTION (tag); \
b49d38bc659d [xemacs-hg @ 2005-01-26 10:09:19 by ben]
ben
parents: 1292
diff changeset
116 RETURN_SANS_WARNINGS _ret_exitpr_; \
b49d38bc659d [xemacs-hg @ 2005-01-26 10:09:19 by ben]
ben
parents: 1292
diff changeset
117 } while (0)
b49d38bc659d [xemacs-hg @ 2005-01-26 10:09:19 by ben]
ben
parents: 1292
diff changeset
118
b49d38bc659d [xemacs-hg @ 2005-01-26 10:09:19 by ben]
ben
parents: 1292
diff changeset
119 #define RETURN_LISP_EXIT_PROFILING(tag, expr) \
b49d38bc659d [xemacs-hg @ 2005-01-26 10:09:19 by ben]
ben
parents: 1292
diff changeset
120 RETURN_EXIT_PROFILING (tag, Lisp_Object, expr)
b49d38bc659d [xemacs-hg @ 2005-01-26 10:09:19 by ben]
ben
parents: 1292
diff changeset
121
b49d38bc659d [xemacs-hg @ 2005-01-26 10:09:19 by ben]
ben
parents: 1292
diff changeset
122 #define RETURN_UNGCPRO_EXIT_PROFILING(tag, expr) \
3282
390dee4913ba [xemacs-hg @ 2006-03-14 19:31:41 by james]
james
parents: 3025
diff changeset
123 do \
2514
b49d38bc659d [xemacs-hg @ 2005-01-26 10:09:19 by ben]
ben
parents: 1292
diff changeset
124 { \
b49d38bc659d [xemacs-hg @ 2005-01-26 10:09:19 by ben]
ben
parents: 1292
diff changeset
125 Lisp_Object ret_ungc_val = (expr); \
b49d38bc659d [xemacs-hg @ 2005-01-26 10:09:19 by ben]
ben
parents: 1292
diff changeset
126 UNGCPRO; \
b49d38bc659d [xemacs-hg @ 2005-01-26 10:09:19 by ben]
ben
parents: 1292
diff changeset
127 PROFILE_RECORD_EXITING_SECTION (tag); \
b49d38bc659d [xemacs-hg @ 2005-01-26 10:09:19 by ben]
ben
parents: 1292
diff changeset
128 RETURN_SANS_WARNINGS ret_ungc_val; \
b49d38bc659d [xemacs-hg @ 2005-01-26 10:09:19 by ben]
ben
parents: 1292
diff changeset
129 } while (0)
b49d38bc659d [xemacs-hg @ 2005-01-26 10:09:19 by ben]
ben
parents: 1292
diff changeset
130
b49d38bc659d [xemacs-hg @ 2005-01-26 10:09:19 by ben]
ben
parents: 1292
diff changeset
131 #ifdef DEBUG_XEMACS
b49d38bc659d [xemacs-hg @ 2005-01-26 10:09:19 by ben]
ben
parents: 1292
diff changeset
132 extern Lisp_Object QSin_temp_spot_1;
b49d38bc659d [xemacs-hg @ 2005-01-26 10:09:19 by ben]
ben
parents: 1292
diff changeset
133 extern Lisp_Object QSin_temp_spot_2;
b49d38bc659d [xemacs-hg @ 2005-01-26 10:09:19 by ben]
ben
parents: 1292
diff changeset
134 extern Lisp_Object QSin_temp_spot_3;
b49d38bc659d [xemacs-hg @ 2005-01-26 10:09:19 by ben]
ben
parents: 1292
diff changeset
135 extern Lisp_Object QSin_temp_spot_4;
b49d38bc659d [xemacs-hg @ 2005-01-26 10:09:19 by ben]
ben
parents: 1292
diff changeset
136 extern Lisp_Object QSin_temp_spot_5;
b49d38bc659d [xemacs-hg @ 2005-01-26 10:09:19 by ben]
ben
parents: 1292
diff changeset
137 #endif /* DEBUG_XEMACS */