Hello,

On Fri 04 Aug 2023 at 09:08pm +02, Aymeric Agon-Rambosson wrote:

> That is not entirely true. The C variable
> Vinhibit_automatic_native_compilation, corresponding to elisp variable
> inhibit-automatic-native-compilation, is effectively used to disable native
> compilation of loaded elc files.
>
> The patch remains useless nonetheless : this (partial) disabling of native
> compilation is redundant with the one already provided by variable
> native-comp-jit-compilation.
>
> In fact, if you look at this part of the patch :
>
> diff --git a/src/comp.c b/src/comp.c
> index 59c9e9619a3..06ddb956bb5 100644
> --- a/src/comp.c
> +++ b/src/comp.c
> @@ -5179,6 +5179,7 @@ maybe_defer_native_compilation (Lisp_Object 
> function_name,
>      return;
>
>    if (!native_comp_jit_compilation
> +      || !NILP (Vinhibit_native_compilation)
>        || noninteractive
>        || !NILP (Vpurify_flag)
>        || !COMPILEDP (definition)
>
>
> You will notice that the first two boolean conditions are redundant :
> native_comp_jit_compilation already does what Vinhibit_native_compilation
> wants to do, albeit with an inverted meaning.

But the patch allows it to be done using an env var.  There is no env
var corresponding to the new Vnative_comp_jit_compilation.  And the env
var is needed so that we can be sure it's turned off early enough.

So, while it would be tidier to rework the patch to avoid introducing a
second variable, its functionality is still useful.

-- 
Sean Whitton

Attachment: signature.asc
Description: PGP signature

Reply via email to