Function: comp-jump-table-optimizable

comp-jump-table-optimizable is a byte-compiled function defined in comp.el.gz.

Signature

(comp-jump-table-optimizable JMP-TABLE)

Documentation

Return t if JMP-TABLE can be optimized out.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/comp.el.gz
(defun comp-jump-table-optimizable (jmp-table)
  "Return t if JMP-TABLE can be optimized out."
  (cl-loop
   with labels = (cl-loop for target-label being each hash-value of jmp-table
                          collect target-label)
   with x = (car labels)
   for l in (cdr-safe labels)
   unless (= l x)
     return nil
   finally return t))