emacs-devel
[Top][All Lists]
Advanced

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

Re: noverlay branch


From: Stefan Monnier
Subject: Re: noverlay branch
Date: Wed, 12 Oct 2022 23:59:25 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

> Thanks Stefan, FWIW I don't see the merges on feature/noverlay yet.
> Have you pushed?

Hmm... I think so, yes.  `git log` tells me:

    commit 65a7b5a802a15daa6274403fef822ec3c9b95469 (HEAD -> noverlay, 
origin/feature/noverlay)
    Author: Matt Armstrong <matt@rfc20.org>
    Date:   Tue Oct 11 20:19:16 2022 -0700
    
        ; * src/itree.c (check_subtree): fix logical error in eassert
    
    commit fda8723be640593a662d7ff9d4900b7f9e56423e
    Author: Matt Armstrong <matt@rfc20.org>
    Date:   Tue Oct 11 20:32:08 2022 -0700
    
        ; * src/itree.c (check_tree): assert that the tree root is black
    
    commit 034d50415858b18b032b116804bfefc1be421bb3
    Author: Matt Armstrong <matt@rfc20.org>
    Date:   Tue Oct 11 11:41:47 2022 -0700
    
        ; * .clang-format: Add ITREE_FOREACH.
    
    commit 12836db6e4e09378d41301b3d4e1fcff58132d3a
    Author: Stefan Monnier <monnier@iro.umontreal.ca>
    Date:   Tue Oct 11 11:17:44 2022 -0400
    
        itree.c (check_tree): Simplify
        
        * src/itree.c (struct check_subtree_result): Remove `complete`.
        (check_subtree): Remove `max_depth` arg (and adjust callers).
        Use 0 as black-depth of empty tree.
        Remove redundant `node->parent` check (already performed by the caller).
        (check_tree): Replace with `check_tree_common` (update all callers).
        Check the root's `parent` field.
        (check_tree_no_rb): Delete function, inlined in its sole caller.
        (interval_tree_remove): Add call to `check_tree` (without RB checks)
        before `interval_tree_remove_fix`.  Move update of `size`
        field accordingly.
    
    commit da0387f0fe79f577fae6d5453c758f600e1ae495
    Author: Matt Armstrong <matt@rfc20.org>
    Date:   Mon Oct 10 10:45:05 2022 -0700
    
        Stop reading and writing the itree_null.parent field entirely.
        
        With this change all fields in the itree_null sentinel are read only.
        This makes accessing itree_null thread safe in an obvious way.
        
        Because it took two commits from two peole to get this right, I think
        we can call this design fragile and difficult to reason about.
        Another benefit of this commit is as preparation for removing sentinel
        node completely, and just using NULL.
        
        * src/itree.c (itree_null): Statically initialize itree_null.parent to
        NULL.  It is never accessed.
        (null_is_sane): Assert parent == NULL.
        (interval_tree_remove_fix): Remove unecessary assignments to parent
        from node->parent.  These were the last places itree_null.parent were
        read.
        (interval_tree_remove): Avoid an assignment to itree_null.parent
        through min->right->parent.
        (interval_tree_transplant): Avoid an assignment to itree_null.parent
        through source->parent.
    [...]


-- Stefan




reply via email to

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