all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: emacs-devel@gnu.org
Subject: Re: [gnu-prog-discuss] Reproducible builds
Date: Tue, 22 Dec 2015 17:39:09 +0100	[thread overview]
Message-ID: <87mvt2cuaa.fsf@gnu.org> (raw)
In-Reply-To: <jwvy4cndvl2.fsf-monnier+Inbox@gnu.org> (Stefan Monnier's message of "Mon, 21 Dec 2015 22:32:47 -0500")

Stefan Monnier <monnier@IRO.UMontreal.CA> skribis:

> The way this shows up in Emacs is that depending on how the
> byte-compilations get ordered, all the (require '<foo>) will either load
> the corresponding <foo>.el or the <foo>.elc.

Guile works similarly, so depending on ordering, when a file is
compiled, you might be evaluating dependent modules or running a
compiled version thereof.  In practice, it doesn’t matter since both are
semantically equivalent.

> In many cases, the end result is 100% identical, but if <foo>.el
> includes functions defined with defsubst then the result can be
> different because in one case the defsubst's source will be inlined and
> in the other the defsubst's byte-code will be inlined.

So the .elc file itself can contain inlined source in some cases?

(In Guile ‘define-inlinable’ is implemented as a macro, there’s no magic
taking place.)

> The easiest way to solve this problem is probably to get rid of the
> "source-level inlining".  IIRC this is already partly the case for
> lexical-binding reasons: we can't inline (at the source-level)
> lexical-binding code in dynamic-binding code (nor vice versa), so when
> the binding style disagrees we forcefully byte-compile the defsubst to
> make sure the inlining is done on the byte-code (where the binding-style
> is not a problem any more).  So we could simply always forcefully
> byte-compile the defsubst, even when the binding styles agree.

It would be important to make inlining works the same regardless of
whether the defsubst-providing module is being evaluated or not, indeed.

Thanks,
Ludo’.



  reply	other threads:[~2015-12-22 16:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1450695354.3591.18.camel@invergo.net>
     [not found] ` <1450710479.31597.40.camel@Renee-desktop.suse>
     [not found]   ` <87r3ifkepm.fsf@gnu.org>
2015-12-22  3:32     ` [gnu-prog-discuss] Reproducible builds Stefan Monnier
2015-12-22 16:39       ` Ludovic Courtès [this message]
2015-12-23  1:08         ` John Wiegley

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=87mvt2cuaa.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=emacs-devel@gnu.org \
    --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.