<feed xmlns='http://www.w3.org/2005/Atom'>
<title>emacs/src, branch scratch/obarray</title>
<subtitle>Emacs is the extensible, customizable, self-documenting real-time display editor. 
</subtitle>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/'/>
<entry>
<title>Use the new obarray type for the initial obarray</title>
<updated>2024-02-17T19:29:41+00:00</updated>
<author>
<name>Mattias Engdegård</name>
</author>
<published>2024-02-11T14:11:21+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=934046990b5cbe48d863559d3d1f9c07d7dd949a'/>
<id>934046990b5cbe48d863559d3d1f9c07d7dd949a</id>
<content type='text'>
* src/lread.c (OBARRAY_SIZE): Remove.
(load_path_check): Create an obarray object instead of a vector.
The initial size is less important because it will grow as needed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/lread.c (OBARRAY_SIZE): Remove.
(load_path_check): Create an obarray object instead of a vector.
The initial size is less important because it will grow as needed.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add a proper type for obarrays</title>
<updated>2024-02-17T19:29:01+00:00</updated>
<author>
<name>Mattias Engdegård</name>
</author>
<published>2024-02-10T20:14:09+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=a556b6ff1b709bb8a88a995a6f35b52fb52910f0'/>
<id>a556b6ff1b709bb8a88a995a6f35b52fb52910f0</id>
<content type='text'>
The new opaque type replaces the previous use of vectors for obarrays.
`obarray-make` now returns objects of this type.  Functions that take
obarrays continue to accept vectors for compatibility, now just using
their first slot to store an actual obarray object.

obarray-size and obarray-default-size now obsolete.

