diff src/lread.c @ 424:11054d720c21 r21-2-20

Import from CVS: tag r21-2-20
author cvs
date Mon, 13 Aug 2007 11:26:11 +0200
parents 697ef44129c6
children
line wrap: on
line diff
--- a/src/lread.c	Mon Aug 13 11:25:03 2007 +0200
+++ b/src/lread.c	Mon Aug 13 11:26:11 2007 +0200
@@ -443,12 +443,6 @@
   Lisp_Object list = Vload_force_doc_string_list;
   Lisp_Object tail;
   int fd = XINT (XCAR (Vload_descriptor_list));
-  /* NOTE: If purify_flag is true, we're in-place modifying objects that
-     may be in purespace (and if not, they will be).  Therefore, we have
-     to be VERY careful to make sure that all objects that we create
-     are purecopied -- objects in purespace are not marked for GC, and
-     if we leave any impure objects inside of pure ones, we're really
-     screwed. */
 
   GCPRO1 (list);
   /* restore the old value first just in case an error occurs. */
@@ -479,13 +473,12 @@
 	      ivan = Fread (juan);
 	      if (!CONSP (ivan))
 		signal_simple_error ("invalid lazy-loaded byte code", ivan);
-	      /* Remember to purecopy; see above. */
-	      XCOMPILED_FUNCTION (john)->instructions = Fpurecopy (XCAR (ivan));
+	      XCOMPILED_FUNCTION (john)->instructions = XCAR (ivan);
 	      /* v18 or v19 bytecode file.  Need to Ebolify. */
 	      if (XCOMPILED_FUNCTION (john)->flags.ebolified
 		  && VECTORP (XCDR (ivan)))
 		ebolify_bytecode_constants (XCDR (ivan));
-	      XCOMPILED_FUNCTION (john)->constants = Fpurecopy (XCDR (ivan));
+	      XCOMPILED_FUNCTION (john)->constants = XCDR (ivan);
 	      NUNGCPRO;
 	    }
 	  doc = compiled_function_documentation (XCOMPILED_FUNCTION (john));
@@ -925,7 +918,7 @@
 /* Map FUN over SUFFIXES, as described above.  FUN will be called with a
    char * containing the current file name, and ARG.  Mapping stops when
    FUN returns non-zero. */
-void
+static void
 locate_file_map_suffixes (Lisp_Object filename, Lisp_Object suffixes,
 			  int (*fun) (char *, void *),
 			  void *arg)
@@ -984,7 +977,7 @@
   else
     {
       /* Case c) */
-      CONST char *nsuffix = XSTRING_DATA (suffixes);
+      CONST char *nsuffix = (CONST char *) XSTRING_DATA (suffixes);
 
       while (1)
 	{
@@ -1947,7 +1940,6 @@
       sym = Fmake_symbol ( make_string ((Bufbyte *) read_ptr, len));
     else
       {
-	/* intern will purecopy pname if necessary */
 	Lisp_Object name = make_string ((Bufbyte *) read_ptr, len);
 	sym = Fintern (name, Qnil);
       }
@@ -3005,12 +2997,7 @@
        i++, p++)
   {
     struct Lisp_Cons *otem = XCONS (tem);
-#if 0 /* FSFmacs defun hack */
-    if (read_pure)
-      tem = Fpurecopy (Fcar (tem));
-    else
-#endif
-      tem = Fcar (tem);
+    tem = Fcar (tem);
     *p = tem;
     tem = otem->cdr;
     free_cons (otem);
@@ -3149,8 +3136,17 @@
 }
 
 void
+reinit_vars_of_lread (void)
+{
+  Vread_buffer_stream = Qnil;
+  staticpro_nodump (&Vread_buffer_stream);
+}
+
+void
 vars_of_lread (void)
 {
+  reinit_vars_of_lread ();
+
   DEFVAR_LISP ("values", &Vvalues /*
 List of values of all expressions which were read, evaluated and printed.
 Order is reverse chronological.
@@ -3268,9 +3264,6 @@
      with values saved when the image is dumped. */
   staticpro (&Vload_descriptor_list);
 
-  Vread_buffer_stream = Qnil;
-  staticpro (&Vread_buffer_stream);
-
   /* Initialized in init_lread. */
   staticpro (&Vload_force_doc_string_list);