aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKarl Heuer1995-04-05 03:05:26 +0000
committerKarl Heuer1995-04-05 03:05:26 +0000
commit661c7d6ebd3e260ab5f715cc24d2426cdd30ad73 (patch)
tree489e1209323e1f34b2dee36f1355b5fe92e4ce51 /src
parentc6972ec8d30ecfbe34ffd8e2d6058ba434aeca9a (diff)
downloademacs-661c7d6ebd3e260ab5f715cc24d2426cdd30ad73.tar.gz
emacs-661c7d6ebd3e260ab5f715cc24d2426cdd30ad73.zip
(Ffetch_bytecode): New function.
(funcall_lambda): Call it. (syms_of_eval): defsubr it.
Diffstat (limited to 'src')
-rw-r--r--src/eval.c25
1 files changed, 20 insertions, 5 deletions
diff --git a/src/eval.c b/src/eval.c
index 5faaafd150a..a67bc3c1a17 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -2238,17 +2238,31 @@ funcall_lambda (fun, nargs, arg_vector)
2238 /* If we have not actually read the bytecode string 2238 /* If we have not actually read the bytecode string
2239 and constants vector yet, fetch them from the file. */ 2239 and constants vector yet, fetch them from the file. */
2240 if (CONSP (XVECTOR (fun)->contents[COMPILED_BYTECODE])) 2240 if (CONSP (XVECTOR (fun)->contents[COMPILED_BYTECODE]))
2241 { 2241 Ffetch_bytecode (fun);
2242 tem = read_doc_string (XVECTOR (fun)->contents[COMPILED_BYTECODE]);
2243 XVECTOR (fun)->contents[COMPILED_BYTECODE] = XCONS (tem)->car;
2244 XVECTOR (fun)->contents[COMPILED_CONSTANTS] = XCONS (tem)->cdr;
2245 }
2246 val = Fbyte_code (XVECTOR (fun)->contents[COMPILED_BYTECODE], 2242 val = Fbyte_code (XVECTOR (fun)->contents[COMPILED_BYTECODE],
2247 XVECTOR (fun)->contents[COMPILED_CONSTANTS], 2243 XVECTOR (fun)->contents[COMPILED_CONSTANTS],
2248 XVECTOR (fun)->contents[COMPILED_STACK_DEPTH]); 2244 XVECTOR (fun)->contents[COMPILED_STACK_DEPTH]);
2249 } 2245 }
2250 return unbind_to (count, val); 2246 return unbind_to (count, val);
2251} 2247}
2248
2249DEFUN ("fetch-bytecode", Ffetch_bytecode, Sfetch_bytecode,
2250 1, 1, 0,
2251 "If byte-compiled OBJECT is lazy-loaded, fetch it now.")
2252 (object)
2253 Lisp_Object object;
2254{
2255 Lisp_Object tem;
2256
2257 if (COMPILEDP (object)
2258 && CONSP (XVECTOR (object)->contents[COMPILED_BYTECODE]))
2259 {
2260 tem = read_doc_string (XVECTOR (object)->contents[COMPILED_BYTECODE]);
2261 XVECTOR (object)->contents[COMPILED_BYTECODE] = XCONS (tem)->car;
2262 XVECTOR (object)->contents[COMPILED_CONSTANTS] = XCONS (tem)->cdr;
2263 }
2264 return object;
2265}
2252 2266
2253void 2267void
2254grow_specpdl () 2268grow_specpdl ()
@@ -2628,6 +2642,7 @@ Otherwise, nil (in a bare Emacs without preloaded Lisp code).");
2628 defsubr (&Seval); 2642 defsubr (&Seval);
2629 defsubr (&Sapply); 2643 defsubr (&Sapply);
2630 defsubr (&Sfuncall); 2644 defsubr (&Sfuncall);
2645 defsubr (&Sfetch_bytecode);
2631 defsubr (&Sbacktrace_debug); 2646 defsubr (&Sbacktrace_debug);
2632 defsubr (&Sbacktrace); 2647 defsubr (&Sbacktrace);
2633 defsubr (&Sbacktrace_frame); 2648 defsubr (&Sbacktrace_frame);