bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#61880: Native compilation fails to generate trampolines on certain s


From: Andrea Corallo
Subject: bug#61880: Native compilation fails to generate trampolines on certain scenarios
Date: Sat, 04 Mar 2023 00:20:41 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Andrea Corallo <akrl@sdf.org>
>> Cc: Sergio Durigan Junior <sergiodj@sergiodj.net>,  61880@debbugs.gnu.org
>> Date: Fri, 03 Mar 2023 10:05:21 +0000
>> 
>> Eli Zaretskii <eliz@gnu.org> writes:
>> 
>> > Emitting such a warning for every primitive that is redefined or
>> > advised could be annoying indeed, but maybe we should warn only about
>> > the few primitives that might disrupt compilation of trampolines, and
>> > only when a trampoline is compiled?  Andrea, can we do something like
>> > that?
>> >
>> 
>> I think technically should be easy to emit the warning, again the non
>> trivial part is to form the list of primitives to warn at redefinition
>> (and to keep this list updated over time!).
>
> Well, currently we don't warn at all, so even warning about some of
> the primitives would be an improvement, I think.
>
>> To a quick look into the trampoline machinery in comp.el I see we rely
>> on:
>> 
>> null, memq, gethash, and, subrp, not, subr-native-elisp-p,
>> comp--install-trampoline, concat, if, symbolp, symbol-name, make-string,
>> length, aset, aref, length>, mapcar, expand-file-name,
>> file-name-as-directory, file-exists-p, native-elisp-load.
>> 
>> Note: I haven't followed all the possible execution paths outside
>> comp.el.
>> 
>> Should we start with these?
>
> Yes, I think we should start with those, and add more as we discover
> them.

BTW would you like to suggest a warning message?

Should we say that redefining this primitive breaks Emacs in general or
be more specific on the trampoline mechanism?

I ask as I'm a little puzzled on what to say as there's certanly a ton
of other primitives that when redefined breaks Emacs somewere else than
the trampoline machinery, so maybe we should be not too generic if we
want to have this warning also for nativecomp.  At the same time I feel
beeing too specific in the message would be not ideal.

Best Regards

  Andrea





reply via email to

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