From: Andrea Corallo Date: Sun, 1 Sep 2019 10:52:05 +0000 (+0200) Subject: always release contex even in case of failure X-Git-Tag: emacs-28.0.90~2727^2~1236 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=76021e1e06c5c1af05b658310505da333bc0c214;p=emacs.git always release contex even in case of failure --- diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 631003da1dd..e9f9cd2db45 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -886,10 +886,11 @@ the annotation emission." comp-passes) ;; Once we have the final LIMPLE we jump into C. (comp--init-ctxt) - (comp-add-func-to-ctxt func) - (comp-compile-ctxt-to-file (symbol-name func-symbol-name)) - ;; (comp-compile-and-load-ctxt) - (comp--release-ctxt))) + (unwind-protect + (progn + (comp-add-func-to-ctxt func) + (comp-compile-ctxt-to-file (symbol-name func-symbol-name))) + (comp--release-ctxt)))) (error "Trying to native compile something not a function"))) (provide 'comp)