Files
emacs/test/src
Mattias Engdegård 97400c4c24 Make printing mostly non-recursive (bug#55481)
Introduce explicit stacks for traversing common data types during
printing: conses, vectors, records, byte-code, hash-tables and
char-tables, all previously traversed using recursion in C.  This
greatly reduces the risk of crashing Emacs from C stack overflow
when printing deeply nested data.

* src/print.c (Fprinc, print, PRINT_CIRCLE_CANDIDATE_P):
Special-case Fprinc with a plain string argument to eliminate the need
for keeping track of print_depth during the preprocessing phase.
This also improves performance.
(struct print_pp_entry, struct print_pp_stack, ppstack)
(grow_pp_stack, pp_stack_push_value, pp_stack_push_values)
(pp_stack_empty_p, pp_stack_pop):
New stack for preprocessing.
(print_preprocess):
Make mostly nonrecursive, except for string properties.
(enum print_entry_type, struct print_stack_entry)
(struct print_stack, prstack, grow_print_stack)
(print_stack_push, print_stack_push_vector):
New stack for printing.
(print_vectorlike, print_object):
Make mostly nonrecursive, except for string properties and some less
heavily used types.
* test/src/print-tests.el (print-deeply-nested):
New test.
2022-05-18 10:40:15 +02:00
..
2020-10-03 12:53:51 +02:00
2022-01-01 07:03:03 -05:00
2022-01-01 07:03:03 -05:00
2022-01-01 02:45:51 -05:00
2022-01-01 02:45:51 -05:00
2022-02-10 06:56:22 +01:00
2022-01-01 07:03:03 -05:00
2022-01-01 07:03:03 -05:00
2022-01-01 07:03:03 -05:00
2022-01-01 07:03:03 -05:00
2022-01-01 07:03:03 -05:00
2022-01-01 02:45:51 -05:00
2022-01-01 07:03:03 -05:00
2022-01-01 02:45:51 -05:00
2022-01-01 02:45:51 -05:00
2022-01-01 07:03:03 -05:00
2022-01-01 02:45:51 -05:00
2022-01-01 07:03:03 -05:00
2022-01-01 07:03:03 -05:00
2022-01-01 02:45:51 -05:00
2022-01-01 07:03:03 -05:00
2022-01-01 07:03:03 -05:00
2022-01-01 07:03:03 -05:00
2022-01-01 07:03:03 -05:00