Commit 661c7d6e authored by Karl Heuer's avatar Karl Heuer
Browse files

(Ffetch_bytecode): New function.

(funcall_lambda): Call it.
(syms_of_eval): defsubr it.
parent c6972ec8
......@@ -2238,17 +2238,31 @@ funcall_lambda (fun, nargs, arg_vector)
/* 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 @@ Otherwise, nil (in a bare Emacs without preloaded Lisp code).");
defsubr (&Seval);
defsubr (&Sapply);
defsubr (&Sfuncall);
defsubr (&Sfetch_bytecode);
defsubr (&Sbacktrace_debug);
defsubr (&Sbacktrace);
defsubr (&Sbacktrace_frame);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment