[Top][All Lists]

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

Re: On elisp running native - deferred compilation

From: Stefan Monnier
Subject: Re: On elisp running native - deferred compilation
Date: Sat, 22 Feb 2020 09:19:27 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> 1- When an .elc is loaded when no .eln is present we load the .elc but
> we enqeue an async compilation using 'native-compile-async'.  The async
> compilation queue is eaten by a configurable number of parallel
> processes.
> 2- When each compilation unit is finished compiling we substitute each
> byte-compiled function definition with the new one.

Sounds good.

I'll just mention that IMO, we should move towards a model where
compilation (byte or native or anything else) is performed more
transparently and systematically:
- Elisp source code is always compiled before being executed: currently
  the semantics of loading a file allows the behavior to differ between
  loading the .el and loading the .elc, whereas I think it should always
  behave like loading a .elc.
  The eager-macroexpansion introduced in Emacs-24 was a step in
  that direction.
- Recompilation happens automatically (e.g. either because the source
  Elisp file was modified or because the compiled code doesn't match the
  currently running Emacs version).
This also suggests that compiled files should be "hidden" and include
some kind of version info.


reply via email to

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