* lisp/obarray.el (obarray-default-size, obarray-size):
Declare obsolete.
(obarray-make, obarrayp, obarray-clear): Remove from here.
* src/fns.c (reduce_emacs_uint_to_hash_hash): Remove from here.
* src/lisp.h (struct Lisp_Obarray, OBARRAYP, XOBARRAY, CHECK_OBARRAY)
(make_lisp_obarray, obarray_size, obarray_bucket, check_obarray)
(obarray_iter_t, make_obarray_iter, obarray_iter_at_end)
(obarray_iter_step, obarray_iter_symbol, DOOBARRAY, knuth_hash): New.
(reduce_emacs_uint_to_hash_hash): Moved here.
* src/lread.c (check_obarray): Renamed and reworked as...
(checked_obarray_slow): ...this.
(intern_sym, Funintern, oblookup, map_obarray)
(Finternal__obarray_buckets): Adapt to new type.
(obarray_index, allocate_obarray, make_obarray, grow_obarray)
(obarray_default_bits, Fobarray_make, Fobarrayp, Fobarray_clear): New.
* etc/emacs_lldb.py (Lisp_Object):
* lisp/emacs-lisp/cl-macs.el (`(,type . ,pred)):
* lisp/emacs-lisp/cl-preloaded.el (cl--typeof-types):
* lisp/emacs-lisp/comp-common.el (comp-known-type-specifiers):
* lisp/emacs-lisp/comp.el (comp-known-predicates):
* src/alloc.c (cleanup_vector, process_mark_stack):
* src/data.c (Ftype_of, syms_of_data):
* src/minibuf.c (Ftry_completion, Fall_completions, Ftest_completion):
* src/pdumper.c (dump_obarray_buckets, dump_obarray, dump_vectorlike):
* src/print.c (print_vectorlike_unreadable):
* test/lisp/abbrev-tests.el (abbrev-make-abbrev-table-test):
* test/lisp/obarray-tests.el (obarrayp-test)
(obarrayp-unchecked-content-test, obarray-make-default-test)
(obarray-make-with-size-test):
Adapt to new type.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The new opaque type replaces the previous use of vectors for obarrays.
`obarray-make` now returns objects of this type.  Functions that take
obarrays continue to accept vectors for compatibility, now just using
their first slot to store an actual obarray object.

obarray-size and obarray-default-size now obsolete.

* lisp/obarray.el (obarray-default-size, obarray-size):
Declare obsolete.
(obarray-make, obarrayp, obarray-clear): Remove from here.
* src/fns.c (reduce_emacs_uint_to_hash_hash): Remove from here.
* src/lisp.h (struct Lisp_Obarray, OBARRAYP, XOBARRAY, CHECK_OBARRAY)
(make_lisp_obarray, obarray_size, obarray_bucket, check_obarray)
(obarray_iter_t, make_obarray_iter, obarray_iter_at_end)
(obarray_iter_step, obarray_iter_symbol, DOOBARRAY, knuth_hash): New.
(reduce_emacs_uint_to_hash_hash): Moved here.
* src/lread.c (check_obarray): Renamed and reworked as...
(checked_obarray_slow): ...this.
(intern_sym, Funintern, oblookup, map_obarray)
(Finternal__obarray_buckets): Adapt to new type.
(obarray_index, allocate_obarray, make_obarray, grow_obarray)
(obarray_default_bits, Fobarray_make, Fobarrayp, Fobarray_clear): New.
* etc/emacs_lldb.py (Lisp_Object):
* lisp/emacs-lisp/cl-macs.el (`(,type . ,pred)):
* lisp/emacs-lisp/cl-preloaded.el (cl--typeof-types):
* lisp/emacs-lisp/comp-common.el (comp-known-type-specifiers):
* lisp/emacs-lisp/comp.el (comp-known-predicates):
* src/alloc.c (cleanup_vector, process_mark_stack):
* src/data.c (Ftype_of, syms_of_data):
* src/minibuf.c (Ftry_completion, Fall_completions, Ftest_completion):
* src/pdumper.c (dump_obarray_buckets, dump_obarray, dump_vectorlike):
* src/print.c (print_vectorlike_unreadable):
* test/lisp/abbrev-tests.el (abbrev-make-abbrev-table-test):
* test/lisp/obarray-tests.el (obarrayp-test)
(obarrayp-unchecked-content-test, obarray-make-default-test)
(obarray-make-with-size-test):
Adapt to new type.
</pre>
</div>
</content>
</entry>
<entry>
<title>; Don't use non-ASCII characters in C comments in xdisp.c.</title>
<updated>2024-02-17T10:15:11+00:00</updated>
<author>
<name>Eli Zaretskii</name>
</author>
<published>2024-02-17T10:15:11+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=77576cd7626e4a99a5c88aa854091d701edd53a8'/>
<id>77576cd7626e4a99a5c88aa854091d701edd53a8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Properly record mtime after insert-file-contents on Android</title>
<updated>2024-02-17T02:27:26+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2024-02-17T02:27:26+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=5b65c2ad7526ec081ac37d32c87e9b58e787d66a'/>
<id>5b65c2ad7526ec081ac37d32c87e9b58e787d66a</id>
<content type='text'>
* src/fileio.c (write_region): Do not verify file identity after
retreiving file status for the second time if st_ino is 0.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/fileio.c (write_region): Do not verify file identity after
retreiving file status for the second time if st_ino is 0.
</pre>
</div>
</content>
</entry>
<entry>
<title>* src/androidvfs.c (android_scan_directory_tree): Get rid of xstrdup.</title>
<updated>2024-02-16T14:17:57+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2024-02-16T14:17:01+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=4b89fb08bdd7d0249698bc0ed578555d6755724d'/>
<id>4b89fb08bdd7d0249698bc0ed578555d6755724d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix the MS-DOS build</title>
<updated>2024-02-15T14:13:04+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2024-02-15T14:11:14+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=e058380324e462c234bb3407d504807f22d825b0'/>
<id>e058380324e462c234bb3407d504807f22d825b0</id>
<content type='text'>
* configure.ac (REQUIRE_GNUISH_STRFTIME_AM_PM): Move definition
to...

* src/conf_post.h (REQUIRE_GNUISH_STRFTIME_AM_PM):
...conf_post.h.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* configure.ac (REQUIRE_GNUISH_STRFTIME_AM_PM): Move definition
to...

