1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-12 14:30:42 -08:00
emacs/test/src
Mattias Engdegård b903507b36 Nonrecursive Lisp reader (bug#55676)
Restructure the reader to be nonrecursive so that it is not limited by
the C stack or crashes Emacs when reading deeply nested data.
This also improves performance.
A few minor bugs were fixed:

- (a .{NBSP}b) where {NBSP} is a non-breaking space (U+00A0) is now
  the dotted pair (a . b), not the 3-element list (a \. b), since U+00A0
  is treated as whitespace everywhere else.
- #_ with no symbol following is now equivalent to ## (empty interned
  symbol), not #: (empty uninterned symbol).

* src/alloc.c (garbage_collect): Call mark_lread.
* src/lread.c (readevalloop): Use read0 instead of read_list.
(stackbufsize): Increase to 1024, now that read0 isn't recursive.
(invalid_radix_integer): Buffer overflow check.
(read1, read_list, read_vector): Remove.
(read_char_literal, read_string_literal)
(hash_table_from_plist, record_from_list, vector_from_rev_list)
(bytecode_from_rev_list, char_table_from_rev_list)
(sub_char_table_from_rev_list, string_props_from_rev_list)
(read_bool_vector, skip_lazy_string, symbol_char_span)
(skip_space_and_comments)
(enum read_entry_type, struct read_stack_entry, struct read_stack)
(rdstack, mark_lread, read_stack_top, read_stack_pop)
(read_stack_empty_p, grow_read_stack, read_stack_push): New.
(read0): Rewrite to be nonrecursive.
* test/src/lread-tests.el (lread-deeply-nested, lread-misc): New tests.
2022-05-30 15:56:59 +02:00
..
comp-resources Silence byte-compiler slightly in tests 2022-01-27 04:25:08 +01:00
emacs-module-resources Decouple mod-test.c from Gnulib 2022-03-08 18:51:18 -08:00
lread-resources Move some test data to follow our conventions 2020-10-23 16:29:46 +02:00
regex-resources ; Fix more typos 2020-10-03 12:53:51 +02:00
syntax-resources Enhance syntax-tests.el to test nestable comments (Lisp style) 2020-11-17 16:51:49 +00:00
alloc-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
buffer-tests.el Clean up a test file in /tmp 2022-05-24 16:11:09 +02:00
callint-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
callproc-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
casefiddle-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
character-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
charset-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
chartab-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
cmds-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
coding-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
comp-tests.el Fix issue with nativecomp tests leaving files behind in /tmp 2022-05-24 17:24:40 +02:00
data-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
decompress-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
doc-tests.el Adjust doc-tests-documentation/autoloaded-macro 2022-02-20 17:42:21 +01:00
editfns-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
emacs-module-tests.el Decouple mod-test.c from Gnulib 2022-03-08 18:51:18 -08:00
emacs-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
eval-tests.el Fix atimer setting and overdue expiration (bug#55628) 2022-05-30 15:52:02 +02:00
fileio-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
filelock-tests.el Extend filelock-tests.el for bug#53207 2022-01-31 15:26:06 +01:00
floatfns-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
fns-tests.el Faster string-lessp for unibyte arguments 2022-04-04 09:49:31 +02:00
font-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
image-tests.el ; Pacify some --without-x byte-compiler warnings. 2022-05-07 20:18:51 +03:00
indent-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
inotify-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
json-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
keyboard-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
keymap-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
lcms-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
lread-tests.el Nonrecursive Lisp reader (bug#55676) 2022-05-30 15:56:59 +02:00
marker-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
minibuf-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
print-tests.el Less wrong printed circular list tail index (bug#55395) 2022-05-23 16:50:00 +02:00
process-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
regex-emacs-tests.el Audit quoting the quote character in doc strings 2022-04-22 16:17:22 +02:00
search-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
sqlite-tests.el Allow inserting and selecting binary blobs from sqlite 2022-04-28 14:58:53 +02:00
syntax-tests.el Fix Fchar_syntax for non-ASCII in unibyte buffers 2022-01-20 11:44:07 +01:00
textprop-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
thread-tests.el Rewrite thread context switch code (bug#48990) 2022-02-12 15:25:53 -05:00
timefns-tests.el Support (encode-time (list s m h D M Y)) 2022-04-25 12:40:20 -07:00
undo-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
xdisp-tests.el Allow redirecting `message' output to a different buffer 2022-01-29 17:24:49 +01:00
xfaces-tests.el Don't accept whitespace or hex floats in rgbi: colour specs 2022-03-06 14:07:26 +01:00
xml-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00