[Top][All Lists]

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

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

From: Mattias Engdegård
Subject: bug#35770: [PATCH] Broken duplicate case elimination in switch byte-compilation
Date: Fri, 17 May 2019 11:33:41 +0200

The byte-code compiler attempts to eliminate duplicated cases when turning a 
`cond' into a switch table, as in

  (cond ((eq x 'a) 1)
         (eq x 'b) 2)
         (eq x 'a) 3)) ; remove

but it doesn't work properly, because of a confusion between expressions and 
their values, and a logic error that would have discarded the entire table 
instead of just skipped the duplicate.

This patch attempts to rectify that. I also removed a seemingly redundant 
condition, the (consp condition), which should always be true at that point.

Attachment: 0001-Correctly-eliminate-duplicate-cases-in-switch-compil.patch
Description: Binary data

reply via email to

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