emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gnu-prog-discuss] Reproducible builds


From: Ludovic Courtès
Subject: Re: [gnu-prog-discuss] Reproducible builds
Date: Tue, 22 Dec 2015 17:39:09 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Stefan Monnier <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]