diff options
author | Tom Tromey <tom@tromey.com> | 2018-01-20 12:25:26 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-01-22 22:11:26 -0700 |
commit | 916094a84f0ab31be31aa6c3632f14176b4e882a (patch) | |
tree | 5d14b3b849b7b63f19577bd45bbbd85cdba0b702 /lisp/emacs-lisp/byte-opt.el | |
parent | a6b4b9b4af5405b62cbd59f5ce23ca0fe0027ac7 (diff) | |
download | emacs-feature/byte-unwind-protect.tar.gz |
Add new bytecodes for unwind-protectfeature/byte-unwind-protect
* lisp/emacs-lisp/byte-opt.el (disassemble-offset): Handle
byte-pushunwindprotect.
* lisp/emacs-lisp/bytecomp.el (byte-pushunwindprotect)
(byte-endunwindprotect): New bytecodes.
(byte-goto-ops): Add byte-pushunwindprotect.
(byte-compile-unwind-protect): Emit new bytecodes.
(byte-compile-goto): Handle byte-pushunwindprotect.
* lisp/emacs-lisp/cconv.el (cconv-convert): Don't special-case
unwind-protect when byte-compile--use-old-handlers.
(cconv-analyze-form): Likewise.
* src/bytecode.c (Bpushunwindprotect, Bendunwindprotect): New bytecodes.
(exec_byte_code): Implement new bytecodes.
* test/src/bytecode-tests.el: New file.
Diffstat (limited to 'lisp/emacs-lisp/byte-opt.el')
-rw-r--r-- | lisp/emacs-lisp/byte-opt.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index e5e5f4ee590..5292deda6ea 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -1324,7 +1324,8 @@ (<= bytedecomp-op byte-goto-if-not-nil-else-pop)) (memq bytedecomp-op (eval-when-compile (list byte-stack-set2 byte-pushcatch - byte-pushconditioncase)))) + byte-pushconditioncase + byte-pushunwindprotect)))) ;; Offset in next 2 bytes. (setq bytedecomp-ptr (1+ bytedecomp-ptr)) (+ (aref bytes bytedecomp-ptr) |