1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-18 06:01:22 -08:00
emacs/test/src
Mattias Engdegård c04553f655 Speed up JSON parsing by not maintaining line and column (bug#79192)
We use the current parsing position instead.  The line and column in the
error weren't used (nor very accurate to begin with) and the user can
easily compute them when needed.  The line number calculation is kept
just in case but deprecated, for removal in Emacs 32.

* src/json.c (struct json_parser, json_parser_init): Update parser state.
(json_signal_error): New position computation.
(json_skip_whitespace_internal): Remove.
(is_json_whitespace): New.
(json_skip_whitespace, json_skip_whitespace_if_possible)
(json_parse_unicode, json_parse_string, json_parse_number)
(json_parse_value): Simplify and rewrite for efficiency.
(count_chars, count_newlines)
(string_byte_to_pos, string_byte_to_line)
(buffer_byte_to_pos, buffer_byte_to_line): New.
(Fjson_parse_string, Fjson_parse_buffer): Adapt to new parser state.
* test/src/json-tests.el (json-tests--parse-string-error-pos)
(json-tests--parse-buffer-error-pos, json-parse-error-position): New.
* etc/NEWS: Note deprecation of line and column.
2025-08-21 16:42:45 +02:00
..
comp-resources Nativecomp don't materialize non-materializable objects (bug#78606) 2025-07-09 17:32:07 +02:00
emacs-module-resources Update copyright year to 2025 2025-01-02 18:39:42 +01:00
lread-resources
regex-resources
syntax-resources
alloc-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
buffer-tests.el Prefer ert-with-temp-directory in tests 2025-02-23 03:46:57 +01:00
callint-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
callproc-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
casefiddle-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
character-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
charset-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
chartab-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
cmds-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
coding-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
comp-tests.el Nativecomp don't materialize non-materializable objects (bug#78606) 2025-07-09 17:32:07 +02:00
data-tests.el ; silence some compiler warnings in tests 2025-07-19 17:02:28 +02:00
decompress-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
doc-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
editfns-tests.el (Ftranspose_regions): Fix bug#76124 2025-07-06 19:15:51 -04:00
emacs-module-tests.el Prefer plusp/minusp to cl-plusp/cl-minusp 2025-02-17 22:46:56 +01:00
emacs-tests.el Port allows-stdout test to overly-suspicious bwrap 2025-01-22 11:04:57 -08:00
eval-tests.el Correctly unload variable aliases. 2025-03-16 12:52:40 -04:00
fileio-tests.el ; Fix last change. 2025-07-17 10:40:33 +03:00
filelock-tests.el Fix filelock-tests on MS-Windows 2025-05-12 15:08:20 +03:00
floatfns-tests.el Prefer oddp/evenp to free-coding them in tests 2025-02-17 05:37:10 +01:00
fns-tests.el Fix some tests on OpenBSD 2025-08-07 17:43:58 +03:00
font-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
image-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
indent-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
inotify-tests.el Guarantee delivery of inotify special events 2025-02-26 10:39:46 +08:00
json-tests.el Speed up JSON parsing by not maintaining line and column (bug#79192) 2025-08-21 16:42:45 +02:00
keyboard-tests.el Move keyboard input functions from lread.c to keyboard.c 2025-07-30 11:04:11 +02:00
keymap-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
lcms-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
lread-tests.el Move keyboard input functions from lread.c to keyboard.c 2025-07-30 11:04:11 +02:00
marker-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
minibuf-tests.el Prefer incf to cl-incf in tests 2025-02-23 00:38:22 +01:00
print-tests.el Print non-ASCII chars in unibyte symbols as raw bytes 2025-07-07 11:30:07 +02:00
process-tests.el ; Stabilize a Windows-specific process-test 2025-08-16 13:11:19 +03:00
profiler-tests.el Fix segfault in profiler-cpu-log and profiler-memory-log (bug#78763) 2025-06-14 17:54:06 +03:00
regex-emacs-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
search-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
sqlite-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
syntax-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
textprop-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
thread-tests.el ; Fix thread-tests 2025-08-10 07:40:58 +03:00
timefns-tests.el Use eabs in Fcurrent_time_zone 2025-01-13 01:05:42 +01:00
treesit-tests.el Fix usage of 'treesit-defun-type-regexp' in treesit-tests. 2025-06-25 19:45:54 +03:00
undo-tests.el Prefer oddp/evenp to free-coding them in tests 2025-02-17 05:37:10 +01:00
xdisp-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
xfaces-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
xml-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00