From 585277435f98d7825924a797c97d3d5800833b53 Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Fri, 31 May 2024 10:24:11 +0200 Subject: [PATCH] Fix 'comp--type-check-optim-block' it using 'comp-cstr-type-p' * lisp/emacs-lisp/comp.el (comp--type-check-optim-block): Better condition. (cherry picked from commit baf74968f9704b6354fff7a254172f72f0ebb747) --- lisp/emacs-lisp/comp.el | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index f5b35ec07b5..9447f68c362 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -2849,10 +2849,7 @@ Return t if something was changed." (call memq ,(and (pred comp-mvar-p) mvar-1) ,(and (pred comp-mvar-p) mvar-2))) (cond-jump ,(and (pred comp-mvar-p) mvar-3) ,(pred comp-mvar-p) ,_bb1 ,bb2)) (cl-assert (comp-cstr-imm-vld-p mvar-tag)) - (when (and (length= (comp-mvar-typeset mvar-tested) 1) - (member - (car (comp-mvar-typeset mvar-tested)) - (symbol-value (comp-cstr-imm mvar-tag)))) + (when (comp-cstr-type-p mvar-tested (comp-cstr-cl-tag mvar-tag)) (comp-log (format "Optimizing conditional branch in function: %s" (comp-func-name comp-func)) 3) -- 2.39.2