emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] feature/byte-unwind-protect 916094a 2/2: Add new bytec


From: Tom Tromey
Subject: Re: [Emacs-diffs] feature/byte-unwind-protect 916094a 2/2: Add new bytecodes for unwind-protect
Date: Tue, 23 Jan 2018 08:44:47 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.91 (gnu/linux)

>>>>> "Stefan" == Stefan Monnier <address@hidden> writes:

>> +    CASE (Bpushunwindprotect): /* New in 27.1.  */
>> +      {
>> +        struct handler *c = push_handler (Qt, CATCHER_ALL);

Stefan> Hmm... using this "catch+rethrow" method interferes with the
Stefan> debug-on-error stacktrace:

Hmm, yeah.

Any ideas for fixing this?

One idea would be to capture the stack trace when CATCHER_ALL is
targeted, then have a way to pass this to signal or throw.

But often the stack trace isn't needed.

Stefan> I also wonder if there can be places where we call something like
Stefan> `unbind_to` which should run those new unwind-forms but won't find it
Stefan> because it won't look at the handlers [ offhand, I can't think of any
Stefan> place where that would happen, and I think it's probably OK, but
Stefan> I can't quite convince myself that it definitely is.  ]

If this happens then surely it's already a problem for catch and
condition-case?

Stefan> All in all, I'd really prefer if we kept the unwind forms in
Stefan> the specpdl.  Was there a particular reason why you used the
Stefan> handlers instead?

This is how catch and condition-case are implemented.

I do agree there's no reason to have a separate handler list.  In fact
this puzzled me for a while.  However I think it's a separate cleanup.

Tom



reply via email to

[Prev in Thread] Current Thread [Next in Thread]