aboutsummaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
authorStefan Monnier2012-09-26 11:19:10 -0400
committerStefan Monnier2012-09-26 11:19:10 -0400
commit3a880af4a79688e90da45311a8d85bae2d59a811 (patch)
tree178e2f4ac5889ad1de54fc02c967f7acb377ce64 /src/eval.c
parent9180598cb164cf32daf0e1761a8143e720460987 (diff)
parent234148bf943ffce55121aefc8694889eb08b0daa (diff)
downloademacs-3a880af4a79688e90da45311a8d85bae2d59a811.tar.gz
emacs-3a880af4a79688e90da45311a8d85bae2d59a811.zip
Merge profiler branch
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/eval.c b/src/eval.c
index 25a41486279..d984331ec41 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -31,17 +31,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
31#include "xterm.h" 31#include "xterm.h"
32#endif 32#endif
33 33
34struct backtrace 34struct backtrace *backtrace_list;
35{
36 struct backtrace *next;
37 Lisp_Object *function;
38 Lisp_Object *args; /* Points to vector of args. */
39 ptrdiff_t nargs; /* Length of vector. */
40 /* Nonzero means call value of debugger when done with this operation. */
41 unsigned int debug_on_exit : 1;
42};
43
44static struct backtrace *backtrace_list;
45 35
46#if !BYTE_MARK_STACK 36#if !BYTE_MARK_STACK
47static 37static
@@ -2055,11 +2045,11 @@ eval_sub (Lisp_Object form)
2055 original_args = XCDR (form); 2045 original_args = XCDR (form);
2056 2046
2057 backtrace.next = backtrace_list; 2047 backtrace.next = backtrace_list;
2058 backtrace_list = &backtrace;
2059 backtrace.function = &original_fun; /* This also protects them from gc. */ 2048 backtrace.function = &original_fun; /* This also protects them from gc. */
2060 backtrace.args = &original_args; 2049 backtrace.args = &original_args;
2061 backtrace.nargs = UNEVALLED; 2050 backtrace.nargs = UNEVALLED;
2062 backtrace.debug_on_exit = 0; 2051 backtrace.debug_on_exit = 0;
2052 backtrace_list = &backtrace;
2063 2053
2064 if (debug_on_next_call) 2054 if (debug_on_next_call)
2065 do_debug_on_call (Qt); 2055 do_debug_on_call (Qt);
@@ -2730,11 +2720,11 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */)
2730 } 2720 }
2731 2721
2732 backtrace.next = backtrace_list; 2722 backtrace.next = backtrace_list;
2733 backtrace_list = &backtrace;
2734 backtrace.function = &args[0]; 2723 backtrace.function = &args[0];
2735 backtrace.args = &args[1]; /* This also GCPROs them. */ 2724 backtrace.args = &args[1]; /* This also GCPROs them. */
2736 backtrace.nargs = nargs - 1; 2725 backtrace.nargs = nargs - 1;
2737 backtrace.debug_on_exit = 0; 2726 backtrace.debug_on_exit = 0;
2727 backtrace_list = &backtrace;
2738 2728
2739 /* Call GC after setting up the backtrace, so the latter GCPROs the args. */ 2729 /* Call GC after setting up the backtrace, so the latter GCPROs the args. */
2740 maybe_gc (); 2730 maybe_gc ();