diff options
Diffstat (limited to 'lisp/emacs-lisp/bytecomp.el')
-rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 5aef82691c6..c70e1bf5ed8 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -3133,6 +3133,9 @@ for symbols generated by the byte compiler itself." ;; happens to be true for byte-code generated by bytecomp.el without ;; lexical-binding, but it's not true in general, and it's not true for ;; code output by bytecomp.el with lexical-binding. + ;; We also restore the value of `byte-compile-depth' and remove TAG depths + ;; accordingly when inlining byte-switch lap code, as documented in + ;; `byte-compile-cond-jump-table'. (let ((endtag (byte-compile-make-tag)) last-jump-tag ;; last TAG we have jumped to last-depth ;; last value of `byte-compile-depth' @@ -4061,6 +4064,22 @@ Return a list of the form ((TEST . VAR) ((VALUE BODY) ...))" (length cases))) default-tag (byte-compile-make-tag) donetag (byte-compile-make-tag)) + ;; The structure of byte-switch code: + ;; + ;; varref var + ;; constant #s(hash-table purecopy t data (val1 (TAG1) val2 (TAG2))) + ;; switch + ;; goto DEFAUT-TAG + ;; TAG1 + ;; <clause body> + ;; goto DONETAG + ;; TAG2 + ;; <clause body> + ;; goto DONETAG + ;; DEFAULT-TAG + ;; <body for `t' clause, if any (else `constant nil')> + ;; DONETAG + (byte-compile-variable-ref var) (byte-compile-push-constant jump-table) (byte-compile-out 'byte-switch) |