changeset 10201:03f3a1f4264a

(Fdefvar): Fix minor error in previous change. (funcall_lambda): Fetch bytecode and constants vector from file if nec.
author Richard M. Stallman <rms@gnu.org>
date Wed, 21 Dec 1994 18:15:35 +0000
parents 899f5bd94bbb
children 4013c083162e
files src/eval.c
diffstat 1 files changed, 14 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/eval.c	Wed Dec 21 18:14:20 1994 +0000
+++ b/src/eval.c	Wed Dec 21 18:15:35 1994 +0000
@@ -587,6 +587,7 @@
   tail = Fcdr (Fcdr (args));
   if (!NILP (Fcar (tail)))
     {
+      tem = Fcar (tail);
       if (!NILP (Vpurify_flag))
 	tem = Fpurecopy (tem);
       Fput (sym, Qvariable_documentation, tem);
@@ -2233,9 +2234,19 @@
   if (CONSP (fun))
     val = Fprogn (Fcdr (Fcdr (fun)));
   else
-    val = Fbyte_code (XVECTOR (fun)->contents[COMPILED_BYTECODE],
-		      XVECTOR (fun)->contents[COMPILED_CONSTANTS],
-		      XVECTOR (fun)->contents[COMPILED_STACK_DEPTH]);
+    {
+      /* If we have not actually read the bytecode string
+	 and constants vector yet, fetch them from the file.  */
+      if (CONSP (XVECTOR (fun)->contents[COMPILED_BYTECODE]))
+	{
+	  tem = read_doc_string (XVECTOR (fun)->contents[COMPILED_BYTECODE]);
+	  XVECTOR (fun)->contents[COMPILED_BYTECODE] = XCONS (tem)->car;
+	  XVECTOR (fun)->contents[COMPILED_CONSTANTS] = XCONS (tem)->cdr;
+	}
+      val = Fbyte_code (XVECTOR (fun)->contents[COMPILED_BYTECODE],
+			XVECTOR (fun)->contents[COMPILED_CONSTANTS],
+			XVECTOR (fun)->contents[COMPILED_STACK_DEPTH]);
+    }
   return unbind_to (count, val);
 }