https://github.com/emacs-mirror/emacs/commit/b903507b36c438653a02d7b6291e9744d5221e28 Skip to content Sign up * Product + Features + Mobile + Actions + Codespaces + Packages + Security + Code review + Issues + Integrations + GitHub Sponsors + Customer stories * Team * Enterprise * Explore + Explore GitHub + Learn and contribute + Topics + Collections + Trending + Learning Lab + Open source guides + Connect with others + The ReadME Project + Events + Community forum + GitHub Education + GitHub Stars program * Marketplace * Pricing + Plans + Compare plans + Contact Sales + Education [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this organization All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} emacs-mirror / emacs Public mirror mirrored from git://git.sv.gnu.org/emacs.git * Notifications * Fork 1.1k * Star 3.5k * Code * Pull requests 10 * Actions * Projects 0 * Security * Insights More * Code * Pull requests * Actions * Projects * Security * Insights Permalink This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. Browse files 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. * Loading branch information @mattiase mattiase committed May 30, 2022 1 parent 169797a commit b903507b36c438653a02d7b6291e9744d5221e28 Split Unified Showing 4 changed files with 1,229 additions and 989 deletions. 1. +1 -0 src/alloc.c 2. +1 -0 src/lisp.h 3. +1,191 -989 src/lread.c 4. +36 -0 test/src/lread-tests.el There are no files selected for viewing 1 src/alloc.c [*] Show comments View file Edit file Delete file This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters Show hidden characters @@ -6180,6 +6180,7 @@ garbage_collect (void) mark_pinned_objects (); mark_pinned_symbols (); mark_lread (); mark_terminals (); mark_kboards (); mark_threads (); 1 src/lisp.h [*] Show comments View file Edit file Delete file This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters Show hidden characters @@ -4486,6 +4486,7 @@ extern void dir_warning (const char *, Lisp_Object); extern void init_obarray_once (void); extern void init_lread (void); extern void syms_of_lread (void); extern void mark_lread (void); INLINE Lisp_Object intern (const char *str) Oops, something went wrong. Retry Toggle all file notes Toggle all file annotations 0 comments on commit b903507 Please sign in to comment. * (c) 2022 GitHub, Inc. * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.