emacs-devel
[Top][All Lists]
Advanced

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

Re: noverlay branch


From: Eli Zaretskii
Subject: Re: noverlay branch
Date: Mon, 10 Oct 2022 09:24:05 +0300

> From: Matt Armstrong <matt@rfc20.org>
> Cc: emacs-devel@gnu.org
> Date: Sun, 09 Oct 2022 19:57:43 -0700
> 
> Subject: [PATCH 2/2] Add ./configure --enable-checking=overlays
> 
> This enables expensive validation checks of overlay data structures.
> Some are too expensive to turn on by default with
> --enable-checking=all since they turn O(log N) algorithms into O(N)
> algorithms.
> 
> * src/itree.c (ENABLE_OVERLAY_CHECKING): define to 0 if undefined.
> (struct check_subtree_result): new struct.
> (check_subtree): renamed from recurse_check_tree, modified to use
> check_subtree_result and check more invariants.
> (check_tree): use check_subtree_result.
> * configure.ac: add support for ENABLE_OVERLAY_CHECKING.

Unless the checks are _very_ expensive, I'd prefer not to introduce
yet another "enable-checking" knob, and instead condition those just
by ENABLE_CHECKING.  This will allow these assertions to be active in
more builds, and will enhance our checking of their conditions.

Please also consider whether we need some checks to be invoked
manually, e.g. when something goes wrong in a session that might be
related to overlays.  E.g., a command that dumps the overlay tree(s)
to stderr could be perhaps useful in such cases.

Thanks.



reply via email to

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