mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-14 16:50:58 +00:00
(Ffetch_bytecode): New function.
(funcall_lambda): Call it. (syms_of_eval): defsubr it.
This commit is contained in:
parent
c6972ec8d3
commit
661c7d6ebd
25
src/eval.c
25
src/eval.c
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user