Stop pretending that specpdl overflow can ever occur

* src/eval.c (grow_specpdl_allocation): Remove impossible error.
* src/data.c (syms_of_data): Note obsolence of
`excessive-variable-binding`.
This commit is contained in:
Mattias Engdegård 2023-04-13 17:25:25 +02:00
parent df4a6342fa
commit abb43a6236
2 changed files with 4 additions and 4 deletions

View file

@ -4217,10 +4217,11 @@ syms_of_data (void)
Fput (Qrecursion_error, Qerror_message, build_pure_c_string
("Excessive recursive calling error"));
PUT_ERROR (Qexcessive_variable_binding, recursion_tail,
"Variable binding depth exceeds max-specpdl-size");
PUT_ERROR (Qexcessive_lisp_nesting, recursion_tail,
"Lisp nesting exceeds `max-lisp-eval-depth'");
/* Error obsolete (from 29.1), kept for compatibility. */
PUT_ERROR (Qexcessive_variable_binding, recursion_tail,
"Variable binding depth exceeds max-specpdl-size");
/* Types that type-of returns. */
DEFSYM (Qinteger, "integer");

View file

@ -2373,8 +2373,7 @@ grow_specpdl_allocation (void)
union specbinding *pdlvec = specpdl - 1;
ptrdiff_t size = specpdl_end - specpdl;
ptrdiff_t pdlvecsize = size + 1;
if (max_size <= size)
xsignal0 (Qexcessive_variable_binding); /* Can't happen, essentially. */
eassert (max_size > size);
pdlvec = xpalloc (pdlvec, &pdlvecsize, 1, max_size + 1, sizeof *specpdl);
specpdl = pdlvec + 1;
specpdl_end = specpdl + pdlvecsize - 1;