]> git.eshelyaron.com Git - emacs.git/commit
Avoid allocating Lisp_Save_Value for excursions
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 14 Jun 2018 22:59:09 +0000 (15:59 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 15 Jun 2018 00:13:39 +0000 (17:13 -0700)
commitaca938d1f4ec176a2d00a77693b231298b9c5c4e
tree7498947860bca4044afef608d1dc03e4717fde3d
parent6c04c848e677e458e39811b10335cd6aeece6e2a
Avoid allocating Lisp_Save_Value for excursions

* src/editfns.c (save_excursion_save): New arg PDL,
specifying where to save the state.  All uses changed.
(save_excursion_restore): Args are now the marker and info
rather than a pointer to a Lisp_Save_Value containing them.
All uses changed.
* src/eval.c (default_toplevel_binding, Fbacktrace__locals):
Treat excursions like other miscellaneous pdl types.
(record_unwind_protect_excursion): Save data directly
into the pdl rather than creating an object on the heap.
This avoids the need to allocate and free an object.
(do_one_unbind, backtrace_eval_unrewind):
Unwind excursions directly.
(mark_specpdl): Mark excursions directly.
* src/lisp.h (SPECPDL_UNWIND_EXCURSION): New constant.
(union specbinding): New member unwind_excursion.
src/editfns.c
src/eval.c
src/lisp.h