]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix or remove outdated comments
authorMattias Engdegård <mattiase@acm.org>
Thu, 17 Feb 2022 13:39:42 +0000 (14:39 +0100)
committerMattias Engdegård <mattiase@acm.org>
Thu, 17 Feb 2022 13:52:04 +0000 (14:52 +0100)
* src/eval.c (funcall_lambda): Rewrite obsolete comment.
* src/bytecode.c (exec_byte_code): Remove lying comment and
unneeded #define.
* lisp/emacs-lisp/byte-opt.el: Remove car.  Keep pig.
(byte-compile-log-lap-1): Remove obsolete and irrelevant comment.

lisp/emacs-lisp/byte-opt.el
src/bytecode.c
src/eval.c

index 25898285faa7a7c84eafcd56a1656beb659e90ce..3ca0472efba0b2908ccac3cc4695c65d26422f4e 100644 (file)
 ;; "No matter how hard you try, you can't make a racehorse out of a pig.
 ;; You can, however, make a faster pig."
 ;;
-;; Or, to put it another way, the Emacs byte compiler is a VW Bug.  This code
-;; makes it be a VW Bug with fuel injection and a turbocharger...  You're
-;; still not going to make it go faster than 70 mph, but it might be easier
-;; to get it there.
-;;
 
 ;; TO DO:
 ;;
 (eval-when-compile (require 'subr-x))
 
 (defun byte-compile-log-lap-1 (format &rest args)
-  ;; Newer byte codes for stack-ref make the slot 0 non-nil again.
-  ;; But the "old disassembler" is *really* ancient by now.
-  ;; (if (aref byte-code-vector 0)
-  ;;     (error "The old version of the disassembler is loaded.  Reload new-bytecomp as well"))
   (byte-compile-log-1
    (apply #'format-message format
      (let (c a)
index bda9a39b7f3e6ac8c3be1d0b303349a9da640ede..96f1f90581291dabce223205abeacfb9914995ea 100644 (file)
@@ -458,17 +458,13 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
 
 #ifdef BYTE_CODE_THREADED
 
-      /* A convenience define that saves us a lot of typing and makes
-        the table clearer.  */
-#define LABEL(OP) [OP] = &&insn_ ## OP
-
       /* This is the dispatch table for the threaded interpreter.  */
       static const void *const targets[256] =
        {
          [0 ... (Bconstant - 1)] = &&insn_default,
          [Bconstant ... 255] = &&insn_Bconstant,
 
-#define DEFINE(name, value) LABEL (name) ,
+#define DEFINE(name, value) [name] = &&insn_ ## name,
          BYTE_CODES
 #undef DEFINE
        };
index 7472e649afe7aa2e377b349ea26b2990d583401f..d3342289fbb2929abf2ba21526e896d6e3181ed7 100644 (file)
@@ -3243,19 +3243,15 @@ funcall_lambda (Lisp_Object fun, ptrdiff_t nargs,
   else if (COMPILEDP (fun))
     {
       syms_left = AREF (fun, COMPILED_ARGLIST);
+      /* Bytecode objects using lexical binding have an integral
+        ARGLIST slot value: pass the arguments to the byte-code
+        engine directly.  */
       if (FIXNUMP (syms_left))
-       /* A byte-code object with an integer args template means we
-          shouldn't bind any arguments, instead just call the byte-code
-          interpreter directly; it will push arguments as necessary.
-
-          Byte-code objects with a nil args template (the default)
-          have dynamically-bound arguments, and use the
-          argument-binding code below instead (as do all interpreted
-          functions, even lexically bound ones).  */
-       {
-         return fetch_and_exec_byte_code (fun, XFIXNUM (syms_left),
-                                          nargs, arg_vector);
-       }
+       return fetch_and_exec_byte_code (fun, XFIXNUM (syms_left),
+                                        nargs, arg_vector);
+      /* Otherwise the bytecode object uses dynamic binding and the
+        ARGLIST slot contains a standard formal argument list whose
+        variables are bound dynamically below.  */
       lexenv = Qnil;
     }
 #ifdef HAVE_MODULES