# HG changeset patch # User Karl Heuer # Date 797051126 0 # Node ID 81a008df9184f6a7b2a6d8ec0560b826cbda187e # Parent de3d87b4c41864e5cfe829fcd7d0c2c8d1cf9a81 (Ffetch_bytecode): New function. (funcall_lambda): Call it. (syms_of_eval): defsubr it. diff -r de3d87b4c418 -r 81a008df9184 src/eval.c --- a/src/eval.c Wed Apr 05 03:04:48 1995 +0000 +++ b/src/eval.c Wed Apr 05 03:05:26 1995 +0000 @@ -2238,17 +2238,31 @@ /* 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; - } + Ffetch_bytecode (fun); val = Fbyte_code (XVECTOR (fun)->contents[COMPILED_BYTECODE], XVECTOR (fun)->contents[COMPILED_CONSTANTS], XVECTOR (fun)->contents[COMPILED_STACK_DEPTH]); } return unbind_to (count, val); } + +DEFUN ("fetch-bytecode", Ffetch_bytecode, Sfetch_bytecode, + 1, 1, 0, + "If byte-compiled OBJECT is lazy-loaded, fetch it now.") + (object) + Lisp_Object object; +{ + Lisp_Object tem; + + if (COMPILEDP (object) + && CONSP (XVECTOR (object)->contents[COMPILED_BYTECODE])) + { + tem = read_doc_string (XVECTOR (object)->contents[COMPILED_BYTECODE]); + XVECTOR (object)->contents[COMPILED_BYTECODE] = XCONS (tem)->car; + XVECTOR (object)->contents[COMPILED_CONSTANTS] = XCONS (tem)->cdr; + } + return object; +} void grow_specpdl () @@ -2628,6 +2642,7 @@ defsubr (&Seval); defsubr (&Sapply); defsubr (&Sfuncall); + defsubr (&Sfetch_bytecode); defsubr (&Sbacktrace_debug); defsubr (&Sbacktrace); defsubr (&Sbacktrace_frame);