emacs-devel
[Top][All Lists]
Advanced

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

Re: Lisp watchpoints


From: Stefan Monnier
Subject: Re: Lisp watchpoints
Date: Sun, 29 Nov 2015 17:24:46 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

>> The let-binding is currently trapped, but not the corresponding
>> unbinding.  Is it better to skip both?  As far as I can tell, it's not
>> feasible to trap the unbinding.

The unbinding currently doesn't check CONSTANT_P, but that's just an
optimization that becomes invalid for trapped variables.  I don't see
why we couldn't trap the unbinding just like we trap the binding (at
the cost of an extra check of the `trapped' attribute).

In terms of debugging, I think trapping let-binding and let-unbinding is
definitely useful, so I think it's worth the effort to try and catch
both cases.

> I should clarify that this only applies to dynamically-bound
> variables, lexical variables are never trapped.

Yes, that's normal and right.  Fundamentally, lexical variables are
anonymous, anyway.


        Stefan



reply via email to

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