]> git.eshelyaron.com Git - emacs.git/commit
* Implement 'maybe_gc_or_quit' to allow correct GC in compiled Lisp.
authorAndrea Corallo <akrl@sdf.org>
Sat, 13 Jun 2020 09:12:15 +0000 (11:12 +0200)
committerAndrea Corallo <akrl@sdf.org>
Sat, 13 Jun 2020 14:42:16 +0000 (16:42 +0200)
commit5a55a845a7c426e82e8a6a6d02bc4a39992871e3
treeb8e27f09e340ecfd3c078cbe5c1d2a30c8660c68
parent34ed9d24984360dcc26fc36561f2de6a0917c58e
* Implement 'maybe_gc_or_quit' to allow correct GC in compiled Lisp.

Implement the backend side of 'maybe_gc_or_quit' so that every time a
call to it is emitted we render it accordingly.  This allow GC to
kicks in during long loops in Lisp code.

* src/comp.c (comp_t): Add 'maybe_gc_or_quit' field.
(helper_link_table): Add 'maybe_gc', 'maybe_quit'.
(emit_maybe_gc_or_quit): New function.
(declare_runtime_imported_funcs): Import 'maybe_gc', 'maybe_quit'
functions.
(define_maybe_gc_or_quit): New function.
(Fcomp__init_ctxt): Register emitter.
(Fcomp__compile_ctxt_to_file): Call 'define_maybe_gc_or_quit'.
(syms_of_comp): Define Qcomp_maybe_gc_or_quit.
src/comp.c