diff options
| author | Gerd Möllmann | 2024-05-28 11:11:21 +0200 |
|---|---|---|
| committer | Gerd Möllmann | 2024-05-28 17:39:06 +0200 |
| commit | 24aff7155190389e6ea1003f1795f0033cecb3bf (patch) | |
| tree | 878e76a9544009a6148ac59d0d997fc2b7a6f729 /src/eval.c | |
| parent | e05be63c247820b061866701c87cf84633c2f727 (diff) | |
| download | emacs-24aff7155190389e6ea1003f1795f0033cecb3bf.tar.gz emacs-24aff7155190389e6ea1003f1795f0033cecb3bf.zip | |
SPECPDL_FREE
Diffstat (limited to 'src/eval.c')
| -rw-r--r-- | src/eval.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c index 690ae6772f1..59946dc744b 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -229,6 +229,8 @@ init_eval_once_for_pdumper (void) | |||
| 229 | specpdl = specpdl_ptr = pdlvec + 1; | 229 | specpdl = specpdl_ptr = pdlvec + 1; |
| 230 | specpdl_end = specpdl + size; | 230 | specpdl_end = specpdl + size; |
| 231 | #ifdef HAVE_MPS | 231 | #ifdef HAVE_MPS |
| 232 | for (int i = 0; i < size; ++i) | ||
| 233 | specpdl[i].kind = SPECPDL_FREE; | ||
| 232 | igc_on_alloc_main_thread_specpdl (); | 234 | igc_on_alloc_main_thread_specpdl (); |
| 233 | #endif | 235 | #endif |
| 234 | } | 236 | } |
| @@ -2489,6 +2491,8 @@ grow_specpdl_allocation (void) | |||
| 2489 | specpdl_end = specpdl + pdlvecsize - 1; | 2491 | specpdl_end = specpdl + pdlvecsize - 1; |
| 2490 | specpdl_ptr = specpdl_ref_to_ptr (count); | 2492 | specpdl_ptr = specpdl_ref_to_ptr (count); |
| 2491 | #ifdef HAVE_MPS | 2493 | #ifdef HAVE_MPS |
| 2494 | for (int i = size; i < pdlvecsize - 1; ++i) | ||
| 2495 | specpdl[i].kind = SPECPDL_FREE; | ||
| 2492 | igc_on_grow_specpdl (); | 2496 | igc_on_grow_specpdl (); |
| 2493 | #endif | 2497 | #endif |
| 2494 | } | 2498 | } |
| @@ -3702,6 +3706,10 @@ do_one_unbind (union specbinding *this_binding, bool unwinding, | |||
| 3702 | eassert (unwinding || this_binding->kind >= SPECPDL_LET); | 3706 | eassert (unwinding || this_binding->kind >= SPECPDL_LET); |
| 3703 | switch (this_binding->kind) | 3707 | switch (this_binding->kind) |
| 3704 | { | 3708 | { |
| 3709 | #ifdef HAVE_MPS | ||
| 3710 | case SPECPDL_FREE: | ||
| 3711 | emacs_abort (); | ||
| 3712 | #endif | ||
| 3705 | case SPECPDL_UNWIND: | 3713 | case SPECPDL_UNWIND: |
| 3706 | lisp_eval_depth = this_binding->unwind.eval_depth; | 3714 | lisp_eval_depth = this_binding->unwind.eval_depth; |
| 3707 | this_binding->unwind.func (this_binding->unwind.arg); | 3715 | this_binding->unwind.func (this_binding->unwind.arg); |
| @@ -3844,6 +3852,9 @@ unbind_to (specpdl_ref count, Lisp_Object value) | |||
| 3844 | 3852 | ||
| 3845 | union specbinding this_binding; | 3853 | union specbinding this_binding; |
| 3846 | this_binding = *--specpdl_ptr; | 3854 | this_binding = *--specpdl_ptr; |
| 3855 | #ifdef HAVE_MPS | ||
| 3856 | specpdl_ptr->kind = SPECPDL_FREE; | ||
| 3857 | #endif | ||
| 3847 | do_one_unbind (&this_binding, true, SET_INTERNAL_UNBIND); | 3858 | do_one_unbind (&this_binding, true, SET_INTERNAL_UNBIND); |
| 3848 | } | 3859 | } |
| 3849 | 3860 | ||