From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: noverlay branch Date: Wed, 12 Oct 2022 14:02:02 -0400 Message-ID: References: <87sfjzefvv.fsf@rfc20.org> <875ygt6gbj.fsf@rfc20.org> <87pmf04c7s.fsf@rfc20.org> <87sfjvvx7g.fsf@rfc20.org> <87fsfuw85t.fsf@rfc20.org> <87czaxwreu.fsf@rfc20.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9572"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Matt Armstrong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Oct 12 20:04:32 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oig5n-00029i-09 for ged-emacs-devel@m.gmane-mx.org; Wed, 12 Oct 2022 20:04:31 +0200 Original-Received: from localhost ([::1]:50952 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oig5l-0002NE-MS for ged-emacs-devel@m.gmane-mx.org; Wed, 12 Oct 2022 14:04:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46490) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oig3W-0001d3-RK for emacs-devel@gnu.org; Wed, 12 Oct 2022 14:02:10 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:5555) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oig3S-0007Mc-EM for emacs-devel@gnu.org; Wed, 12 Oct 2022 14:02:10 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id BEABA80799; Wed, 12 Oct 2022 14:02:04 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 500D380091; Wed, 12 Oct 2022 14:02:03 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1665597723; bh=TTlkZvd2yikYj/cF/3gZm2nHFFqQ9JRY78/SMhEaNA0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=JV2Dj/4nKqr5iTN5BGHTuDanbJEbFxM7Jf/pVy65YE6OywATgJxAifGwO6t8HG2sT cjYEvACKtQPyXZUwBYlD6U2WOiWwPEN9Zk+xgyPQZg+aeQAnkAKigpWVq3Eg4inUDu w5ahSty/OcZQO1VSfZa2A1/FnKtsksadqAzhMEzJVgq6nnZKjFjWAQj4bItVUl/7He rnZGMAV4EtvvokKq3bHTjU0NWaH8WIar5yUG96el3RVDE2vzCPfO2fOKdG8nPH1O+8 DNdnYdaeUGQwS2n6Nq1+0vaHTFQOG58zmt354u7zcSskDIw5veT8ddAGJjjXEAR15N XYqybKgbef3LQ== Original-Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 2766B120D85; Wed, 12 Oct 2022 14:02:03 -0400 (EDT) In-Reply-To: <87czaxwreu.fsf@rfc20.org> (Matt Armstrong's message of "Tue, 11 Oct 2022 22:18:49 -0700") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:297626 Archived-At: > --- a/src/itree.c > +++ b/src/itree.c > @@ -307,6 +307,7 @@ check_tree (struct interval_tree *tree, > if (tree->root == ITREE_NULL) > return true; > eassert (tree->root->parent == ITREE_NULL); > + eassert (!check_red_black_invariants || !tree->root->red); > > struct interval_node *node = tree->root; > struct check_subtree_result result Does any part of the code care about that? I can't see anything that would break if this invariant is not satisfied (both in terms of correct behavior and in terms of performance). IOW it seems more like an accident than something important would should check. > { > eassert (left_result.black_height == right_result.black_height); > - eassert (node->parent != ITREE_NULL || !node->red || !node->parent->red); > + eassert (node->parent == ITREE_NULL || !node->red > + || !node->parent->red); > } Duh! Thanks, Stefan