summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/byte-opt.el4
-rw-r--r--lisp/emacs-lisp/bytecomp.el9
2 files changed, 6 insertions, 7 deletions
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el
index 888a5f85007..3bec3e61df9 100644
--- a/lisp/emacs-lisp/byte-opt.el
+++ b/lisp/emacs-lisp/byte-opt.el
@@ -1411,10 +1411,8 @@
;; Replace all addresses with TAGs.
(maphash #'(lambda (value tag)
(let (newtag)
- (cl-assert (consp tag)
- nil "Invalid address for byte-switch")
(setq newtag (byte-compile-make-tag))
- (push (cons (+ (car tag) (lsh (cdr tag) 8)) newtag) tags)
+ (push (cons tag newtag) tags)
(puthash value newtag last-constant)))
last-constant)
;; Replace the hash table referenced in the lapcode with our
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index d5a163e5fdd..748a8cd01f3 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -917,10 +917,11 @@ CONST2 may be evaluated multiple times."
(if (> (car bytes-tail) 255) (error "Bytecode overflow")))
(dolist (hash-table byte-compile-jump-tables)
- (cl-loop for k being the hash-keys of hash-table do
- (let ((tag (cdr (gethash k hash-table))))
- (setq pc (car tag))
- (puthash k (cons (logand pc 255) (lsh pc -8)) hash-table))))
+ (maphash #'(lambda (value tag)
+ (setq pc (cadr tag))
+ (puthash value (+ (logand pc 255) (lsh (lsh pc -8) 8))
+ hash-table))
+ hash-table))
(apply 'unibyte-string (nreverse bytes))))