emacs-devel
[Top][All Lists]
Advanced

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

Re: feature/native-comp 5bc0855 2/2: Don't treat '=' as simple equality


From: Pip Cet
Subject: Re: feature/native-comp 5bc0855 2/2: Don't treat '=' as simple equality emitting constraints (bug#46812)
Date: Sun, 7 Mar 2021 07:03:34 +0000

On Sat, Mar 6, 2021 at 10:18 PM Andrea Corallo <akrl@sdf.org> wrote:
> The two reported miscompilations should be fixed now as of c60f2f458a,
> please have a look.

I did. I still don't understand how the intersect-first-then-relax
approach is meant to work, and it's not working.

Here's a more fundamental problem: if we modify two values known to be
equal, they might no longer be:

(let* ((cons1 '(a))
       (cons2 (copy-sequence cons1))
       (cons3 (copy-sequence cons1)))
  (subr-type (native-compile
              `(lambda (x y)
                 (unless (eq x ',cons1)
                   (error ""))
                 (unless (eq y ',cons2)
                   (error ""))
                 (setcar ',cons1 'b)
                 (equal y ',cons3)))))


> Still have to look into the missed optimization for the null returning
> function, will do.

I'm not sure what you're referring to here. My approach, and it's
perfectly okay for you to see this differently, would be to fix the
correctness bugs first, then go for any missed optimizations.

Pip



reply via email to

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