diff options
| author | Gerd Möllmann | 2024-04-18 09:46:13 +0200 |
|---|---|---|
| committer | Gerd Möllmann | 2024-04-18 10:29:02 +0200 |
| commit | 3c933f40a844bfc0057d5432ca2a0802d8eb52a5 (patch) | |
| tree | 917ba1fc1d2d79048e885950e40e7b02e383b570 /src/eval.c | |
| parent | c19b988c2967f13597b7a3ceafb7c3cd40d83458 (diff) | |
| download | emacs-3c933f40a844bfc0057d5432ca2a0802d8eb52a5.tar.gz emacs-3c933f40a844bfc0057d5432ca2a0802d8eb52a5.zip | |
Initial result of applying diff
Diffstat (limited to 'src/eval.c')
| -rw-r--r-- | src/eval.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/eval.c b/src/eval.c index 7f7a70b15ae..c581339c5e4 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -23,6 +23,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | |||
| 23 | #include <limits.h> | 23 | #include <limits.h> |
| 24 | #include <stdlib.h> | 24 | #include <stdlib.h> |
| 25 | #include "lisp.h" | 25 | #include "lisp.h" |
| 26 | #include "igc.h" | ||
| 26 | #include "blockinput.h" | 27 | #include "blockinput.h" |
| 27 | #include "commands.h" | 28 | #include "commands.h" |
| 28 | #include "keyboard.h" | 29 | #include "keyboard.h" |
| @@ -30,6 +31,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | |||
| 30 | #include "buffer.h" | 31 | #include "buffer.h" |
| 31 | #include "pdumper.h" | 32 | #include "pdumper.h" |
| 32 | #include "atimer.h" | 33 | #include "atimer.h" |
| 34 | #include "igc.h" | ||
| 33 | 35 | ||
| 34 | /* CACHEABLE is ordinarily nothing, except it is 'volatile' if | 36 | /* CACHEABLE is ordinarily nothing, except it is 'volatile' if |
| 35 | necessary to cajole GCC into not warning incorrectly that a | 37 | necessary to cajole GCC into not warning incorrectly that a |
| @@ -103,12 +105,14 @@ specpdl_where (union specbinding *pdl) | |||
| 103 | return pdl->let.where; | 105 | return pdl->let.where; |
| 104 | } | 106 | } |
| 105 | 107 | ||
| 108 | #ifndef HAVE_MPS | ||
| 106 | static Lisp_Object | 109 | static Lisp_Object |
| 107 | specpdl_arg (union specbinding *pdl) | 110 | specpdl_arg (union specbinding *pdl) |
| 108 | { | 111 | { |
| 109 | eassert (pdl->kind == SPECPDL_UNWIND); | 112 | eassert (pdl->kind == SPECPDL_UNWIND); |
| 110 | return pdl->unwind.arg; | 113 | return pdl->unwind.arg; |
| 111 | } | 114 | } |
| 115 | #endif | ||
| 112 | 116 | ||
| 113 | Lisp_Object | 117 | Lisp_Object |
| 114 | backtrace_function (union specbinding *pdl) | 118 | backtrace_function (union specbinding *pdl) |
| @@ -217,6 +221,9 @@ init_eval_once_for_pdumper (void) | |||
| 217 | union specbinding *pdlvec = malloc ((size + 1) * sizeof *specpdl); | 221 | union specbinding *pdlvec = malloc ((size + 1) * sizeof *specpdl); |
| 218 | specpdl = specpdl_ptr = pdlvec + 1; | 222 | specpdl = specpdl_ptr = pdlvec + 1; |
| 219 | specpdl_end = specpdl + size; | 223 | specpdl_end = specpdl + size; |
| 224 | #ifdef HAVE_MPS | ||
| 225 | igc_on_alloc_main_thread_specpdl (); | ||
| 226 | #endif | ||
| 220 | } | 227 | } |
| 221 | 228 | ||
| 222 | void | 229 | void |
| @@ -2404,6 +2411,9 @@ grow_specpdl_allocation (void) | |||
| 2404 | specpdl = pdlvec + 1; | 2411 | specpdl = pdlvec + 1; |
| 2405 | specpdl_end = specpdl + pdlvecsize - 1; | 2412 | specpdl_end = specpdl + pdlvecsize - 1; |
| 2406 | specpdl_ptr = specpdl_ref_to_ptr (count); | 2413 | specpdl_ptr = specpdl_ref_to_ptr (count); |
| 2414 | #ifdef HAVE_MPS | ||
| 2415 | igc_on_grow_specpdl (); | ||
| 2416 | #endif | ||
| 2407 | } | 2417 | } |
| 2408 | 2418 | ||
| 2409 | /* Eval a sub-expression of the current expression (i.e. in the same | 2419 | /* Eval a sub-expression of the current expression (i.e. in the same |
| @@ -3757,7 +3767,6 @@ unbind_to (specpdl_ref count, Lisp_Object value) | |||
| 3757 | 3767 | ||
| 3758 | union specbinding this_binding; | 3768 | union specbinding this_binding; |
| 3759 | this_binding = *--specpdl_ptr; | 3769 | this_binding = *--specpdl_ptr; |
| 3760 | |||
| 3761 | do_one_unbind (&this_binding, true, SET_INTERNAL_UNBIND); | 3770 | do_one_unbind (&this_binding, true, SET_INTERNAL_UNBIND); |
| 3762 | } | 3771 | } |
| 3763 | 3772 | ||
| @@ -4127,10 +4136,12 @@ NFRAMES and BASE specify the activation frame to use, as in `backtrace-frame'. | |||
| 4127 | return result; | 4136 | return result; |
| 4128 | } | 4137 | } |
| 4129 | 4138 | ||
| 4130 | 4139 | ||
| 4140 | #ifndef HAVE_MPS | ||
| 4131 | void | 4141 | void |
| 4132 | mark_specpdl (union specbinding *first, union specbinding *ptr) | 4142 | mark_specpdl (union specbinding *first, union specbinding *ptr) |
| 4133 | { | 4143 | { |
| 4144 | eassert_not_mps (); | ||
| 4134 | union specbinding *pdl; | 4145 | union specbinding *pdl; |
| 4135 | for (pdl = first; pdl != ptr; pdl++) | 4146 | for (pdl = first; pdl != ptr; pdl++) |
| 4136 | { | 4147 | { |
| @@ -4195,6 +4206,8 @@ mark_specpdl (union specbinding *first, union specbinding *ptr) | |||
| 4195 | } | 4206 | } |
| 4196 | } | 4207 | } |
| 4197 | } | 4208 | } |
| 4209 | #endif // not HAVE_MPS | ||
| 4210 | |||
| 4198 | 4211 | ||
| 4199 | /* Fill ARRAY of size SIZE with backtrace entries, most recent call first. | 4212 | /* Fill ARRAY of size SIZE with backtrace entries, most recent call first. |
| 4200 | Truncate the backtrace if longer than SIZE; pad with nil if shorter. */ | 4213 | Truncate the backtrace if longer than SIZE; pad with nil if shorter. */ |