]> git.eshelyaron.com Git - emacs.git/commit
Add anonymous lambdas reload mechanism
authorAndrea Corallo <akrl@sdf.org>
Sat, 2 May 2020 16:29:11 +0000 (17:29 +0100)
committerAndrea Corallo <akrl@sdf.org>
Fri, 15 May 2020 19:06:49 +0000 (20:06 +0100)
commit44b0ce6e38f06df10b60ffdd9d9ade4b7e229088
tree6747059990968a57a6c7c75b7da1e1cd5f9ae287
parent49f0331f53fb9eaa2039538a983eb7b6dbcd206f
Add anonymous lambdas reload mechanism

* src/pdumper.c (dump_do_dump_relocation): Initialize
'lambda_gc_guard' while resurrecting.
(dump_do_dump_relocation): Revive lambdas and fixup them.

* src/comp.h (struct Lisp_Native_Comp_Unit): Define new
'lambda_gc_guard' 'lambda_c_name_idx_h' 'data_imp_relocs'
'loaded_once' fields.

* src/comp.c (load_comp_unit): Use compilaiton unit 'loaded_once'
field.
(make_subr, Fcomp__register_lambda): New functions.
(Fcomp__register_subr): Make use of 'make_subr'.
(Fnative_elisp_load): Indent.
(Fnative_elisp_load): Initialize 'lambda_gc_guard'
'lambda_c_name_idx_h' fields.
(syms_of_comp): Add Scomp__register_lambda.

* lisp/emacs-lisp/comp.el (comp-ctxt): Change
'byte-func-to-func-h' hash key test.
(comp-ctxt): Add 'lambda-fixups-h' slot.
(comp-emit-lambda-for-top-level): New function.
(comp-finalize-relocs): Never emit lambdas in pure space.
(comp-finalize-relocs): Fixup relocation indexes.
lisp/emacs-lisp/comp.el
src/comp.c
src/comp.h
src/pdumper.c