<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/emacs.git/src/alloc.c, branch nick.lloyd-bytecode-jit</title>
<subtitle>git.savannah.gnu.org: git/emacs.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/emacs.git/'/>
<entry>
<title>Merge branch 'master' into nick.lloyd-bytecode-jit</title>
<updated>2017-02-02T03:31:55+00:00</updated>
<author>
<name>Nickolas Lloyd</name>
<email>ultrageek.lloyd@gmail.com</email>
</author>
<published>2017-02-02T03:31:55+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/emacs.git/commit/?id=9a15b5509abb49a11c97c1101ad216f4ef258368'/>
<id>9a15b5509abb49a11c97c1101ad216f4ef258368</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'master' into nick.lloyd-bytecode-jit</title>
<updated>2017-02-02T01:28:55+00:00</updated>
<author>
<name>Nickolas Lloyd</name>
<email>ultrageek.lloyd@gmail.com</email>
</author>
<published>2017-02-02T01:28:55+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/emacs.git/commit/?id=3dcb25deaefb52c9d314c4eddb93a3a815a58ec0'/>
<id>3dcb25deaefb52c9d314c4eddb93a3a815a58ec0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Revamp quitting and fix infloops</title>
<updated>2017-02-01T23:23:19+00:00</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2017-02-01T23:18:44+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/emacs.git/commit/?id=b01ac672be1277833964d2d53f6dd26560c70343'/>
<id>b01ac672be1277833964d2d53f6dd26560c70343</id>
<content type='text'>
This fixes some infinite loops that cannot be quitted out of,
e.g., (defun foo () (nth most-positive-fixnum '#1=(1 . #1#)))
when byte-compiled and when run under X.  See:
http://lists.gnu.org/archive/html/emacs-devel/2017-01/msg00577.html
This also attempts to keep the performance improvements I recently
added, as much as possible under the constraint that the infloops
must be caught.  In some cases this fixes infloop bugs recently
introduced when I removed immediate_quit.
* src/alloc.c (Fmake_list):
Use rarely_quit, not maybe_quit, for speed in the usual case.
* src/bytecode.c (exec_byte_code):
* src/editfns.c (Fcompare_buffer_substrings):
* src/fns.c (Fnthcdr):
* src/syntax.c (scan_words, skip_chars, skip_syntaxes)
(Fbackward_prefix_chars):
Use rarely_quit so that users can C-g out of long loops.
* src/callproc.c (call_process_cleanup, call_process):
* src/fileio.c (read_non_regular, Finsert_file_contents):
* src/indent.c (compute_motion):
* src/syntax.c (scan_words, Fforward_comment):
Remove now-unnecessary maybe_quit calls.
* src/callproc.c (call_process):
* src/doc.c (get_doc_string, Fsnarf_documentation):
* src/fileio.c (Fcopy_file, read_non_regular, Finsert_file_contents):
* src/lread.c (safe_to_load_version):
* src/sysdep.c (system_process_attributes) [GNU_LINUX]:
Use emacs_read_quit instead of emacs_read in places where
C-g handling is safe.
* src/eval.c (maybe_quit): Move comment here from lisp.h.
* src/fileio.c (Fcopy_file, e_write):
Use emacs_write_quit instead of emacs_write_sig in places where
C-g handling is safe.
* src/filelock.c (create_lock_file): Use emacs_write, not
plain write, as emacs_write no longer has a problem.
(read_lock_data): Use emacs_read, not read, as emacs_read
no longer has a problem.
* src/fns.c (rarely_quit): Move to lisp.h and rename to
incr_rarely_quit.  All uses changed..
* src/fns.c (Fmemq, Fmemql, Fassq, Frassq, Fplist_put, Fplist_member):
* src/indent.c (compute_motion):
* src/syntax.c (find_defun_start, back_comment, forw_comment)
(Fforward_comment, scan_lists, scan_sexps_forward):
Use incr_rarely_quit so that users can C-g out of long loops.
* src/fns.c (Fnconc): Move incr_rarely_quit call to within
inner loop, so that it catches C-g there too.
* src/keyboard.c (tty_read_avail_input): Remove commented-out
and now-obsolete code dealing with interrupts.
* src/lisp.h (rarely_quit, incr_rarely_quit): New functions,
the latter moved here from fns.c and renamed from rarely_quit.
(emacs_read_quit, emacs_write_quit): New decls.
* src/search.c (find_newline, search_buffer, find_newline1):
Add maybe_quit to catch C-g.
* src/sysdep.c (get_child_status): Always invoke maybe_quit
if interruptible, so that the caller need not bother.
(emacs_nointr_read, emacs_read_quit, emacs_write_quit):
New functions.
(emacs_read): Rewrite in terms of emacs_nointr_read.
Do not handle C-g or signals; that is now for emacs_read_quit.
(emacs_full_write): Replace PROCESS_SIGNALS two-way arg
with INTERRUPTIBLE three-way arg.  All uses changed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes some infinite loops that cannot be quitted out of,
e.g., (defun foo () (nth most-positive-fixnum '#1=(1 . #1#)))
when byte-compiled and when run under X.  See:
http://lists.gnu.org/archive/html/emacs-devel/2017-01/msg00577.html
This also attempts to keep the performance improvements I recently
added, as much as possible under the constraint that the infloops
must be caught.  In some cases this fixes infloop bugs recently
introduced when I removed immediate_quit.
* src/alloc.c (Fmake_list):
Use rarely_quit, not maybe_quit, for speed in the usual case.
* src/bytecode.c (exec_byte_code):
* src/editfns.c (Fcompare_buffer_substrings):
* src/fns.c (Fnthcdr):
* src/syntax.c (scan_words, skip_chars, skip_syntaxes)
(Fbackward_prefix_chars):
Use rarely_quit so that users can C-g out of long loops.
* src/callproc.c (call_process_cleanup, call_process):
* src/fileio.c (read_non_regular, Finsert_file_contents):
* src/indent.c (compute_motion):
* src/syntax.c (scan_words, Fforward_comment):
Remove now-unnecessary maybe_quit calls.
* src/callproc.c (call_process):
* src/doc.c (get_doc_string, Fsnarf_documentation):
* src/fileio.c (Fcopy_file, read_non_regular, Finsert_file_contents):
* src/lread.c (safe_to_load_version):
* src/sysdep.c (system_process_attributes) [GNU_LINUX]:
Use emacs_read_quit instead of emacs_read in places where
C-g handling is safe.
* src/eval.c (maybe_quit): Move comment here from lisp.h.
* src/fileio.c (Fcopy_file, e_write):
Use emacs_write_quit instead of emacs_write_sig in places where
C-g handling is safe.
* src/filelock.c (create_lock_file): Use emacs_write, not
plain write, as emacs_write no longer has a problem.
(read_lock_data): Use emacs_read, not read, as emacs_read
no longer has a problem.
* src/fns.c (rarely_quit): Move to lisp.h and rename to
incr_rarely_quit.  All uses changed..
* src/fns.c (Fmemq, Fmemql, Fassq, Frassq, Fplist_put, Fplist_member):
* src/indent.c (compute_motion):
* src/syntax.c (find_defun_start, back_comment, forw_comment)
(Fforward_comment, scan_lists, scan_sexps_forward):
Use incr_rarely_quit so that users can C-g out of long loops.
* src/fns.c (Fnconc): Move incr_rarely_quit call to within
inner loop, so that it catches C-g there too.
* src/keyboard.c (tty_read_avail_input): Remove commented-out
and now-obsolete code dealing with interrupts.
* src/lisp.h (rarely_quit, incr_rarely_quit): New functions,
the latter moved here from fns.c and renamed from rarely_quit.
(emacs_read_quit, emacs_write_quit): New decls.
* src/search.c (find_newline, search_buffer, find_newline1):
Add maybe_quit to catch C-g.
* src/sysdep.c (get_child_status): Always invoke maybe_quit
if interruptible, so that the caller need not bother.
(emacs_nointr_read, emacs_read_quit, emacs_write_quit):
New functions.
(emacs_read): Rewrite in terms of emacs_nointr_read.
Do not handle C-g or signals; that is now for emacs_read_quit.
(emacs_full_write): Replace PROCESS_SIGNALS two-way arg
with INTERRUPTIBLE three-way arg.  All uses changed.
</pre>
</div>
</content>
</entry>
<entry>
<title>* src/alloc.c, src/lisp.h: Fix minor glitches in recent changes.</title>
<updated>2017-01-31T16:31:14+00:00</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2017-01-31T16:29:02+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/emacs.git/commit/?id=a727a0303eb34858389cb4331944e0e63411f2ff'/>
<id>a727a0303eb34858389cb4331944e0e63411f2ff</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix hash tables not being purified correctly.</title>
<updated>2017-01-30T06:33:23+00:00</updated>
<author>
<name>Vibhav Pant</name>
<email>vibhavp@gmail.com</email>
</author>
<published>2017-01-30T06:33:23+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/emacs.git/commit/?id=9c4dfdd1af9f97c6a8d7e922b68a39052116790c'/>
<id>9c4dfdd1af9f97c6a8d7e922b68a39052116790c</id>
<content type='text'>
* src/alloc.c
(purecopy_hash_table) New function, makes a copy of the given hash
table in pure storage.
Add new struct `pinned_object' and `pinned_objects' linked list for
pinning objects.
(Fpurecopy) Allow purifying hash tables
(purecopy) Pin hash tables that are either weak or not declared with
`:purecopy t`, use purecopy_hash_table otherwise.
(marked_pinned_objects) New function, marks all objects in pinned_objects.
(garbage_collect_1) Use it. Mark all pinned objects before sweeping.
* src/lisp.h Add new field `pure' to struct `Lisp_Hash_Table'.
* src/fns.c: Add `purecopy' parameter to hash tables.
(Fmake_hash_table): Check for a `:purecopy PURECOPY' argument, pass it
to make_hash_table.
(make_hash_table): Add `pure' parameter, set h-&gt;pure to it.
(Fclrhash, Fremhash, Fputhash): Enforce that the table is impure with
CHECK_IMPURE.
* src/lread.c: (read1) Parse for `purecopy' parameter while reading
  hash tables.
* src/print.c: (print_object) add the `purecopy' parameter while
  printing hash tables.
* src/category.c, src/emacs-module.c, src/image.c, src/profiler.c,
  src/xterm.c: Use new (make_hash_table).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/alloc.c
(purecopy_hash_table) New function, makes a copy of the given hash
table in pure storage.
Add new struct `pinned_object' and `pinned_objects' linked list for
pinning objects.
(Fpurecopy) Allow purifying hash tables
(purecopy) Pin hash tables that are either weak or not declared with
`:purecopy t`, use purecopy_hash_table otherwise.
(marked_pinned_objects) New function, marks all objects in pinned_objects.
(garbage_collect_1) Use it. Mark all pinned objects before sweeping.
* src/lisp.h Add new field `pure' to struct `Lisp_Hash_Table'.
* src/fns.c: Add `purecopy' parameter to hash tables.
(Fmake_hash_table): Check for a `:purecopy PURECOPY' argument, pass it
to make_hash_table.
(make_hash_table): Add `pure' parameter, set h-&gt;pure to it.
(Fclrhash, Fremhash, Fputhash): Enforce that the table is impure with
CHECK_IMPURE.
* src/lread.c: (read1) Parse for `purecopy' parameter while reading
  hash tables.
* src/print.c: (print_object) add the `purecopy' parameter while
  printing hash tables.
* src/category.c, src/emacs-module.c, src/image.c, src/profiler.c,
  src/xterm.c: Use new (make_hash_table).
</pre>
</div>
</content>
</entry>
<entry>
<title>; s/#if/#ifdef/ HAVE_LIBJIT</title>
<updated>2017-01-30T02:27:25+00:00</updated>
<author>
<name>Nickolas Lloyd</name>
<email>ultrageek.lloyd@gmail.com</email>
</author>
<published>2017-01-30T02:27:25+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/emacs.git/commit/?id=3ccffad606386a9344b592cb35bda9c5a1714242'/>
<id>3ccffad606386a9344b592cb35bda9c5a1714242</id>
<content type='text'>
; * src/alloc.c (cleanup_vector): Test for macro definition instead of value.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
; * src/alloc.c (cleanup_vector): Test for macro definition instead of value.
</pre>
</div>
</content>
</entry>
<entry>
<title>; Fix a compilation error when HAVE_LIBJIT=0</title>
<updated>2017-01-29T18:43:39+00:00</updated>
<author>
<name>Nickolas Lloyd</name>
<email>ultrageek.lloyd@gmail.com</email>
</author>
<published>2017-01-29T18:43:39+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/emacs.git/commit/?id=dd45c930b2f35fc84f4fc5e15f03ed06fb042415'/>
<id>dd45c930b2f35fc84f4fc5e15f03ed06fb042415</id>
<content type='text'>
; * src/alloc.c (cleanup_vector): Add a guard around libjit-specific
functions in case HAVE_LIBJIT=0.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
; * src/alloc.c (cleanup_vector): Add a guard around libjit-specific
functions in case HAVE_LIBJIT=0.
</pre>
</div>
</content>
</entry>
<entry>
<title>Small speed improvement for JITed lisp function dispatch</title>
<updated>2017-01-29T18:22:06+00:00</updated>
<author>
<name>Nickolas Lloyd</name>
<email>ultrageek.lloyd@gmail.com</email>
</author>
<published>2017-01-29T18:22:06+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/emacs.git/commit/?id=5b62317b697c04b4120a026e53309e04e15bd9e0'/>
<id>5b62317b697c04b4120a026e53309e04e15bd9e0</id>
<content type='text'>
* src/alloc.c (make-byte-code):
* src/bytecode-jit.c (jit_byte_code__):
* src/bytecode.c [HAVE_LIBJIT] (exec_byte_code):
* src/eval.c (funcall_lambda):
* src/lisp.h (funcall_lambda): Store pointer to bytecode execution function
(either `exec_byte_code' or `jit_exec') in Lisp_Compiled objects to avoid
the need for an extra function call in `exec_byte_code'.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/alloc.c (make-byte-code):
* src/bytecode-jit.c (jit_byte_code__):
* src/bytecode.c [HAVE_LIBJIT] (exec_byte_code):
* src/eval.c (funcall_lambda):
* src/lisp.h (funcall_lambda): Store pointer to bytecode execution function
(either `exec_byte_code' or `jit_exec') in Lisp_Compiled objects to avoid
the need for an extra function call in `exec_byte_code'.
</pre>
</div>
</content>
</entry>
<entry>
<title>Replace QUIT with maybe_quit</title>
<updated>2017-01-26T05:25:37+00:00</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2017-01-26T05:13:19+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/emacs.git/commit/?id=b3a3ed526d2c490c9c5605707f0cd7bff3c88693'/>
<id>b3a3ed526d2c490c9c5605707f0cd7bff3c88693</id>
<content type='text'>
There’s no longer need to have QUIT stand for a slug of C statements.
Use the more-obvious function-call syntax instead.
Also, use true and false when setting immediate_quit.
These changes should not affect the generated machine code.
* src/lisp.h (QUIT): Remove.  All uses replaced by maybe_quit.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There’s no longer need to have QUIT stand for a slug of C statements.
Use the more-obvious function-call syntax instead.
Also, use true and false when setting immediate_quit.
These changes should not affect the generated machine code.
* src/lisp.h (QUIT): Remove.  All uses replaced by maybe_quit.
</pre>
</div>
</content>
</entry>
<entry>
<title>Simplify make-list implementation</title>
<updated>2017-01-26T05:25:36+00:00</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2017-01-26T03:07:57+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/emacs.git/commit/?id=0dfd9a69186e12e53b8aa759c47b9747de92db43'/>
<id>0dfd9a69186e12e53b8aa759c47b9747de92db43</id>
<content type='text'>
* src/alloc.c (Fmake_list): Don’t unroll loop, as the complexity
is not worth it these days.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/alloc.c (Fmake_list): Don’t unroll loop, as the complexity
is not worth it these days.
</pre>
</div>
</content>
</entry>
</feed>
