[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/bytecode-speedup 1eacfb3c88 09/11: Remove the unused unbind-all
From: |
Mattias Engdegård |
Subject: |
scratch/bytecode-speedup 1eacfb3c88 09/11: Remove the unused unbind-all bytecode |
Date: |
Tue, 11 Jan 2022 11:50:50 -0500 (EST) |
branch: scratch/bytecode-speedup
commit 1eacfb3c888764908d2ee421e16c020e7343b5a1
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>
Remove the unused unbind-all bytecode
It was implemented but never generated, originally intended for
TCO in the pre-lexbind era (which was semantically dubious anyway).
Removing it speeds up the interpreter because there is no longer any
need for the outermost `count` variable unless checking is enabled.
* lisp/emacs-lisp/bytecomp.el:
* lisp/emacs-lisp/comp.el (comp-limplify-lap-inst):
* src/bytecode.c (BYTE_CODES, exec_byte_code):
Remove definition and implementation of unbind-all, freeing up the opcode
for other purposes.
---
lisp/emacs-lisp/bytecomp.el | 6 +-----
lisp/emacs-lisp/comp.el | 1 -
src/bytecode.c | 8 +-------
3 files changed, 2 insertions(+), 13 deletions(-)
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 708e612360..f115ae0af3 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -794,11 +794,7 @@ the unwind-action")
(byte-defop 144 0 byte-temp-output-buffer-setup-OBSOLETE)
(byte-defop 145 -1 byte-temp-output-buffer-show-OBSOLETE)
-;; these ops are new to v19
-
-;; To unbind back to the beginning of this frame.
-;; Not used yet, but will be needed for tail-recursion elimination.
-(byte-defop 146 0 byte-unbind-all)
+;; unused: 146
;; these ops are new to v19
(byte-defop 147 -2 byte-set-marker)
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index cf2dbd62f1..4120428cfa 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -1945,7 +1945,6 @@ and the annotation emission."
(byte-condition-case) ;; Obsolete
(byte-temp-output-buffer-setup-OBSOLETE)
(byte-temp-output-buffer-show-OBSOLETE)
- (byte-unbind-all) ;; Obsolete
(byte-set-marker auto)
(byte-match-beginning auto)
(byte-match-end auto)
diff --git a/src/bytecode.c b/src/bytecode.c
index 635058823c..97d47a3d9c 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -227,7 +227,7 @@ DEFINE (Bcondition_case, 0217) /* Obsolete since
Emacs-25. */ \
DEFINE (Btemp_output_buffer_setup, 0220) /* Obsolete since Emacs-24.1. */ \
DEFINE (Btemp_output_buffer_show, 0221) /* Obsolete since Emacs-24.1. */ \
\
-DEFINE (Bunbind_all, 0222) /* Obsolete. Never used. */ \
+/* 0222 was Bunbind_all, never used. */ \
\
DEFINE (Bset_marker, 0223) \
DEFINE (Bmatch_beginning, 0224)
\
@@ -703,12 +703,6 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector,
Lisp_Object maxdepth,
unbind_to (SPECPDL_INDEX () - op, Qnil);
NEXT;
- CASE (Bunbind_all): /* Obsolete. Never used. */
- /* To unbind back to the beginning of this frame. Not used yet,
- but will be needed for tail-recursion elimination. */
- unbind_to (count, Qnil);
- NEXT;
-
CASE (Bgoto):
op = FETCH2;
op_branch:
- branch scratch/bytecode-speedup created (now 712237cab6), Mattias Engdegård, 2022/01/11
- scratch/bytecode-speedup 1e439fe19a 10/11: Open-code aref and aset in bytecode interpreter, Mattias Engdegård, 2022/01/11
- scratch/bytecode-speedup 712237cab6 11/11: ; * lisp/emacs-lisp/byte-opt.el: Remove outdated comments, Mattias Engdegård, 2022/01/11
- scratch/bytecode-speedup 02ff30bfbb 06/11: ; * src/bytecode.c (exec_byte_code): Cosmetic improvement, Mattias Engdegård, 2022/01/11
- scratch/bytecode-speedup 09b5ed93b1 07/11: Remove nil check in exec_byte_code, Mattias Engdegård, 2022/01/11
- scratch/bytecode-speedup 870806d4c4 04/11: Pin bytecode strings to avoid copy at call time, Mattias Engdegård, 2022/01/11
- scratch/bytecode-speedup 43932a0d90 01/11: Short-circuit the recursive bytecode funcall chain, Mattias Engdegård, 2022/01/11
- scratch/bytecode-speedup 5dd261282d 02/11: Inline fixnum operations in bytecode interpreter, Mattias Engdegård, 2022/01/11
- scratch/bytecode-speedup 1eacfb3c88 09/11: Remove the unused unbind-all bytecode,
Mattias Engdegård <=
- scratch/bytecode-speedup b43e4a184f 03/11: Inline setcar and setcdr in byte-code interpreter, Mattias Engdegård, 2022/01/11
- scratch/bytecode-speedup 1dca615cf9 08/11: Move a runtime interpreter check to ENABLE_CHECKING, Mattias Engdegård, 2022/01/11
- scratch/bytecode-speedup a2b4058b96 05/11: Byte code arity check micro-optimisation, Mattias Engdegård, 2022/01/11