* src/conf_post.h (REQUIRE_GNUISH_STRFTIME_AM_PM):
...conf_post.h.
</pre>
</div>
</content>
</entry>
<entry>
<title>Handle /assets and /content file names in `android-browse-url'</title>
<updated>2024-02-15T06:24:21+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2024-02-15T06:23:43+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=783a511d1e31b5c9e5f9cb8ec27fd91d1b9078c9'/>
<id>783a511d1e31b5c9e5f9cb8ec27fd91d1b9078c9</id>
<content type='text'>
* lisp/net/browse-url.el (android-browse-url): New function.

* lisp/term/android-win.el (android-browse-url-internal): Update
function declaration.

* src/androidselect.c (Fandroid_browse_url): Rename to...
(Fandroid_browse_url_internal): ... this.
(syms_of_androidselect): Adjust to match.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lisp/net/browse-url.el (android-browse-url): New function.

* lisp/term/android-win.el (android-browse-url-internal): Update
function declaration.

* src/androidselect.c (Fandroid_browse_url): Rename to...
(Fandroid_browse_url_internal): ... this.
(syms_of_androidselect): Adjust to match.
</pre>
</div>
</content>
</entry>
<entry>
<title>String hashing improvements (spread and performance)</title>
<updated>2024-02-14T13:29:54+00:00</updated>
<author>
<name>Mattias Engdegård</name>
</author>
<published>2024-02-13T13:52:39+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=3a93e301ddc913758abe05c876aa3016e8b23af8'/>
<id>3a93e301ddc913758abe05c876aa3016e8b23af8</id>
<content type='text'>
Fix gaps in hashing coverage in the middle and end of even fairly short
strings.  E.g., `outline-1`, `outline-2` etc all hashed to the exact
same value but with the patch, there are no collisions among the ~160000
symbols in the Emacs tree.

This change also improves average hashing speed by using fewer mixing
operations.

* src/fns.c (hash_string):
Use unit stride for fairly short strings, while retaining the cap of 8
samples for long ones.

Always hash the last word to ensure that the end of the string is
covered.  For strings shorter than a word, use fewer loads and a single
reduction step.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix gaps in hashing coverage in the middle and end of even fairly short
strings.  E.g., `outline-1`, `outline-2` etc all hashed to the exact
same value but with the patch, there are no collisions among the ~160000
symbols in the Emacs tree.

This change also improves average hashing speed by using fewer mixing
operations.

* src/fns.c (hash_string):
Use unit stride for fairly short strings, while retaining the cap of 8
samples for long ones.

Always hash the last word to ensure that the end of the string is
covered.  For strings shorter than a word, use fewer loads and a single
reduction step.
</pre>
</div>
</content>
</entry>
<entry>
<title>Simplify position-symbol</title>
<updated>2024-02-13T19:20:33+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2024-02-13T17:54:51+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=a4a99405d00b98aeb86040117402ed0e1f954833'/>
<id>a4a99405d00b98aeb86040117402ed0e1f954833</id>
<content type='text'>
* src/data.c (Fposition_symbol): Simplify by calling Fbare_symbol
rather than open-coding it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/data.c (Fposition_symbol): Simplify by calling Fbare_symbol
rather than open-coding it.
</pre>
</div>
</content>
</entry>
<entry>
<title>XSYMBOL eassume speedups</title>
<updated>2024-02-13T19:20:33+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2024-02-13T17:54:51+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=d202f1b9e74107c0e51c5d2fdbe094cbe1baaadb'/>
<id>d202f1b9e74107c0e51c5d2fdbe094cbe1baaadb</id>
<content type='text'>
* src/lisp.h (XSYMBOL_WITH_POS_SYM, XSYMBOL): Help the compiler by using
eassume instead of eassert for XSYMBOL postconditions likely to be
useful for optimization later.  With gcc 13.2 -O2 x86-64 this improved
speed on my usual “compile all .el files” benchmark by 0.7% and shrank
the text size of Emacs by 0.09%.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/lisp.h (XSYMBOL_WITH_POS_SYM, XSYMBOL): Help the compiler by using
eassume instead of eassert for XSYMBOL postconditions likely to be
useful for optimization later.  With gcc 13.2 -O2 x86-64 this improved
speed on my usual “compile all .el files” benchmark by 0.7% and shrank
the text size of Emacs by 0.09%.
</pre>
</div>
</content>
</entry>
</feed>
