changeset 5510:6b3caa55668c

Remove the LOSING_BYTECODE compile-time option, it's been off since 1997. 2011-05-20 Aidan Kehoe <kehoea@parhasard.net> * config.h.in: * data.c (Faref): * fns.c (check_losing_bytecode): * fns.c (concat): * fns.c (Felt): Remove the LOSING_BYTECODE compile-time option entirely. It allowed access to the elements of a compiled function using #'aref, and has been turned off since 1997.
author Aidan Kehoe <kehoea@parhasard.net>
date Fri, 20 May 2011 12:16:42 +0100
parents 9ac0016d8fe8
children 7b5254f6e0d5
files src/ChangeLog src/config.h.in src/data.c src/fns.c
diffstat 4 files changed, 11 insertions(+), 89 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Wed May 18 14:21:52 2011 +0100
+++ b/src/ChangeLog	Fri May 20 12:16:42 2011 +0100
@@ -1,3 +1,14 @@
+2011-05-20  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* config.h.in:
+	* data.c (Faref):
+	* fns.c (check_losing_bytecode):
+	* fns.c (concat):
+	* fns.c (Felt):
+	Remove the LOSING_BYTECODE compile-time option entirely. It
+	allowed access to the elements of a compiled function using
+	#'aref, and has been turned off since 1997.
+
 2011-05-07  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* eval.c:
--- a/src/config.h.in	Wed May 18 14:21:52 2011 +0100
+++ b/src/config.h.in	Fri May 20 12:16:42 2011 +0100
@@ -947,12 +947,6 @@
 }
 #endif
 
-/* This will be removed in 19.15. */
-/* Hah!  Try 20.3 ... */
-/* Hah!  Try never ... */
-/* If at first you don't succeed, try, try again. */
-/* #define LOSING_BYTECODE */
-
 /* USER_FULL_NAME returns a string that is the user's full name.
    It can assume that the variable `pw' points to the password file
    entry for this user.
--- a/src/data.c	Wed May 18 14:21:52 2011 +0100
+++ b/src/data.c	Fri May 20 12:16:42 2011 +0100
@@ -753,13 +753,6 @@
       if (idx >= string_char_length (array)) goto range_error;
       return make_char (string_ichar (array, idx));
     }
-#ifdef LOSING_BYTECODE
-  else if (COMPILED_FUNCTIONP (array))
-    {
-      /* Weird, gross compatibility kludge */
-      return Felt (array, index_);
-    }
-#endif
   else
     {
       check_losing_bytecode ("aref", array);
--- a/src/fns.c	Wed May 18 14:21:52 2011 +0100
+++ b/src/fns.c	Fri May 20 12:16:42 2011 +0100
@@ -836,31 +836,6 @@
 
 /* Random data-structure functions */
 
-#ifdef LOSING_BYTECODE
-
-/* #### Delete this shit */
-
-/* Charcount is a misnomer here as we might be dealing with the
-   length of a vector or list, but emphasizes that we're not dealing
-   with Bytecounts in strings */
-static Charcount
-length_with_bytecode_hack (Lisp_Object seq)
-{
-  if (!COMPILED_FUNCTIONP (seq))
-    return XINT (Flength (seq));
-  else
-    {
-      Lisp_Compiled_Function *f = XCOMPILED_FUNCTION (seq);
-
-      return (f->flags.interactivep ? COMPILED_INTERACTIVE :
-	      f->flags.domainp      ? COMPILED_DOMAIN :
-	      COMPILED_DOC_STRING)
-	+ 1;
-    }
-}
-
-#endif /* LOSING_BYTECODE */
-
 void
 check_losing_bytecode (const Ascbyte *function, Lisp_Object seq)
 {
@@ -1653,11 +1628,6 @@
         ;
       else if (VECTORP (seq) || STRINGP (seq) || BIT_VECTORP (seq))
         ;
-#ifdef LOSING_BYTECODE
-      else if (COMPILED_FUNCTIONP (seq))
-        /* Urk!  We allow this, for "compatibility"... */
-        ;
-#endif
 #if 0				/* removed for XEmacs 21 */
       else if (INTP (seq))
         /* This is too revolting to think about but maintains
@@ -1687,11 +1657,7 @@
 
     for (argnum = 0, total_length = 0; argnum < nargs; argnum++)
       {
-#ifdef LOSING_BYTECODE
-        Charcount thislen = length_with_bytecode_hack (args[argnum]);
-#else
         Charcount thislen = XINT (Flength (args[argnum]));
-#endif
         total_length += thislen;
       }
 
@@ -1752,11 +1718,7 @@
 
       if (!CONSP (seq))
 	{
-#ifdef LOSING_BYTECODE
-	  thisleni = length_with_bytecode_hack (seq);
-#else
 	  thisleni = XINT (Flength (seq));
-#endif
 	}
       if (STRINGP (seq))
 	string_source_ptr = XSTRING_DATA (seq);
@@ -2352,44 +2314,6 @@
            VECTORP     (sequence) ||
            BIT_VECTORP (sequence))
     return Faref (sequence, n);
-#ifdef LOSING_BYTECODE
-  else if (COMPILED_FUNCTIONP (sequence))
-    {
-      EMACS_INT idx = XINT (n);
-      if (idx < 0)
-        {
-        lose:
-          args_out_of_range (sequence, n);
-        }
-      /* Utter perversity */
-      {
-	Lisp_Compiled_Function *f = XCOMPILED_FUNCTION (sequence);
-        switch (idx)
-          {
-          case COMPILED_ARGLIST:
-            return compiled_function_arglist (f);
-          case COMPILED_INSTRUCTIONS:
-            return compiled_function_instructions (f);
-          case COMPILED_CONSTANTS:
-            return compiled_function_constants (f);
-          case COMPILED_STACK_DEPTH:
-            return compiled_function_stack_depth (f);
-          case COMPILED_DOC_STRING:
-	    return compiled_function_documentation (f);
-          case COMPILED_DOMAIN:
-	    return compiled_function_domain (f);
-          case COMPILED_INTERACTIVE:
-	    if (f->flags.interactivep)
-	      return compiled_function_interactive (f);
-	    /* if we return nil, can't tell interactive with no args
-	       from noninteractive. */
-	    goto lose;
-          default:
-            goto lose;
-          }
-      }
-    }
-#endif /* LOSING_BYTECODE */
   else
     {
       check_losing_bytecode ("elt", sequence);