mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-15 07:41:09 -08:00
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. |
||
|---|---|---|
| .. | ||
| comp-resources | ||
| emacs-module-resources | ||
| lread-resources | ||
| regex-resources | ||
| syntax-resources | ||
| alloc-tests.el | ||
| buffer-tests.el | ||
| callint-tests.el | ||
| callproc-tests.el | ||
| casefiddle-tests.el | ||
| character-tests.el | ||
| charset-tests.el | ||
| chartab-tests.el | ||
| cmds-tests.el | ||
| coding-tests.el | ||
| comp-tests.el | ||
| data-tests.el | ||
| decompress-tests.el | ||
| doc-tests.el | ||
| editfns-tests.el | ||
| emacs-module-tests.el | ||
| emacs-tests.el | ||
| eval-tests.el | ||
| fileio-tests.el | ||
| filelock-tests.el | ||
| floatfns-tests.el | ||
| fns-tests.el | ||
| font-tests.el | ||
| image-tests.el | ||
| indent-tests.el | ||
| inotify-tests.el | ||
| json-tests.el | ||
| keyboard-tests.el | ||
| keymap-tests.el | ||
| lcms-tests.el | ||
| lread-tests.el | ||
| marker-tests.el | ||
| minibuf-tests.el | ||
| print-tests.el | ||
| process-tests.el | ||
| regex-emacs-tests.el | ||
| search-tests.el | ||
| sqlite-tests.el | ||
| syntax-tests.el | ||
| textprop-tests.el | ||
| thread-tests.el | ||
| timefns-tests.el | ||
| undo-tests.el | ||
| xdisp-tests.el | ||
| xfaces-tests.el | ||
| xml-tests.el | ||