* Re: master a140513: Optimize certain memq forms during byte-compilation. [not found] ` <20180324193058.8731020445@vcs0.savannah.gnu.org> @ 2018-03-24 21:03 ` Glenn Morris 2018-03-25 6:43 ` Paul Eggert 0 siblings, 1 reply; 3+ messages in thread From: Glenn Morris @ 2018-03-24 21:03 UTC (permalink / raw) To: emacs-devel; +Cc: Vibhav Pant Vibhav Pant wrote: > branch: master > commit a140513acb4ce27bd2b3472ee7a6ecb92676a8e9 > Optimize certain memq forms during byte-compilation. Hi, This change introduces new compiler warnings from (featurep 'xemacs) forms that were previously silent. Minimal example is compiling a file with contents: (defun foo () (and (featurep 'xemacs) (blah))) -> Warning: the function 'blah' is not known to be defined. Compare build logs from https://hydra.nixos.org/build/71888654 https://hydra.nixos.org/build/71888409 Eg search for "defined" in each logfile. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: master a140513: Optimize certain memq forms during byte-compilation. 2018-03-24 21:03 ` master a140513: Optimize certain memq forms during byte-compilation Glenn Morris @ 2018-03-25 6:43 ` Paul Eggert 2018-03-25 7:34 ` Vibhav Pant 0 siblings, 1 reply; 3+ messages in thread From: Paul Eggert @ 2018-03-25 6:43 UTC (permalink / raw) To: Glenn Morris, emacs-devel; +Cc: Vibhav Pant [-- Attachment #1: Type: text/plain, Size: 171 bytes --] The memq-related patch doesn't look quite right to me, since byte-optimize-and might be called on a form that is not 'and'. Does the attached patch fix things for you? [-- Attachment #2: byte-opt.diff --] [-- Type: text/x-patch, Size: 545 bytes --] diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index 54421e01be..15e4536659 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -777,7 +777,7 @@ byte-optimize-memq (setq form `(and ,(byte-optimize-predicate `(eq ,(nth 1 form) ',(nth 0 list))) ',list)))) - (byte-optimize-and form))) + (byte-optimize-predicate form))) (put 'identity 'byte-optimizer 'byte-optimize-identity) (put 'memq 'byte-optimizer 'byte-optimize-memq) ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: master a140513: Optimize certain memq forms during byte-compilation. 2018-03-25 6:43 ` Paul Eggert @ 2018-03-25 7:34 ` Vibhav Pant 0 siblings, 0 replies; 3+ messages in thread From: Vibhav Pant @ 2018-03-25 7:34 UTC (permalink / raw) To: Paul Eggert; +Cc: Glenn Morris, emacs-devel Yes. I had pushed this with another addition in d73d1384aa6d647a930b4dfe3e91505da4ffee21. On Sun, Mar 25, 2018 at 12:13 PM, Paul Eggert <eggert@cs.ucla.edu> wrote: > The memq-related patch doesn't look quite right to me, since > byte-optimize-and might be called on a form that is not 'and'. Does the > attached patch fix things for you? > -- Vibhav Pant vibhavp@gmail.com ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-03-25 7:34 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <20180324193057.15201.3832@vcs0.savannah.gnu.org> [not found] ` <20180324193058.8731020445@vcs0.savannah.gnu.org> 2018-03-24 21:03 ` master a140513: Optimize certain memq forms during byte-compilation Glenn Morris 2018-03-25 6:43 ` Paul Eggert 2018-03-25 7:34 ` Vibhav Pant
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.