From: Noam Postavsky <npostavs@gmail.com>
To: Aaron Jensen <aaronjensen@gmail.com>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, 30872@debbugs.gnu.org
Subject: bug#30872: incorrect byte-compile of closure called from local funcalled function
Date: Wed, 30 May 2018 18:55:33 -0400 [thread overview]
Message-ID: <87vab4bvoa.fsf_-_@gmail.com> (raw)
In-Reply-To: <877eq6ti53.fsf@gmail.com> (Noam Postavsky's message of "Tue, 20 Mar 2018 19:57:28 -0400")
I narrowed it down a bit more, note the lack of setq in the result of
byte-compile-preprocess:
(byte-compile-preprocess
'#'(lambda (handle-fun arg)
(let* ((subfun #'(lambda (params)
(ignore handle-fun)
(funcall #'(lambda () (setq params nil)))
params)))
(funcall subfun arg))))
;=>
#'(lambda (handle-fun arg)
(let* ((subfun
#'(lambda (handle-fun params)
(ignore handle-fun)
(funcall
(internal-make-closure nil
(params)
nil nil))
params)))
(funcall subfun handle-fun arg)))
It's hitting this bit of code in cconv.el, where it says this "should
never happen":
(defun cconv-convert (form env extend)
(pcase form
[...]
(`(setq . ,forms) ; setq special form
[...]
(push (pcase sym-new
((pred symbolp) `(setq ,sym-new ,value))
(`(car-safe ,iexp) `(setcar ,iexp ,value))
;; This "should never happen", but for variables which are
;; mutated+captured+unused, we may end up trying to `setq'
;; on a closed-over variable, so just drop the setq.
(_ ;; (byte-compile-report-error
;; (format "Internal error in cconv of (setq %s ..)"
;; sym-new))
value))
Stefan, thoughts?
next prev parent reply other threads:[~2018-05-30 22:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-20 3:08 bug#30872: 26.0.91; odd byte compile issue Aaron Jensen
2018-03-20 5:41 ` Aaron Jensen
2018-03-20 23:57 ` Noam Postavsky
2018-05-30 22:55 ` Noam Postavsky [this message]
2018-06-08 0:33 ` bug#30872: incorrect byte-compile of closure called from local funcalled function Noam Postavsky
2018-06-08 2:43 ` Stefan Monnier
2018-06-11 12:36 ` Noam Postavsky
2018-06-11 15:29 ` Stefan Monnier
2018-06-16 22:37 ` Noam Postavsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87vab4bvoa.fsf_-_@gmail.com \
--to=npostavs@gmail.com \
--cc=30872@debbugs.gnu.org \
--cc=aaronjensen@gmail.com \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.