[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] emacs-24 r117502: Always use matched specpdl entry to
From: |
Stefan Monnier |
Subject: |
Re: [Emacs-diffs] emacs-24 r117502: Always use matched specpdl entry to record call arguments (Bug#18473). |
Date: |
Tue, 16 Sep 2014 10:13:52 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) |
> -void
> +ptrdiff_t
> record_in_backtrace (Lisp_Object function, Lisp_Object *args, ptrdiff_t
> nargs)
> {
> + ptrdiff_t count = SPECPDL_INDEX ();
> +
> eassert (nargs >= UNEVALLED);
> specpdl_ptr-> bt.kind = SPECPDL_BACKTRACE;
> specpdl_ptr-> bt.debug_on_exit = false;
> @@ -2049,6 +2045,8 @@
> specpdl_ptr-> bt.args = args;
> specpdl_ptr-> bt.nargs = nargs;
> grow_specpdl ();
> +
> + return count;
> }
This will slow down every single function call. Not by much, but
they're already pretty slow, so we should work hard not to make it worse.
In this respect, your previous patch (which used backtrace_top instead
of keeping a `count') was better since it only affected *some*
function calls.
Stefan
- Re: [Emacs-diffs] emacs-24 r117502: Always use matched specpdl entry to record call arguments (Bug#18473).,
Stefan Monnier <=