]> git.eshelyaron.com Git - emacs.git/commitdiff
Remove the unused unbind-all bytecode
authorMattias Engdegård <mattiase@acm.org>
Sun, 2 Jan 2022 10:35:16 +0000 (11:35 +0100)
committerMattias Engdegård <mattiase@acm.org>
Mon, 24 Jan 2022 10:41:46 +0000 (11:41 +0100)
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
lisp/emacs-lisp/comp.el
src/bytecode.c

index a34ba37c04dc9e2c0012f33c7370c0f84ae8484b..2f4bf663438ccff85688beae233309ff5dc90780 100644 (file)
@@ -796,11 +796,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)
index 74b0b1197be5361dbacff73fd6ac2dfa580a1b5e..3c61063a3cbb1e17150ed848f43fa58e7826c394 100644 (file)
@@ -1943,7 +1943,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)
index 75f1a6b43e5dc8c14171338443d56fdf75dbe1fc..b2e8f4a9166de3353e56de60588bfe1929194e3a 100644 (file)
@@ -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: