diff src/lread.c @ 4923:8ee3c10d1ed5

remove old no-longer-useful kludgy compiled-fun annotations hack -------------------- ChangeLog entries follow: -------------------- src/ChangeLog addition: 2010-02-03 Ben Wing <ben@xemacs.org> * alloc.c (Fmake_byte_code): * lread.c: * lread.c (readevalloop): * lread.c (Fread): * lread.c (Fread_from_string): * lread.c (read_list_conser): * lread.c (read_list): * lread.c (vars_of_lread): Remove the old kludgy stuff bracketed by `#ifdef COMPILED_FUNCTION_ANNOTATION_HACK_OLD_WAY'.
author Ben Wing <ben@xemacs.org>
date Wed, 03 Feb 2010 08:50:00 -0600
parents 17362f371cc2
children cbe181529c34
line wrap: on
line diff
--- a/src/lread.c	Wed Feb 03 08:03:15 2010 -0600
+++ b/src/lread.c	Wed Feb 03 08:50:00 2010 -0600
@@ -148,39 +148,6 @@
 /* A resizing-buffer stream used to temporarily hold data while reading */
 static Lisp_Object Vread_buffer_stream;
 
-#ifdef COMPILED_FUNCTION_ANNOTATION_HACK_OLD_WAY
-/* The stuff throughout this file that sets the following variable is
-   concerned with old-style .elc files that set up compiled functions using
-
-   (fset 'fun #[... ...])
-
-   Where #[... ...] is a literal compiled-function object.  We want the
-   name of the function to get stored as the annotation, so in a clever but
-   nastily kludgy fashion, we hack the code that reads lists so that if it
-   sees a symbol `fset' as the first argument, it stores the second argument
-   in Vcurrent_compiled_function_annotation, and then when the third
-   argument gets read and a compiled-function object created by a call to
-   Fmake_byte_code(), the stored annotation will get snarfed up.  Elsewhere,
-   we reset Vcurrent_compiled_function_annotation to nil so it's not still
-   defined in case we have a #[... ...] in other circumstances -- in that
-   case we use the filename (Vload_file_name_internal).
-
-   Now it's arguable that I should simply have hacked Ffset()
-   appropriately.  This is all moot, however, be nowadays calls that set up
-   compiled functions look like
-
-   (defalias 'fun #[... ...])
-
-   Where Fdefalias is like Ffset but sets up load-history for the function.
-   Hence it's exactly the right place to hack, and it's not even messy.
-
-   When we're sure the annotation mechanism works the new way, delete all
-   this old nasty code.
-
-   --ben 2-2-10 */
-Lisp_Object Vcurrent_compiled_function_annotation;
-#endif
-
 static int load_byte_code_version;
 
 /* An array describing all known built-in structure types */
@@ -1480,9 +1447,6 @@
 
   internal_bind_lisp_object (&Vcurrent_load_list, Qnil);
 
-#ifdef COMPILED_FUNCTION_ANNOTATION_HACK_OLD_WAY
-  Vcurrent_compiled_function_annotation = Qnil;
-#endif
   GCPRO2 (val, sourcename);
 
   LOADHIST_ATTACH (sourcename);
@@ -1648,9 +1612,6 @@
 
   Vread_objects = Qnil;
 
-#ifdef COMPILED_FUNCTION_ANNOTATION_HACK_OLD_WAY
-  Vcurrent_compiled_function_annotation = Qnil;
-#endif
   if (EQ (stream, Qread_char))
     {
       Lisp_Object val = call1 (Qread_from_minibuffer,
@@ -1677,9 +1638,6 @@
   Lisp_Object lispstream = Qnil;
   struct gcpro gcpro1;
 
-#ifdef COMPILED_FUNCTION_ANNOTATION_HACK_OLD_WAY
-  Vcurrent_compiled_function_annotation = Qnil;
-#endif
   GCPRO1 (lispstream);
   CHECK_STRING (string);
   get_string_range_byte (string, start, end, &startval, &endval,
@@ -3038,16 +2996,6 @@
 	}
     }
 
-#ifdef COMPILED_FUNCTION_ANNOTATION_HACK_OLD_WAY
-  if (s->length == 1 && s->allow_dotted_lists && EQ (XCAR (s->head), Qfset))
-    {
-      if (CONSP (elt) && EQ (XCAR (elt), Qquote) && CONSP (XCDR (elt)))
-	Vcurrent_compiled_function_annotation = XCAR (XCDR (elt));
-      else
-	Vcurrent_compiled_function_annotation = elt;
-    }
-#endif
-
   elt = Fcons (elt, Qnil);
   if (!NILP (s->tail))
     XCDR (s->tail) = elt;
@@ -3083,10 +3031,6 @@
 {
   struct read_list_state s;
   struct gcpro gcpro1, gcpro2;
-#ifdef COMPILED_FUNCTION_ANNOTATION_HACK_OLD_WAY
-  Lisp_Object old_compiled_function_annotation =
-    Vcurrent_compiled_function_annotation;
-#endif
 
   s.head = Qnil;
   s.tail = Qnil;
@@ -3096,9 +3040,6 @@
   GCPRO2 (s.head, s.tail);
 
   sequence_reader (readcharfun, terminator, &s, read_list_conser);
-#ifdef COMPILED_FUNCTION_ANNOTATION_HACK_OLD_WAY
-  Vcurrent_compiled_function_annotation = old_compiled_function_annotation;
-#endif
 
   if ((purify_flag || load_force_doc_strings) && check_for_doc_references)
     {
@@ -3506,11 +3447,6 @@
   Vload_file_name_internal = Qnil;
   staticpro (&Vload_file_name_internal);
 
-#ifdef COMPILED_FUNCTION_ANNOTATION_HACK_OLD_WAY
-  Vcurrent_compiled_function_annotation = Qnil;
-  staticpro (&Vcurrent_compiled_function_annotation);
-#endif
-
   /* So that early-early stuff will work */
   Ffset (Qload,	Qload_internal);