all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Pip Cet <pipcet@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 34757@debbugs.gnu.org, chuntaro@sakura-games.jp
Subject: bug#34757: Invalid bytecode from byte compiler
Date: Fri, 15 Mar 2019 19:40:48 +0000	[thread overview]
Message-ID: <CAOqdjBeupyfK6dcUPHM97EFEqY5h+D7oo837dGAJRsZAdQt6Zw@mail.gmail.com> (raw)
In-Reply-To: <jwvimwkb5hj.fsf-monnier+emacs@gnu.org>

On Fri, Mar 15, 2019 at 2:08 PM Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> >> diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
> >> index 0b8f8824b4c..4e54e08ce14 100644
> >> --- a/lisp/emacs-lisp/bytecomp.el
> >> +++ b/lisp/emacs-lisp/bytecomp.el
> >> @@ -3025,6 +3025,7 @@ byte-compile-out-toplevel
> >>                         (or (null (cdr rest))
> >>                             (and (memq output-type '(file progn t))
> >>                                  (cdr (cdr rest))
> >> +                                (eql (length body) (cdr (car rest)))
> >>                                  (eq (car (nth 1 rest)) 'byte-discard)
> >>                                  (progn (setq rest (cdr rest)) t))))
> >>                    (setq maycall nil)    ; Only allow one real function call.
> >
> > Stefan, any comments?
>
> Looks good to me, thanks.
>
> I'm personally running with the following patch instead, which is much
> more risky and hasn't been sufficiently tested yet.

Just to be sure I understand correctly, you would like to remove the
decompilation of trivial function calls entirely?

That seems good to me.

It seems the special case is necessary to avoid compilation errors,
and that it's used for (byte-compile 3), so I think the comment could
be improved a little.

I'm not sure this case can actually happen without doing something
silly, but (byte-compile '(internal-get-closed-var 0)) throws an error
with Stefan's patch, because the byte code is (byte-constant . 0)
(byte-return).





  reply	other threads:[~2019-03-15 19:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-05  8:01 bug#34757: Invalid bytecode from byte compiler chuntaro
2019-03-08 13:18 ` Eli Zaretskii
2019-03-08 13:50   ` Michael Heerdegen
2019-03-08 14:36     ` Eli Zaretskii
2019-03-08 21:13 ` Pip Cet
2019-03-15  8:08   ` Eli Zaretskii
2019-03-15 14:08     ` Stefan Monnier
2019-03-15 19:40       ` Pip Cet [this message]
2019-03-15 20:30         ` Stefan Monnier
2019-03-16 16:51           ` Pip Cet
2019-06-13 11:44             ` Pip Cet
2019-07-27 21:30   ` Stefan Monnier

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=CAOqdjBeupyfK6dcUPHM97EFEqY5h+D7oo837dGAJRsZAdQt6Zw@mail.gmail.com \
    --to=pipcet@gmail.com \
    --cc=34757@debbugs.gnu.org \
    --cc=chuntaro@sakura-games.jp \
    --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.