Subject: bug#35770: [PATCH] Broken duplicate case elimination in switch byte-compilation

From: Eli Zaretskii <[email-masked]>
Date: Sun, 26 May 2019 21:43:09 +0300

> From: Mattias Engdegård <[email-masked]>
> Date: Sun, 26 May 2019 19:05:55 +0200
> Cc: Eli Zaretskii <[email-masked]>, Noam Postavsky <[email-masked]>,
>         [email-masked], [email-masked]
> 
> 22 maj 2019 kl. 16.19 skrev Stefan Monnier <[email-masked]>:
> > 
> > turning off byte-compile-cond-use-jump-table by default is the safer way
> > to do that, I think.
> 
> Is the consensus then that the patch is fine for master, and that the switch op generation should be disabled by default in emacs-26? Maybe with an explanation in the doc string:
> 
> -(defcustom byte-compile-cond-use-jump-table t
> -  "Compile `cond' clauses to a jump table implementation (using a hash-table)."
> +(defcustom byte-compile-cond-use-jump-table nil
> +  "Compile `cond' clauses to a jump table implementation (using a hash-table).
> +
> +In Emacs 26, this feature is disabled by default because of a bug
> +in the code generation of `cond' forms with duplicated test clauses."
>    :version "26.1"
>    :group 'bytecomp
>    :type 'boolean)

I don't think we should explain why we did this in a doc string.  And
:version should change as well.

More generally, I can't say I like this, and don't understand why this
would be better than reverting the offending change on emacs-26.  Why
is it a problem to defer the features which caused the regression to
Emacs 27?