* src/lisp.h (struct backtrace): Remove indirection for `function' field.
* src/xdisp.c (redisplay_internal): * src/profiler.c (record_backtrace, sigprof_handler_1): * src/alloc.c (Fgarbage_collect): * src/eval.c (interactive_p, Fsignal, eval_sub, Ffuncall, Fbacktrace) (Fbacktrace_frame): Adjust accordingly.
This commit is contained in:
parent
277f0cfa8b
commit
e7c1b6ef85
7 changed files with 33 additions and 24 deletions
|
@ -11,7 +11,7 @@
|
|||
;;;;;; cl--map-overlays cl--map-intervals cl--map-keymap-recursively
|
||||
;;;;;; cl-notevery cl-notany cl-every cl-some cl-mapcon cl-mapcan
|
||||
;;;;;; cl-mapl cl-maplist cl-map cl--mapcar-many cl-equalp cl-coerce)
|
||||
;;;;;; "cl-extra" "cl-extra.el" "535a24c1cff55a16e3d51219498a7858")
|
||||
;;;;;; "cl-extra" "cl-extra.el" "1572ae52fa4fbd9c4bf89b49a068a865")
|
||||
;;; Generated autoloads from cl-extra.el
|
||||
|
||||
(autoload 'cl-coerce "cl-extra" "\
|
||||
|
@ -260,7 +260,7 @@ Remove from SYMBOL's plist the property PROPNAME and its value.
|
|||
;;;;;; cl-typecase cl-ecase cl-case cl-load-time-value cl-eval-when
|
||||
;;;;;; cl-destructuring-bind cl-function cl-defmacro cl-defun cl-gentemp
|
||||
;;;;;; cl-gensym cl--compiler-macro-cXXr cl--compiler-macro-list*)
|
||||
;;;;;; "cl-macs" "cl-macs.el" "6d0676869af66e5b5a671f95ee069461")
|
||||
;;;;;; "cl-macs" "cl-macs.el" "da92f58f688ff6fb4d0098eb0f3acf0b")
|
||||
;;; Generated autoloads from cl-macs.el
|
||||
|
||||
(autoload 'cl--compiler-macro-list* "cl-macs" "\
|
||||
|
@ -748,7 +748,7 @@ surrounded by (cl-block NAME ...).
|
|||
;;;;;; cl-nsubstitute-if cl-nsubstitute cl-substitute-if-not cl-substitute-if
|
||||
;;;;;; cl-substitute cl-delete-duplicates cl-remove-duplicates cl-delete-if-not
|
||||
;;;;;; cl-delete-if cl-delete cl-remove-if-not cl-remove-if cl-remove
|
||||
;;;;;; cl-replace cl-fill cl-reduce) "cl-seq" "cl-seq.el" "b444601641dcbd14a23ca5182bc80ffa")
|
||||
;;;;;; cl-replace cl-fill cl-reduce) "cl-seq" "cl-seq.el" "4c1e1191e82dc8d5449a5ec4d59efc10")
|
||||
;;; Generated autoloads from cl-seq.el
|
||||
|
||||
(autoload 'cl-reduce "cl-seq" "\
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
2012-09-29 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* lisp.h (struct backtrace): Remove indirection for `function' field.
|
||||
* xdisp.c (redisplay_internal):
|
||||
* profiler.c (record_backtrace, sigprof_handler_1):
|
||||
* alloc.c (Fgarbage_collect):
|
||||
* eval.c (interactive_p, Fsignal, eval_sub, Ffuncall, Fbacktrace)
|
||||
(Fbacktrace_frame): Adjust accordingly.
|
||||
|
||||
2012-09-28 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* eval.c (Frun_hook_with_args, Frun_hook_with_args_until_success)
|
||||
|
|
|
@ -5112,8 +5112,8 @@ See Info node `(elisp)Garbage Collection'. */)
|
|||
|
||||
/* Record this function, so it appears on the profiler's backtraces. */
|
||||
backtrace.next = backtrace_list;
|
||||
backtrace.function = &Qautomatic_gc;
|
||||
backtrace.args = &Qautomatic_gc;
|
||||
backtrace.function = Qautomatic_gc;
|
||||
backtrace.args = &Qnil;
|
||||
backtrace.nargs = 0;
|
||||
backtrace.debug_on_exit = 0;
|
||||
backtrace_list = &backtrace;
|
||||
|
|
28
src/eval.c
28
src/eval.c
|
@ -552,7 +552,7 @@ interactive_p (void)
|
|||
|
||||
/* If this isn't a byte-compiled function, there may be a frame at
|
||||
the top for Finteractive_p. If so, skip it. */
|
||||
fun = Findirect_function (*btp->function, Qnil);
|
||||
fun = Findirect_function (btp->function, Qnil);
|
||||
if (SUBRP (fun) && (XSUBR (fun) == &Sinteractive_p
|
||||
|| XSUBR (fun) == &Scalled_interactively_p))
|
||||
btp = btp->next;
|
||||
|
@ -565,7 +565,7 @@ interactive_p (void)
|
|||
If this isn't a byte-compiled function, then we may now be
|
||||
looking at several frames for special forms. Skip past them. */
|
||||
while (btp
|
||||
&& (EQ (*btp->function, Qbytecode)
|
||||
&& (EQ (btp->function, Qbytecode)
|
||||
|| btp->nargs == UNEVALLED))
|
||||
btp = btp->next;
|
||||
|
||||
|
@ -573,13 +573,13 @@ interactive_p (void)
|
|||
a special form, ignoring frames for Finteractive_p and/or
|
||||
Fbytecode at the top. If this frame is for a built-in function
|
||||
(such as load or eval-region) return false. */
|
||||
fun = Findirect_function (*btp->function, Qnil);
|
||||
fun = Findirect_function (btp->function, Qnil);
|
||||
if (SUBRP (fun))
|
||||
return 0;
|
||||
|
||||
/* `btp' points to the frame of a Lisp function that called interactive-p.
|
||||
Return t if that function was called interactively. */
|
||||
if (btp && btp->next && EQ (*btp->next->function, Qcall_interactively))
|
||||
if (btp && btp->next && EQ (btp->next->function, Qcall_interactively))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
@ -1496,10 +1496,10 @@ See also the function `condition-case'. */)
|
|||
if (backtrace_list && !NILP (error_symbol))
|
||||
{
|
||||
bp = backtrace_list->next;
|
||||
if (bp && bp->function && EQ (*bp->function, Qerror))
|
||||
if (bp && EQ (bp->function, Qerror))
|
||||
bp = bp->next;
|
||||
if (bp && bp->function)
|
||||
Vsignaling_function = *bp->function;
|
||||
if (bp)
|
||||
Vsignaling_function = bp->function;
|
||||
}
|
||||
|
||||
for (h = handlerlist; h; h = h->next)
|
||||
|
@ -1510,7 +1510,7 @@ See also the function `condition-case'. */)
|
|||
}
|
||||
|
||||
if (/* Don't run the debugger for a memory-full error.
|
||||
(There is no room in memory to do that!) */
|
||||
(There is no room in memory to do that!) */
|
||||
!NILP (error_symbol)
|
||||
&& (!NILP (Vdebug_on_signal)
|
||||
/* If no handler is present now, try to run the debugger. */
|
||||
|
@ -2045,7 +2045,7 @@ eval_sub (Lisp_Object form)
|
|||
original_args = XCDR (form);
|
||||
|
||||
backtrace.next = backtrace_list;
|
||||
backtrace.function = &original_fun; /* This also protects them from gc. */
|
||||
backtrace.function = original_fun; /* This also protects them from gc. */
|
||||
backtrace.args = &original_args;
|
||||
backtrace.nargs = UNEVALLED;
|
||||
backtrace.debug_on_exit = 0;
|
||||
|
@ -2713,7 +2713,7 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */)
|
|||
}
|
||||
|
||||
backtrace.next = backtrace_list;
|
||||
backtrace.function = &args[0];
|
||||
backtrace.function = args[0];
|
||||
backtrace.args = &args[1]; /* This also GCPROs them. */
|
||||
backtrace.nargs = nargs - 1;
|
||||
backtrace.debug_on_exit = 0;
|
||||
|
@ -3289,12 +3289,12 @@ Output stream used is value of `standard-output'. */)
|
|||
write_string (backlist->debug_on_exit ? "* " : " ", 2);
|
||||
if (backlist->nargs == UNEVALLED)
|
||||
{
|
||||
Fprin1 (Fcons (*backlist->function, *backlist->args), Qnil);
|
||||
Fprin1 (Fcons (backlist->function, *backlist->args), Qnil);
|
||||
write_string ("\n", -1);
|
||||
}
|
||||
else
|
||||
{
|
||||
tem = *backlist->function;
|
||||
tem = backlist->function;
|
||||
Fprin1 (tem, Qnil); /* This can QUIT. */
|
||||
write_string ("(", -1);
|
||||
if (backlist->nargs == MANY)
|
||||
|
@ -3352,7 +3352,7 @@ If NFRAMES is more than the number of frames, the value is nil. */)
|
|||
if (!backlist)
|
||||
return Qnil;
|
||||
if (backlist->nargs == UNEVALLED)
|
||||
return Fcons (Qnil, Fcons (*backlist->function, *backlist->args));
|
||||
return Fcons (Qnil, Fcons (backlist->function, *backlist->args));
|
||||
else
|
||||
{
|
||||
if (backlist->nargs == MANY) /* FIXME: Can this happen? */
|
||||
|
@ -3360,7 +3360,7 @@ If NFRAMES is more than the number of frames, the value is nil. */)
|
|||
else
|
||||
tem = Flist (backlist->nargs, backlist->args);
|
||||
|
||||
return Fcons (Qt, Fcons (*backlist->function, tem));
|
||||
return Fcons (Qt, Fcons (backlist->function, tem));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2034,7 +2034,7 @@ extern ptrdiff_t specpdl_size;
|
|||
struct backtrace
|
||||
{
|
||||
struct backtrace *next;
|
||||
Lisp_Object *function;
|
||||
Lisp_Object function;
|
||||
Lisp_Object *args; /* Points to vector of args. */
|
||||
ptrdiff_t nargs; /* Length of vector. */
|
||||
/* Nonzero means call value of debugger when done with this operation. */
|
||||
|
|
|
@ -149,7 +149,7 @@ record_backtrace (log_t *log, size_t count)
|
|||
/* Copy the backtrace contents into working memory. */
|
||||
for (; i < asize && backlist; i++, backlist = backlist->next)
|
||||
/* FIXME: For closures we should ignore the environment. */
|
||||
ASET (backtrace, i, *backlist->function);
|
||||
ASET (backtrace, i, backlist->function);
|
||||
|
||||
/* Make sure that unused space of working memory is filled with nil. */
|
||||
for (; i < asize; i++)
|
||||
|
@ -218,7 +218,7 @@ static void
|
|||
sigprof_handler_1 (int signal)
|
||||
{
|
||||
eassert (HASH_TABLE_P (cpu_log));
|
||||
if (backtrace_list && EQ (*backtrace_list->function, Qautomatic_gc))
|
||||
if (backtrace_list && EQ (backtrace_list->function, Qautomatic_gc))
|
||||
/* Special case the time-count inside GC because the hash-table
|
||||
code is not prepared to be used while the GC is running.
|
||||
More specifically it uses ASIZE at many places where it does
|
||||
|
|
|
@ -12975,8 +12975,8 @@ redisplay_internal (void)
|
|||
|
||||
/* Record this function, so it appears on the profiler's backtraces. */
|
||||
backtrace.next = backtrace_list;
|
||||
backtrace.function = &Qredisplay_internal;
|
||||
backtrace.args = &Qredisplay_internal;
|
||||
backtrace.function = Qredisplay_internal;
|
||||
backtrace.args = &Qnil;
|
||||
backtrace.nargs = 0;
|
||||
backtrace.debug_on_exit = 0;
|
||||
backtrace_list = &backtrace;
|
||||
|
|
Loading…
Add table
Reference in a new issue