]> code.delx.au - gnu-emacs/blobdiff - src/bytecode.c
Don't install keyboard hook when debugged on MS-Windows
[gnu-emacs] / src / bytecode.c
index 0befe6514181279b24f52b9357ccc9b21df1287f..c9e4a25dfa608da8abf8d7fc7e6b13d740dd8b7d 100644 (file)
@@ -6,8 +6,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -637,7 +637,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
         the table clearer.  */
 #define LABEL(OP) [OP] = &&insn_ ## OP
 
-#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
+#if GNUC_PREREQ (4, 6, 0)
 # pragma GCC diagnostic push
 # pragma GCC diagnostic ignored "-Woverride-init"
 #elif defined __clang__
@@ -656,7 +656,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
 #undef DEFINE
        };
 
-#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__) || defined __clang__
+#if GNUC_PREREQ (4, 6, 0) || defined __clang__
 # pragma GCC diagnostic pop
 #endif
 
@@ -1987,6 +1987,20 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
   return result;
 }
 
+/* `args_template' has the same meaning as in exec_byte_code() above.  */
+Lisp_Object
+get_byte_code_arity (Lisp_Object args_template)
+{
+  eassert (NATNUMP (args_template));
+  EMACS_INT at = XINT (args_template);
+  bool rest = (at & 128) != 0;
+  int mandatory = at & 127;
+  EMACS_INT nonrest = at >> 8;
+
+  return Fcons (make_number (mandatory),
+               rest ? Qmany : make_number (nonrest));
+}
+
 void
 syms_of_bytecode (void)
 {
@@ -1996,9 +2010,9 @@ syms_of_bytecode (void)
 
   DEFVAR_LISP ("byte-code-meter", Vbyte_code_meter,
               doc: /* A vector of vectors which holds a histogram of byte-code usage.
-(aref (aref byte-code-meter 0) CODE) indicates how many times the byte
+\(aref (aref byte-code-meter 0) CODE) indicates how many times the byte
 opcode CODE has been executed.
-(aref (aref byte-code-meter CODE1) CODE2), where CODE1 is not 0,
+\(aref (aref byte-code-meter CODE1) CODE2), where CODE1 is not 0,
 indicates how many times the byte opcodes CODE1 and CODE2 have been
 executed in succession.  */);