unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Andrea Corallo via "Emacs development discussions." <emacs-devel@gnu.org>
To: Pip Cet <pipcet@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: feature/native-comp c60f2f4: Fix `comp-cstr-intersection-no-hashcons' for negated result cstr
Date: Sun, 07 Mar 2021 07:04:40 +0000	[thread overview]
Message-ID: <xjfv9a31m2f.fsf@sdf.org> (raw)
In-Reply-To: <CAOqdjBeps0NSddbEDRHL=0gyDXR=ABE63b7zWKCZvOQn1mjYVQ@mail.gmail.com> (Pip Cet's message of "Sun, 7 Mar 2021 06:55:16 +0000")

Pip Cet <pipcet@gmail.com> writes:

> On Sat, Mar 6, 2021 at 10:17 PM Andrea Corallo <akrl@savannah.gnu.org> wrote:
>> branch: feature/native-comp
>> commit c60f2f458a63a8ae4288652228f24e43fdc7bba7
>> Author: Andrea Corallo <akrl@sdf.org>
>> Commit: Andrea Corallo <akrl@sdf.org>
>>
>>     Fix `comp-cstr-intersection-no-hashcons' for negated result cstr
>>
>>         * lisp/emacs-lisp/comp-cstr.el
>>         (comp-cstr-intersection-no-hashcons): When negated and
>>         necessary relax dst to t.
>>         * test/src/comp-tests.el (comp-tests-type-spec-tests): Add a test.
>> ---
>>  lisp/emacs-lisp/comp-cstr.el | 32 +++++++++++++++++++-------------
>>  test/src/comp-tests.el       |  9 ++++++++-
>>  2 files changed, 27 insertions(+), 14 deletions(-)
>>
>> diff --git a/lisp/emacs-lisp/comp-cstr.el b/lisp/emacs-lisp/comp-cstr.el
>> index d6423ef..4397a91 100644
>> --- a/lisp/emacs-lisp/comp-cstr.el
>> +++ b/lisp/emacs-lisp/comp-cstr.el
>> @@ -1001,20 +1001,26 @@ promoted to their types.
>>  DST is returned."
>>    (with-comp-cstr-accessors
>>      (apply #'comp-cstr-intersection dst srcs)
>
> I still think this code is incorrect, because it does an eq/eql-based
> intersection first and tries to relax the constraint later. Consider
>
> (let ((comp-ctxt (make-comp-cstr-ctxt)))
>   (comp-cstr-intersection-no-hashcons
>    (make-comp-cstr)
>    (comp-value-to-cstr '(a))
>    (comp-value-to-cstr '(a))))
>
> That should return a constraint matching all (or many) conses, right?
> It returns an empty constraint.

I think you are right, will have a look into this evening.

Thanks

  Andrea



      reply	other threads:[~2021-03-07  7:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210306221735.5128.9787@vcs0.savannah.gnu.org>
     [not found] ` <20210306221736.5E86020A10@vcs0.savannah.gnu.org>
2021-03-07  6:55   ` feature/native-comp c60f2f4: Fix `comp-cstr-intersection-no-hashcons' for negated result cstr Pip Cet
2021-03-07  7:04     ` Andrea Corallo via Emacs development discussions. [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xjfv9a31m2f.fsf@sdf.org \
    --to=emacs-devel@gnu.org \
    --cc=akrl@sdf.org \
    --cc=pipcet@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).