From: Andrea Corallo Date: Sun, 11 Aug 2019 10:24:15 +0000 (+0200) Subject: add record_unwind_protect_excursion support X-Git-Tag: emacs-28.0.90~2727^2~1297 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=128cc4a2f401e96936e9e5791e65fbdc35ace6b2;p=emacs.git add record_unwind_protect_excursion support --- diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 29d1625009f..6fa098e0eb4 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -635,7 +635,8 @@ the annotation emission." (byte-discard 'pass) (byte-dup (comp-copy-slot (1- (comp-sp)))) - (byte-save-excursion) + (byte-save-excursion + (comp-emit '(call record_unwind_protect_excursion))) (byte-save-window-excursion-OBSOLETE) (byte-save-restriction) (byte-catch) diff --git a/src/comp.c b/src/comp.c index 7f1219780cc..90fa5ccdfa3 100644 --- a/src/comp.c +++ b/src/comp.c @@ -2073,6 +2073,8 @@ DEFUN ("comp-init-ctxt", Fcomp_init_ctxt, Scomp_init_ctxt, emit_simple_limple_call_void_ret); register_emitter (Qrecord_unwind_current_buffer, emit_simple_limple_call_lisp_ret); + register_emitter (Qrecord_unwind_protect_excursion, + emit_simple_limple_call_void_ret); } comp.ctxt = gcc_jit_context_acquire(); @@ -2452,6 +2454,7 @@ syms_of_comp (void) DEFSYM (Qentry, "entry"); DEFSYM (Qset_internal, "set_internal"); DEFSYM (Qrecord_unwind_current_buffer, "record_unwind_current_buffer"); + DEFSYM (Qrecord_unwind_protect_excursion, "record_unwind_protect_excursion"); DEFSYM (Qhelper_unbind_n, "helper_unbind_n"); DEFSYM (Qhelper_unwind_protect, "helper_unwind_protect");